/* ============================================================
   Nino Game - Core Layout Stylesheet (layout-c12d.css)
   All custom classes use the "g2d9-" prefix to isolate scope.
   Mobile-first design, max 430px viewport, rem units (root 62.5%).
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --g2d9-bg: #0A0A0A;
  --g2d9-primary: #FFB347;
  --g2d9-muted: #A9A9A9;
  --g2d9-accent: #DEB887;
  --g2d9-surface: #141414;
  --g2d9-surface-2: #1E1A14;
  --g2d9-border: rgba(255, 179, 71, 0.18);
  --g2d9-text: #F5EFE6;
  --g2d9-text-dim: #B8B0A4;
  --g2d9-danger: #E45A5A;
  --g2d9-success: #5BC07A;
  --g2d9-radius: 1.2rem;
  --g2d9-radius-sm: 0.8rem;
  --g2d9-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.55);
  --g2d9-glow: 0 0 1.4rem rgba(255, 179, 71, 0.45);
  --g2d9-transition: 0.25s ease;
  --g2d9-header-h: 6rem;
  --g2d9-nav-h: 6.4rem;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  background: var(--g2d9-bg);
  color: var(--g2d9-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--g2d9-primary); text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Layout Containers ---------- */
.g2d9-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}
.g2d9-wrapper { padding-top: var(--g2d9-header-h); padding-bottom: 2rem; }
.g2d9-section {
  padding: 2.4rem 0 1.6rem;
  border-bottom: 0.1rem dashed var(--g2d9-border);
}
.g2d9-section:last-child { border-bottom: none; }

/* ---------- Header / Top Navigation ---------- */
.g2d9-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0c0c0c 0%, #0A0A0A 100%);
  border-bottom: 0.1rem solid var(--g2d9-border);
  box-shadow: var(--g2d9-shadow);
}
.g2d9-header-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  height: var(--g2d9-header-h);
}
.g2d9-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.g2d9-brand img {
  width: 2.8rem; height: 2.8rem;
  border-radius: 0.6rem;
  border: 0.1rem solid var(--g2d9-primary);
}
.g2d9-brand-text {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--g2d9-primary);
  letter-spacing: 0.02rem;
  white-space: nowrap;
}
.g2d9-brand-text span { color: var(--g2d9-accent); }

