/* ==========================================================================
   PH222 CASINO DESIGN SYSTEM — MOBILE APP SHELL & UI ARCHITECTURE
   Reverse-Engineered from jl-bet.ph & official ph222.org
   ========================================================================== */

:root {
  /* Brand Tokens */
  --primary: #FFC107;
  --primary-hover: #E6AC00;
  --primary-gradient: linear-gradient(135deg, #FBF151 0%, #FCAA09 100%);
  --brand-blue: #019EFB;
  --brand-blue-gradient: linear-gradient(135deg, #019EFB 0%, #369BE9 100%);
  
  /* Accent Tokens */
  --accent: #38EF7D;
  --accent-hover: #2ED56D;
  --accent-gradient: linear-gradient(135deg, #11998E 0%, #38EF7D 100%);
  --accent-hot: #FF3366;
  --accent-gold: #F7C163;

  /* Surfaces & Backgrounds */
  --bg: #0B132B;
  --bg-outer: #1a1a1a;
  --surface: #1E2942;
  --surface-header: rgba(22, 31, 56, 0.95);
  --surface-card: #1E2942;
  --surface-elevated: #253352;
  --surface-bottom-nav: rgba(13, 21, 48, 0.96);
  --surface-footer: #0A0F24;

  /* Text & Contrast */
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-gold: #FFC107;
  --text-cyan: #019EFB;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(255, 193, 7, 0.35);
  --border-blue: rgba(1, 158, 251, 0.35);

  /* Radius Tokens */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-card: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-gold: 0 4px 18px rgba(255, 193, 7, 0.35);
  --shadow-glow: 0 0 15px rgba(1, 158, 251, 0.3);

  /* Typography Scale */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-outer);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   1. MOBILE APP SHELL LAYOUT
   Desktop: Centered viewport container max-width: 430px (.app-shell)
   Native Mobile: 100% viewport width
   ========================================================================== */
.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background-color: var(--bg);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  padding-bottom: 74px; /* Space for fixed bottom-nav */
}

@media (max-width: 430px) {
  .app-shell {
    max-width: 100%;
    box-shadow: none;
  }
}

/* ==========================================================================
   2. STICKY HEADER (.hdr)
   Official PH222 Logo (Left) + Quick Login & Register Buttons (Right)
   ========================================================================== */
.hdr {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  background: var(--surface-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  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;
  display: block;
  object-fit: contain;
}

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

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-login {
  background: transparent;
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover, .btn-login:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 193, 7, 0.08);
}

.btn-register {
  background: var(--primary-gradient);
  color: #0B132B;
  border: none;
  box-shadow: 0 2px 8px rgba(251, 241, 81, 0.25);
}

.btn-register:hover, .btn-register:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 241, 81, 0.4);
}

/* ==========================================================================
   NOTIFICATION & DISCLAIMER PILL BADGES
   Strict constraint: Rendered strictly with <div class="pill-badge"> or <p>,
   zero heading tags!
   ========================================================================== */
.badge-stream {
  padding: 10px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pill-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  line-height: 1.4;
  font-weight: 600;
}

.notification-pill {
  background: rgba(1, 158, 251, 0.12);
  border: 1px solid var(--border-blue);
  color: #B3E1FF;
}

.notification-pill .icon-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.disclaimer-badge {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
}

.disclaimer-badge .age-tag {
  background: var(--accent-hot);
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

/* ==========================================================================
   HERO BANNER CAROUSEL
   ========================================================================== */
.hero-carousel {
  position: relative;
  width: 100%;
  padding: 0 14px 12px;
}

.hero-slider-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 430 / 240;
  background: #141C30;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
  position: relative;
}

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

.carousel-indicators {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 18px;
  border-radius: 4px;
  background: var(--primary);
}

/* ==========================================================================
   QUICK SUMMARY BOX (Benchmark Blueprint Layout)
   ========================================================================== */
.summary-container {
  padding: 0 14px 14px;
}

.quick-summary-box {
  background: rgba(255, 193, 7, 0.05);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  padding: 14px;
  font-size: var(--text-sm);
  color: #E2E8F0;
  line-height: 1.5;
}

.quick-summary-box strong {
  color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   TRUST BADGES ROW
   ========================================================================== */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 14px 16px;
}

.trust-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.trust-item-icon {
  font-size: 18px;
}

