/**
 * PH789 Layout Stylesheet
 * Mobile-first responsive design with color palette
 */

/* ===== CSS Variables ===== */
:root {
  --ph789e-primary: #00BCD4;
  --ph789e-secondary: #FF5722;
  --ph789e-accent: #FFCC33;
  --ph789e-dark: #0C0C0C;
  --ph789e-darker: #263238;
  --ph789e-gray: #808080;
  --ph789e-light: #ECEFF1;
  --ph789e-white: #FFFFFF;
  --ph789e-success: #00FF7F;

  /* Spacing */
  --ph789e-spacing-xs: 0.4rem;
  --ph789e-spacing-sm: 0.8rem;
  --ph789e-spacing-md: 1.2rem;
  --ph789e-spacing-lg: 1.6rem;
  --ph789e-spacing-xl: 2rem;

  /* Typography */
  --ph789e-font-sm: 1.2rem;
  --ph789e-font-base: 1.4rem;
  --ph789e-font-lg: 1.6rem;
  --ph789e-font-xl: 2rem;
  --ph789e-font-xxl: 2.4rem;

  /* Layout */
  --ph789e-max-width: 430px;
  --ph789e-header-height: 60px;
  --ph789e-bottom-nav-height: 60px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--ph789e-font-base);
  line-height: 1.6;
  color: var(--ph789e-white);
  background-color: var(--ph789e-dark);
  overflow-x: hidden;
}

body.ph789e-menu-open {
  overflow: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--ph789e-spacing-md);
}

h1 { font-size: var(--ph789e-font-xl); }
h2 { font-size: var(--ph789e-font-lg); }
h3 { font-size: var(--ph789e-font-base); font-weight: 600; }

p {
  margin-bottom: var(--ph789e-spacing-sm);
}

a {
  color: var(--ph789e-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--ph789e-secondary);
}

/* ===== Container ===== */
.ph789e-container {
  width: 100%;
  max-width: var(--ph789e-max-width);
  margin: 0 auto;
  padding: 0 var(--ph789e-spacing-sm);
}

/* ===== Header ===== */
.ph789e-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ph789e-header-height);
  background: linear-gradient(135deg, var(--ph789e-dark) 0%, var(--ph789e-darker) 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.ph789e-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--ph789e-max-width);
  margin: 0 auto;
  padding: 0 var(--ph789e-spacing-sm);
}

.ph789e-logo {
  display: flex;
  align-items: center;
  gap: var(--ph789e-spacing-xs);
  font-size: var(--ph789e-font-lg);
  font-weight: 700;
  color: var(--ph789e-white);
}

.ph789e-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.ph789e-header-buttons {
  display: flex;
  gap: var(--ph789e-spacing-xs);
}

