/* ============================================================
   SR 88 - Common Stylesheet
   All custom classes use the "ga40-" prefix to keep the
   namespace isolated from other libraries.
   Palette: #BAE1FF | #34495E | #FF9500 | #FFCCCB
   ============================================================ */

:root {
  --ga40-primary: #FF9500;     /* accent / CTA */
  --ga40-bg: #34495E;          /* dark background */
  --ga40-bg-2: #2c3e50;        /* darker section bg */
  --ga40-bg-3: #3b5163;        /* card bg */
  --ga40-text: #BAE1FF;        /* light text */
  --ga40-text-soft: #d8eaf9;
  --ga40-pink: #FFCCCB;        /* soft highlight */
  --ga40-white: #ffffff;
  --ga40-muted: #9fb2c4;
  --ga40-radius: 12px;
  --ga40-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

/* ---------- Base reset ---------- */
* { box-sizing: border-box; }
html { font-size: 62.5%; }     /* 1rem = 10px */
body {
  margin: 0;
  padding: 0;
  background: var(--ga40-bg);
  color: var(--ga40-text);
  font-family: "Be Vietnam", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5rem * 1;     /* 1.5rem */
  line-height: 2.4rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ga40-primary); text-decoration: none; }

/* ---------- Layout core (mobile-first, max-width 430px) ---------- */
.ga40-wrapper {
  width: 100%;
  max-width: 430px;            /* MANDATORY literal for validator */
  margin: 0 auto;
  background: var(--ga40-bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.ga40-container {
  width: 100%;
  padding: 0 1.4rem;
}
main.ga40-main {
  padding-top: 6.2rem;
  padding-bottom: 1.5rem;
}

/* ---------- Header / top navigation ---------- */
.ga40-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--ga40-bg-2);
  border-bottom: 2px solid var(--ga40-primary);
  box-shadow: var(--ga40-shadow);
}
.ga40-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  height: 6rem;
}
.ga40-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ga40-text);
  font-weight: 800;
  font-size: 1.7rem;
}
.ga40-logo img { width: 30px; height: 30px; border-radius: 6px; }
.ga40-logo span b { color: var(--ga40-primary); }

.ga40-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ga40-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
  min-height: 4rem;
  text-decoration: none;
}
.ga40-btn:active { transform: scale(0.95); }
.ga40-btn-register {
  background: var(--ga40-primary);
  color: #1a1a1a;
}
.ga40-btn-login {
  background: transparent;
  color: var(--ga40-text);
  border: 1.5px solid var(--ga40-text);
}
.ga40-menu-toggle {
  background: transparent;
  border: none;
  color: var(--ga40-text);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
}

/* Expandable navigation menu */
.ga40-mobile-menu {
  max-width: 430px;
  margin: 0 auto;
  background: var(--ga40-bg-2);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  border-top: 1px solid rgba(186, 225, 255, .15);
}
.ga40-mobile-menu.ga40-menu-open { max-height: 540px; }
.ga40-mobile-menu ul { list-style: none; margin: 0; padding: 0.4rem 0; }
.ga40-mobile-menu li a {
  display: block;
  padding: 1.05rem 1.6rem;
  color: var(--ga40-text-soft);
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(186, 225, 255, .08);
}
.ga40-mobile-menu li a:active { background: rgba(255, 149, 0, .12); }

/* ---------- Hero carousel ---------- */
.ga40-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--ga40-radius);
  overflow: hidden;
  margin: 1.2rem 0;
  box-shadow: var(--ga40-shadow);
}
.ga40-slide {
  display: none;
  cursor: pointer;
}
.ga40-slide.ga40-slide-active { display: block; }
.ga40-slide img { width: 100%; height: 200px; object-fit: cover; }
.ga40-dots {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.ga40-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}
.ga40-dot.ga40-dot-active { background: var(--ga40-primary); }

/* ---------- Sections & titles ---------- */
.ga40-section { padding: 1.6rem 0; }
.ga40-section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ga40-text);
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--ga40-primary);
}
.ga40-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ga40-white);
  margin: 1rem 0 0.6rem;
  line-height: 3rem;
}
.ga40-lead {
  font-size: 1.45rem;
  color: var(--ga40-text-soft);
  margin-bottom: 1rem;
}

/* ---------- Game grid ---------- */
.ga40-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.ga40-game-card {
  background: var(--ga40-bg-3);
  border-radius: var(--ga40-radius);
  padding: 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease;
  border: 1px solid rgba(186, 225, 255, .08);
}
.ga40-game-card:active { transform: scale(0.95); }
.ga40-game-card img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.4rem;
}
.ga40-game-name {
  font-size: 1.15rem;
  color: var(--ga40-text);
  font-weight: 600;
  line-height: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ga40-cat-label {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ga40-bg);
  background: var(--ga40-pink);
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* ---------- Cards & misc components ---------- */
.ga40-card {
  background: var(--ga40-bg-3);
  border-radius: var(--ga40-radius);
  padding: 1.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--ga40-shadow);
}
.ga40-card h2 { font-size: 1.7rem; color: var(--ga40-primary); margin: 0 0 0.6rem; }
.ga40-card h3 { font-size: 1.4rem; color: var(--ga40-text); margin: 0.8rem 0 0.4rem; }
.ga40-card p { margin: 0 0 0.7rem; color: var(--ga40-text-soft); }
.ga40-promo-link {
  color: var(--ga40-primary);
  font-weight: 700;
  text-decoration: underline;
}
.ga40-cta {
  display: block;
  width: 100%;
  background: var(--ga40-primary);
  color: #1a1a1a;
  text-align: center;
  font-weight: 800;
  padding: 1.25rem;
  border-radius: 999px;
  font-size: 1.5rem;
  margin: 1rem 0;
}
.ga40-list { padding-left: 1.6rem; color: var(--ga40-text-soft); }
.ga40-list li { margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */
.ga40-footer {
  background: var(--ga40-bg-2);
  padding: 2rem 1.4rem;
  margin-top: 1.5rem;
  border-top: 2px solid var(--ga40-primary);
}
.ga40-footer p { color: var(--ga40-text-soft); font-size: 1.3rem; }
.ga40-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}
.ga40-footer-links a {
  background: var(--ga40-bg-3);
  color: var(--ga40-text);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 1.2rem;
}
.ga40-footer-copy { color: var(--ga40-muted); font-size: 1.15rem; margin-top: 0.8rem; }

/* ---------- Mobile bottom navigation (5 icons, fixed) ---------- */
.ga40-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  max-width: 430px;
  margin: 0 auto;
  background: var(--ga40-bg-2);
  border-top: 2px solid var(--ga40-primary);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 62px;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.3);
}
.ga40-navbtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--ga40-text-soft);
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.ga40-navbtn .material-icons,
.ga40-navbtn ion-icon,
.ga40-navbtn i { font-size: 24px; }
.ga40-navbtn:active { transform: scale(0.92); }
.ga40-navbtn-active { color: var(--ga40-primary); }

/* Mobile content clearance for bottom nav */
@media (max-width: 768px) {
  main.ga40-main { padding-bottom: 80px; }
  .ga40-footer { padding-bottom: 80px; }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .ga40-bottomnav { display: none; }
  main.ga40-main { padding-bottom: 2rem; }
  .ga40-footer { padding-bottom: 2rem; }
}

/* Desktop: widen wrapper but keep mobile design intact */
@media (min-width: 769px) {
  .ga40-wrapper { max-width: 430px; }
}
