/* ==========================================================================
   SS777 Grey Mobile App-Shell & UI Design System
   Target: Philippines (en-PH) - Mobile-First 430px Canvas
   ========================================================================== */

:root {
  --color-outer-bg: #1a1a1a;
  --color-app-bg: #2b2b2b;
  --color-surface: #333333;
  --color-surface-hover: #3d3d3d;
  --color-border: #404040;
  --color-border-subtle: #363636;

  --color-text-main: #f3f4f6;
  --color-text-muted: #9ca3af;
  --color-text-dim: #6b7280;

  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-accent-gold: #fbbf24;
  --color-success: #10b981;
  --color-danger: #ef4444;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --app-max-width: 430px;
  --header-height: 58px;
  --bottom-nav-height: 62px;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--color-outer-bg);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-outer-bg);
  color: var(--color-text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* Centered 430px Mobile App Shell Container */
.app-shell {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  background-color: var(--color-app-bg);
  color: var(--color-text-main);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.85);
  padding-bottom: var(--bottom-nav-height);
  overflow-x: hidden;
}

/* Header Component */
.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #222222;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  backdrop-filter: blur(8px);
}

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

.header-logo {
  height: 34px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-cashier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #111827;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-header-cashier:active {
  transform: scale(0.96);
  filter: brightness(0.9);
}

/* ==========================================================================
   Hero Auto-Slider (Critical CSS Inlined)
   ========================================================================== */
.hero-slide {
  display: none !important;
}

.hero-slide.active {
  display: block !important;
}

.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 230px;
  overflow: hidden;
  background: #181818;
  touch-action: pan-y;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

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

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(27, 27, 27, 0.2) 0%,
    rgba(27, 27, 27, 0.6) 50%,
    rgba(43, 43, 43, 0.95) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px 24px;
}

.hero-slide-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.hero-slide h2 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-slide-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  background: var(--color-accent);
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

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

.dot.active {
  width: 22px;
  border-radius: 4px;
  background: var(--color-accent-gold);
}

/* ==========================================================================
   Live Win Ticker (Horizontal Marquee)
   ========================================================================== */
.win-ticker {
  background: #202020;
  border-top: 1px solid #363636;
  border-bottom: 1px solid #363636;
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 10px;
  height: 100%;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
}

.ticker-track {
  display: flex;
  overflow: hidden;
  width: 100%;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
  padding-left: 12px;
}

.ticker-track:hover .ticker-content {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #d1d5db;
}

.ticker-user {
  color: #9ca3af;
  font-family: monospace;
}

.ticker-win {
  color: #34d399;
  font-weight: 700;
}

.ticker-game {
  color: #fbbf24;
  font-weight: 600;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Sticky Bottom Navigation (5 English Icons)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: var(--bottom-nav-height);
  background: #1e1e1e;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 150;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 600;
  gap: 3px;
  transition: color 0.15s ease;
  user-select: none;
}

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

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

.nav-tab.active svg {
  transform: translateY(-2px);
  stroke: var(--color-accent-gold);
}

.nav-tab.cta-tab {
  color: #f59e0b;
}

/* ==========================================================================
   Content Layout & Compliance Elements
   ========================================================================== */
.main-content {
  padding: 16px 14px;
  flex: 1;
}

/* H1 Main Heading */
h1.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  margin: 12px 0 10px 0;
}

/* Supporting H2 */
h2.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent-gold);
  margin: 22px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

p.body-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #d1d5db;
  margin-bottom: 12px;
}

/* Game Placecard Grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0 22px 0;
}

.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.game-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

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

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

.game-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.game-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

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

.game-card-btn {
  margin-top: auto;
  display: block;
  text-align: center;
  background: var(--color-accent);
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.game-card-btn:hover {
  background: var(--color-accent-hover);
}

/* FAQ Accordion Component */
.accordion {
  margin: 14px 0 24px 0;
}

.accordion-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #f3f4f6;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.accordion-icon {
  font-size: 0.9rem;
  color: var(--color-accent-gold);
  transition: transform 0.2s;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 0 14px 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #d1d5db;
}

.accordion-item.active .accordion-body {
  display: block;
}

/* Responsible Gaming 21+ Footer */
.rg-footer {
  background: #1c1c1c;
  border-top: 1px solid var(--color-border);
  padding: 20px 14px;
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-align: center;
}

.rg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #33261a;
  color: #fbbf24;
  border: 1px solid #784719;
  border-radius: 9999px;
  padding: 4px 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.rg-text {
  line-height: 1.45;
  margin-bottom: 12px;
}

.rg-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.rg-links a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* Age Gate Modal */
.age-gate-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.age-gate-card {
  background: #262626;
  border: 1px solid #404040;
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  color: #f3f4f6;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.age-gate-badge {
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.age-gate-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 8px;
}

.age-gate-desc {
  font-size: 0.8125rem;
  color: #9ca3af;
  line-height: 1.45;
  margin-bottom: 20px;
}

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

.btn-confirm-age {
  flex: 1;
  background: #f59e0b;
  color: #111827;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-exit-age {
  flex: 1;
  background: #333333;
  color: #9ca3af;
  border: 1px solid #454545;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