.g2d9-header-actions { display: flex; gap: 0.6rem; align-items: center; }
.g2d9-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.6rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--g2d9-transition);
  font-family: inherit;
}
.g2d9-btn-primary {
  background: linear-gradient(135deg, #FFB347 0%, #DEB887 100%);
  color: #1a1208;
  box-shadow: var(--g2d9-glow);
}
.g2d9-btn-primary:hover { transform: translateY(-0.1rem); filter: brightness(1.08); }
.g2d9-btn-ghost {
  background: transparent;
  color: var(--g2d9-text);
  border: 0.1rem solid var(--g2d9-border);
}
.g2d9-btn-ghost:hover { border-color: var(--g2d9-primary); color: var(--g2d9-primary); }
.g2d9-btn-block { display: flex; width: 100%; padding: 1.2rem; font-size: 1.5rem; }
.g2d9-btn-lg { min-height: 4.6rem; font-size: 1.5rem; }

.g2d9-menu-toggle {
  width: 3.6rem; height: 3.6rem;
  background: transparent;
  border: 0.1rem solid var(--g2d9-border);
  border-radius: 0.8rem;
  color: var(--g2d9-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ---------- Expandable Navigation Menu ---------- */
.g2d9-nav {
  max-width: 430px;
  margin: 0 auto;
  background: var(--g2d9-surface);
  border-bottom: 0.1rem solid var(--g2d9-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.g2d9-nav.g2d9-open { max-height: 60rem; }
.g2d9-nav-list {
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.g2d9-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--g2d9-surface-2);
  border: 0.1rem solid var(--g2d9-border);
  border-radius: var(--g2d9-radius-sm);
  color: var(--g2d9-text);
  font-size: 1.3rem;
  font-weight: 600;
  min-height: 4.4rem;
  transition: var(--g2d9-transition);
}
.g2d9-nav-link:hover { border-color: var(--g2d9-primary); color: var(--g2d9-primary); }
.g2d9-nav-link i { color: var(--g2d9-accent); font-size: 1.6rem; }

/* ---------- Hero / Carousel ---------- */
.g2d9-carousel {
  position: relative;
  border-radius: var(--g2d9-radius);
  overflow: hidden;
  margin: 1.6rem 0;
  box-shadow: var(--g2d9-shadow);
  border: 0.1rem solid var(--g2d9-border);
}
.g2d9-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.g2d9-carousel-slide {
  min-width: 100%;
  position: relative;
}
.g2d9-carousel-slide img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
}
.g2d9-carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(10,10,10,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
}
.g2d9-carousel-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--g2d9-primary);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.g2d9-carousel-sub {
  font-size: 1.2rem;
  color: var(--g2d9-text);
  margin-bottom: 1rem;
}
.g2d9-carousel-dots {
  position: absolute;
  bottom: 0.8rem;
  right: 1.2rem;
  display: flex;
  gap: 0.4rem;
}
.g2d9-carousel-dot {
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
}
.g2d9-carousel-dot.g2d9-active { background: var(--g2d9-primary); width: 1.6rem; border-radius: 0.4rem; }

/* ---------- Section Titles ---------- */
.g2d9-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.g2d9-section-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--g2d9-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.g2d9-section-title i { color: var(--g2d9-accent); font-size: 1.8rem; }
.g2d9-section-more { font-size: 1.2rem; color: var(--g2d9-muted); }

/* ---------- Game Grid ---------- */
.g2d9-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.g2d9-grid-4 { grid-template-columns: repeat(4, 1fr); }
.g2d9-game-card {
  background: var(--g2d9-surface);
  border: 0.1rem solid var(--g2d9-border);
  border-radius: var(--g2d9-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--g2d9-transition);
  position: relative;
}
.g2d9-game-card:hover {
  transform: translateY(-0.2rem);
  border-color: var(--g2d9-primary);
  box-shadow: var(--g2d9-glow);
}
.g2d9-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  object-fit: cover;
}
.g2d9-game-name {
  padding: 0.5rem;
  font-size: 1.1rem;
  color: var(--g2d9-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.g2d9-game-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: var(--g2d9-primary);
  color: #1a1208;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 0.4rem;
}

/* ---------- Category Tabs (static labels) ---------- */
.g2d9-cat-label {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--g2d9-accent);
  margin: 1.8rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 0.3rem solid var(--g2d9-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.g2d9-cat-label small { color: var(--g2d9-muted); font-weight: 500; font-size: 1.1rem; }

/* ---------- Cards / Info Blocks ---------- */
.g2d9-card {
  background: var(--g2d9-surface);
  border: 0.1rem solid var(--g2d9-border);
  border-radius: var(--g2d9-radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}
.g2d9-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--g2d9-primary);
  margin-bottom: 0.8rem;
}
.g2d9-card p {
  color: var(--g2d9-text-dim);
  font-size: 1.25rem;
  line-height: 1.7rem;
  margin-bottom: 0.8rem;
}
.g2d9-card p strong { color: var(--g2d9-accent); font-weight: 700; }
.g2d9-card a { color: var(--g2d9-primary); font-weight: 700; }
.g2d9-card a:hover { text-decoration: underline; }

.g2d9-promo-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--g2d9-primary);
  font-weight: 800;
  background: rgba(255, 179, 71, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  cursor: pointer;
}
.g2d9-promo-inline:hover { background: rgba(255, 179, 71, 0.25); }

/* ---------- Lists ---------- */
.g2d9-list { display: flex; flex-direction: column; gap: 0.8rem; }
.g2d9-list-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.8rem;
  background: var(--g2d9-surface-2);
  border-radius: var(--g2d9-radius-sm);
  font-size: 1.25rem;
  color: var(--g2d9-text-dim);
  line-height: 1.6rem;
}
.g2d9-list-item i { color: var(--g2d9-primary); font-size: 1.5rem; margin-top: 0.1rem; flex-shrink: 0; }
.g2d9-list-item strong { color: var(--g2d9-text); }

/* ---------- Stats Grid ---------- */
.g2d9-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.g2d9-stat {
  background: var(--g2d9-surface-2);
  border-radius: var(--g2d9-radius-sm);
  padding: 1rem;
  text-align: center;
  border: 0.1rem solid var(--g2d9-border);
}
.g2d9-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--g2d9-primary);
}
.g2d9-stat-label {
  font-size: 1.1rem;
  color: var(--g2d9-muted);
  margin-top: 0.2rem;
}

/* ---------- Testimonials ---------- */
.g2d9-testimonial {
  background: var(--g2d9-surface-2);
  border-left: 0.3rem solid var(--g2d9-primary);
  padding: 1rem;
  border-radius: 0.6rem;
  margin-bottom: 0.8rem;
}
.g2d9-testimonial-text { font-size: 1.25rem; color: var(--g2d9-text); line-height: 1.7rem; font-style: italic; }
.g2d9-testimonial-author { font-size: 1.1rem; color: var(--g2d9-accent); margin-top: 0.6rem; font-weight: 700; }

/* ---------- Payment icons ---------- */
.g2d9-pay-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.g2d9-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--g2d9-surface-2);
  border: 0.1rem solid var(--g2d9-border);
  border-radius: 2rem;
  font-size: 1.2rem;
  color: var(--g2d9-text);
}
.g2d9-pay-chip i { color: var(--g2d9-primary); }

