:root {
  /* Color Tokens mapped from brand_palette.json */
  --primary: #FFB800;
  --primary-hover: #FFA000;
  --primary-glow: rgba(255, 184, 0, 0.35);
  
  --secondary: #00E676;
  --secondary-hover: #00C853;
  --secondary-glow: rgba(0, 230, 118, 0.4);

  --accent: #FF3D00;
  --danger: #EF4444;

  --bg: #0A0E1A;
  --surface: #121829;
  --surface-card: #182238;
  --surface-elevated: #1E2945;
  --surface-border: #1E293B;

  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-gold: #FFD700;

  /* Typography */
  --font-display: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Dimensions & Spacing */
  --shell-max-width: 430px;
  --header-height: 60px;
  --bottom-nav-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Base & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: #1a1a1a; /* Desktop outer neutral background */
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}

/* Mobile App Shell Layout */
.app-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  overflow-x: hidden;
}

/* Sticky Header (.hdr) */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.hdr-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.hdr-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn-login {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-border);
  background: var(--surface-elevated);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hdr-btn-login:hover {
  background: #273557;
}

.hdr-btn-register {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--secondary) 0%, #00B0FF 100%);
  color: #0A0E1A;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--secondary-glow);
  transition: all 0.2s ease;
}

.hdr-btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--secondary-glow);
}

/* Compliance Pill Badges & Notices (Zero heading tags) */
.pill-notice-bar {
  background: rgba(18, 24, 41, 0.95);
  border-bottom: 1px solid var(--surface-border);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

/* Mobile-First Breadcrumb Trail */
.breadcrumb-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 0 0 4px 0;
  line-height: 1.4;
}

.breadcrumb-trail a {
  color: #94A3B8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-trail a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.bc-sep {
  color: #475569;
  font-size: 12px;
  user-select: none;
}

.bc-current {
  color: var(--text-main);
  font-weight: 600;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1.4;
  white-space: nowrap;
}

.pill-badge-age {
  background: rgba(239, 68, 68, 0.16);
  color: #FF5252;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.pill-badge-verified {
  background: rgba(0, 230, 118, 0.14);
  color: var(--secondary);
  border: 1px solid rgba(0, 230, 118, 0.35);
  margin-left: auto;
}

.notice-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  margin: 0;
}

/* Main Content Layout */
.main-content {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Hero Carousel / Promo Banner */
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  aspect-ratio: 16 / 9;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.95) 0%, rgba(10, 14, 26, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  gap: 6px;
}

.hero-title {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 12px;
  color: var(--text-gold);
  font-weight: 600;
}

/* Quick Category Scrollbar */
.category-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-scroller::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  padding: 7px 14px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-chip.active, .cat-chip:hover {
  background: var(--surface-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

/* Section Header (Compliant: clean, functional) */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF;
}

.section-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Interactive 3x2 Game Grids */
.game-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.game-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 184, 0, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.game-card-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #0f1523;
  overflow: hidden;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-card-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid rgba(255, 184, 0, 0.5);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
}

/* Dual-Button Overlays */
.game-card-actions {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-card);
}

.game-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.btn-game-play {
  display: block;
  width: 100%;
  padding: 5px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #FF8C00 100%);
  color: #0A0E1A;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(255, 184, 0, 0.3);
  transition: all 0.15s ease;
}

.btn-game-play:hover {
  filter: brightness(1.1);
  transform: scale(0.98);
}

.btn-game-guide {
  display: block;
  width: 100%;
  padding: 4px 0;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface-border);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}

.btn-game-guide:hover {
  color: #FFFFFF;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Fast Payment Bar */
.payment-strip {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.payment-info {
  font-size: 11px;
  color: var(--text-muted);
}

.payment-info strong {
  color: var(--secondary);
}

/* E-E-A-T & Trust Section */
.trust-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trust-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Fixed Bottom Bar (.bottom-nav) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max-width);
  height: var(--bottom-nav-height);
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--surface-border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 100;
  padding: 0 4px;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  gap: 4px;
  padding: 6px 0;
  transition: all 0.2s ease;
}

.nav-tab svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-tab.active, .nav-tab:hover {
  color: var(--primary);
}

.nav-tab-promo {
  position: relative;
  margin-top: -16px;
}

.nav-tab-promo-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary) 0%, #00B0FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--secondary-glow);
  color: #0A0E1A;
  border: 3px solid var(--bg);
}

.nav-tab-promo-btn svg {
  width: 22px;
  height: 22px;
  fill: #0A0E1A;
}

.nav-tab-promo .nav-label {
  color: var(--secondary);
  font-weight: 700;
  margin-top: 2px;
}

/* Responsive adjustment for Mobile viewports */
@media (max-width: 430px) {
  html, body {
    background-color: var(--bg);
  }
  .app-shell {
    max-width: 100%;
    box-shadow: none;
  }
  .bottom-nav {
    max-width: 100%;
    left: 0;
    transform: none;
  }
}