.trust-item-title {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

.trust-item-desc {
  font-size: 10px;
  color: var(--text-secondary);
}

/* ==========================================================================
   SECTION HEADER (H2)
   ========================================================================== */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 10px;
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title span.accent {
  color: var(--primary);
}

.section-link {
  font-size: var(--text-xs);
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}

.section-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   3. INTERACTIVE 3x2 GAME GRIDS
   Responsive 3x2 game placecard cards with dual-button overlays:
   - Primary Gold Button: "Play" -> Promo Link
   - Outline Button: "Guide" -> Internal Spoke URL
   ========================================================================== */
.game-grid-container {
  padding: 0 14px 20px;
}

.game-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.game-card:hover, .game-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #151D33;
  overflow: hidden;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-img {
  transform: scale(1.06);
}

.game-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-gold);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  z-index: 2;
}

.game-card-provider {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(1, 158, 251, 0.2);
  border: 1px solid var(--border-blue);
  color: #B3E1FF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  z-index: 2;
}

.game-card-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.game-rtp {
  color: var(--accent);
  font-weight: 700;
}

/* Dual-Button Overlay / Action Bar */
.game-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.btn-game-play {
  background: var(--primary-gradient);
  color: #0B132B;
  font-size: 11px;
  font-weight: 700;
  height: 30px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  border: none;
  box-shadow: 0 2px 6px rgba(251, 241, 81, 0.25);
  transition: all 0.2s ease;
}

.btn-game-play:hover, .btn-game-play:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-game-guide {
  background: transparent;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  height: 30px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.btn-game-guide:hover, .btn-game-guide:focus-visible {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: rgba(1, 158, 251, 0.08);
}

/* ==========================================================================
   4. FIXED BOTTOM NAVIGATION BAR (.bottom-nav)
   5 mobile touch tabs: Home, Games, Bonuses, GCash, App
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 64px;
  background: var(--surface-bottom-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 430px) {
  .bottom-nav {
    max-width: 100%;
    left: 0;
    transform: none;
  }
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.nav-tab svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

.nav-tab:hover, .nav-tab:focus-visible {
  color: #FFFFFF;
}

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

.nav-tab.active svg {
  transform: scale(1.1);
  stroke: var(--primary);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 28px;
  height: 2px;
  background: var(--primary);
  border-radius: 0 0 2px 2px;
}

/* Middle CTA Tab Accent */
.nav-tab.tab-highlight {
  color: #FFFFFF;
}

.nav-tab.tab-highlight .tab-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B132B;
  box-shadow: 0 2px 10px rgba(251, 241, 81, 0.4);
  margin-top: -12px;
}

/* ==========================================================================
   RESPONSIBLE GAMING 21+ FOOTER (Compliance Rulebook)
   Strict: Zero PAGCOR license numbers!
   ========================================================================== */
.footer-compliance {
  background: var(--surface-footer);
  border-top: 1px solid var(--border-subtle);
  padding: 24px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-rg-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 51, 102, 0.08);
  border: 1px solid rgba(255, 51, 102, 0.2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.rg-icon-21 {
  background: var(--accent-hot);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.rg-title-text {
  font-size: 11px;
  color: #F87171;
  font-weight: 600;
  line-height: 1.4;
}

.rg-disclaimer-paragraph {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.footer-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
}

.footer-nav-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-copyright {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 4px;
}

/* ==========================================================================
   AGE-GATE MODAL (21+ Strict Compliance)
   ========================================================================== */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.age-gate-card {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

.age-gate-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.age-gate-card h2,
.age-gate-card .age-gate-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.age-gate-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-gate-btn-confirm {
  background: var(--primary-gradient);
  color: #0B132B;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-gold);
}

.age-gate-btn-exit {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-size: var(--text-sm);
}

/* Page Hero Banner Component */
.page-hero-banner {
  position: relative;
  margin: 12px 0 16px;
  border-radius: var(--radius-card, 12px);
  overflow: hidden;
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.page-hero-img {
  width: 100%;
  height: auto;
  max-height: 240px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.page-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(11, 19, 43, 0.95) 0%, rgba(11, 19, 43, 0.5) 60%, transparent 100%);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-hero-tag {
  display: inline-block;
  background: var(--primary, #f5a623);
  color: #0b132b;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-hero-caption {
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