/* ---------- Winners Marquee ---------- */
.g2d9-winner {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-bottom: 0.1rem dashed var(--g2d9-border);
  font-size: 1.2rem;
}
.g2d9-winner:last-child { border-bottom: none; }
.g2d9-winner-name { color: var(--g2d9-text); font-weight: 600; }
.g2d9-winner-amount { color: var(--g2d9-success); font-weight: 800; }

/* ---------- H1 Title ---------- */
.g2d9-h1 {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--g2d9-primary);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.g2d9-h1 small { display: block; font-size: 1.2rem; color: var(--g2d9-muted); font-weight: 500; margin-top: 0.4rem; }
.g2d9-lead { font-size: 1.3rem; color: var(--g2d9-text-dim); line-height: 1.7rem; margin-bottom: 1.2rem; }

/* ---------- Footer ---------- */
.g2d9-footer {
  margin-top: 2rem;
  padding: 2rem 0 1rem;
  background: var(--g2d9-surface);
  border-top: 0.1rem solid var(--g2d9-border);
}
.g2d9-footer-brand {
  font-size: 1.3rem;
  color: var(--g2d9-text-dim);
  line-height: 1.7rem;
  margin-bottom: 1.2rem;
}
.g2d9-footer-promos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.g2d9-footer-promos .g2d9-btn { padding: 0.8rem; font-size: 1.2rem; min-height: 3.2rem; }
.g2d9-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.g2d9-footer-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem;
  background: var(--g2d9-surface-2);
  border-radius: 0.6rem;
  font-size: 1.15rem;
  color: var(--g2d9-text-dim);
  border: 0.1rem solid var(--g2d9-border);
}
.g2d9-footer-links a:hover { color: var(--g2d9-primary); border-color: var(--g2d9-primary); }
.g2d9-footer-links a i { color: var(--g2d9-accent); }
.g2d9-copyright {
  text-align: center;
  font-size: 1.1rem;
  color: var(--g2d9-muted);
  padding-top: 1rem;
  border-top: 0.1rem dashed var(--g2d9-border);
}

/* ---------- Mobile Bottom Navigation ---------- */
.g2d9-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--g2d9-nav-h);
  background: linear-gradient(180deg, #111 0%, #060606 100%);
  border-top: 0.15rem solid var(--g2d9-primary);
  box-shadow: 0 -0.4rem 1.4rem rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
}
.g2d9-bottom-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--g2d9-text-dim);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 6rem;
  min-height: 6rem;
  padding: 0.4rem;
  position: relative;
  transition: var(--g2d9-transition);
}
.g2d9-bottom-btn i { font-size: 2.2rem; line-height: 1; }
.g2d9-bottom-btn .material-icons-outlined,
.g2d9-bottom-btn .material-icons { font-size: 2.2rem; }
.g2d9-bottom-btn:hover,
.g2d9-bottom-btn.g2d9-active {
  color: var(--g2d9-primary);
}
.g2d9-bottom-btn.g2d9-active::before {
  content: "";
  position: absolute;
  top: 0; left: 25%;
  width: 50%;
  height: 0.25rem;
  background: var(--g2d9-primary);
  border-radius: 0 0 0.4rem 0.4rem;
}
.g2d9-bottom-btn:active { transform: scale(0.92); }
.g2d9-bottom-btn.g2d9-center {
  background: linear-gradient(135deg, #FFB347, #DEB887);
  color: #1a1208;
  border-radius: 50%;
  width: 4.6rem;
  height: 4.6rem;
  margin-top: -1.4rem;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  box-shadow: var(--g2d9-glow);
  border: 0.2rem solid #0A0A0A;
}
.g2d9-bottom-btn.g2d9-center i { font-size: 2.2rem; color: #1a1208; }

/* ---------- Helpers ---------- */
.g2d9-text-center { text-align: center; }
.g2d9-mt-1 { margin-top: 0.8rem; }
.g2d9-mt-2 { margin-top: 1.6rem; }
.g2d9-hidden { display: none !important; }

/* ---------- Desktop Adjustments ---------- */
@media (min-width: 769px) {
  .g2d9-bottom-nav { display: none; }
  .g2d9-container { max-width: 430px; }
}

/* Mobile content clearance for bottom nav */
@media (max-width: 768px) {
  main.g2d9-main,
  .g2d9-wrapper {
    padding-bottom: calc(var(--g2d9-nav-h) + 1.2rem);
  }
}

/* Focus visibility for accessibility */
.g2d9-btn:focus-visible,
.g2d9-nav-link:focus-visible,
.g2d9-bottom-btn:focus-visible,
.g2d9-game-card:focus-visible {
  outline: 0.2rem solid var(--g2d9-primary);
  outline-offset: 0.2rem;
}