.ph789e-btn-header {
  padding: 6px 14px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ph789e-btn-register {
  background: linear-gradient(135deg, var(--ph789e-primary) 0%, #00ACC1 100%);
  color: var(--ph789e-white);
}

.ph789e-btn-login {
  background: linear-gradient(135deg, var(--ph789e-secondary) 0%, #E64A19 100%);
  color: var(--ph789e-white);
}

.ph789e-btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== Menu Toggle ===== */
.ph789e-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.ph789e-menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--ph789e-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.ph789e-menu-toggle:hover span {
  background: var(--ph789e-primary);
}

/* ===== Mobile Menu ===== */
.ph789e-mobile-menu {
  position: fixed;
  top: var(--ph789e-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ph789e-dark);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: var(--ph789e-spacing-lg);
}

.ph789e-mobile-menu.ph789e-menu-open {
  transform: translateX(0);
}

.ph789e-menu-nav {
  display: flex;
  flex-direction: column;
  gap: var(--ph789e-spacing-sm);
}

.ph789e-menu-nav a {
  display: flex;
  align-items: center;
  padding: var(--ph789e-spacing-md);
  font-size: var(--ph789e-font-base);
  color: var(--ph789e-white);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.ph789e-menu-nav a:hover {
  background: rgba(0, 188, 212, 0.15);
  color: var(--ph789e-primary);
  transform: translateX(4px);
}

.ph789e-menu-nav i {
  margin-right: var(--ph789e-spacing-sm);
  font-size: 1.8rem;
}

/* ===== Main Content ===== */
.ph789e-main {
  margin-top: var(--ph789e-header-height);
  min-height: calc(100vh - var(--ph789e-header-height) - var(--ph789e-bottom-nav-height) - 100px);
  padding-bottom: 80px;
}

.ph789e-section {
  padding: var(--ph789e-spacing-lg) 0;
}

/* ===== Carousel ===== */
.ph789e-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: var(--ph789e-spacing-lg);
}

.ph789e-carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.ph789e-carousel-slide {
  min-width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ph789e-carousel-slide.ph789e-active {
  opacity: 1;
}

.ph789e-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph789e-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ph789e-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ph789e-carousel-dot.ph789e-active,
.ph789e-carousel-dot:hover {
  background: var(--ph789e-primary);
  transform: scale(1.2);
}

/* ===== Cards ===== */
.ph789e-card {
  background: linear-gradient(135deg, rgba(38, 50, 56, 0.8) 0%, rgba(12, 12, 12, 0.9) 100%);
  border-radius: 12px;
  padding: var(--ph789e-spacing-lg);
  margin-bottom: var(--ph789e-spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ph789e-card-title {
  color: var(--ph789e-primary);
  margin-bottom: var(--ph789e-spacing-sm);
}

/* ===== Game Grid ===== */
.ph789e-game-category {
  margin-bottom: var(--ph789e-spacing-xl);
}

.ph789e-category-title {
  display: flex;
  align-items: center;
  gap: var(--ph789e-spacing-xs);
  color: var(--ph789e-accent);
  font-size: var(--ph789e-font-lg);
  margin-bottom: var(--ph789e-spacing-md);
  padding-bottom: var(--ph789e-spacing-xs);
  border-bottom: 2px solid rgba(255, 204, 51, 0.3);
}

.ph789e-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ph789e-spacing-sm);
}

.ph789e-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.ph789e-game-item:hover {
  transform: scale(1.05);
}

.ph789e-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 4px;
  background: var(--ph789e-darker);
}

.ph789e-game-name {
  font-size: 1rem;
  color: var(--ph789e-white);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== Buttons ===== */
.ph789e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ph789e-spacing-xs);
  padding: 10px 20px;
  font-size: var(--ph789e-font-base);
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.ph789e-btn-primary {
  background: linear-gradient(135deg, var(--ph789e-primary) 0%, #00ACC1 100%);
  color: var(--ph789e-white);
}

.ph789e-btn-secondary {
  background: linear-gradient(135deg, var(--ph789e-secondary) 0%, #E64A19 100%);
  color: var(--ph789e-white);
}

.ph789e-btn-accent {
  background: linear-gradient(135deg, var(--ph789e-accent) 0%, #FFB300 100%);
  color: var(--ph789e-dark);
}

.ph789e-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ===== Footer ===== */
.ph789e-footer {
  background: linear-gradient(135deg, var(--ph789e-darker) 0%, var(--ph789e-dark) 100%);
  padding: var(--ph789e-spacing-xl) var(--ph789e-spacing-sm) 120px;
  margin-top: var(--ph789e-spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ph789e-footer-title {
  color: var(--ph789e-accent);
  font-size: var(--ph789e-font-lg);
  margin-bottom: var(--ph789e-spacing-md);
  text-align: center;
}

.ph789e-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ph789e-spacing-sm);
  margin-bottom: var(--ph789e-spacing-lg);
}

.ph789e-footer-links a {
  padding: 6px 12px;
  font-size: 1.2rem;
  color: var(--ph789e-white);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.ph789e-footer-links a:hover {
  background: rgba(0, 188, 212, 0.2);
  color: var(--ph789e-primary);
}

.ph789e-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ph789e-spacing-sm);
  margin-bottom: var(--ph789e-spacing-lg);
}

.ph789e-partners img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: grayscale(100%) brightness(200%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.ph789e-partners img:hover {
  filter: grayscale(0%) brightness(100%);
  opacity: 1;
}

.ph789e-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: var(--ph789e-gray);
}

/* ===== Bottom Navigation ===== */
.ph789e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ph789e-bottom-nav-height);
  background: linear-gradient(180deg, var(--ph789e-darker) 0%, var(--ph789e-dark) 100%);
  border-top: 1px solid rgba(0, 188, 212, 0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.ph789e-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  padding: 6px;
  color: var(--ph789e-gray);
  transition: all 0.3s ease;
  text-decoration: none;
}

.ph789e-bottom-nav a:hover,
.ph789e-bottom-nav a.ph789e-active {
  color: var(--ph789e-primary);
}

.ph789e-bottom-nav a.ph789e-active {
  background: rgba(0, 188, 212, 0.1);
}

.ph789e-bottom-nav i {
  font-size: 24px;
  margin-bottom: 2px;
}

.ph789e-bottom-nav span {
  font-size: 10px;
  font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .ph789e-bottom-nav {
    display: none;
  }

  .ph789e-main {
    padding-bottom: 40px;
  }
}

/* ===== Utility Classes ===== */
.ph789e-text-center {
  text-align: center;
}

.ph789e-text-gradient {
  background: linear-gradient(135deg, var(--ph789e-primary) 0%, var(--ph789e-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ph789e-mt-sm { margin-top: var(--ph789e-spacing-sm); }
.ph789e-mb-sm { margin-bottom: var(--ph789e-spacing-sm); }
.ph789e-mt-md { margin-top: var(--ph789e-spacing-md); }
.ph789e-mb-md { margin-bottom: var(--ph789e-spacing-md); }

.ph789e-p-sm { padding: var(--ph789e-spacing-sm); }
.ph789e-p-md { padding: var(--ph789e-spacing-md); }
