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

:root {
  --gold: #f4c542;
  --gold2: #e6a800;
  --dark: #0a0f1a;
  --dark2: #111827;
  --card-bg: #1a2535;
  --red: #e53e3e;
  --green: #1a4731;
}

html, body {
  width: 100%; min-height: 100vh;
  background: var(--dark);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #fff;
  overflow-x: hidden;
}

/* ── Policy Overlay ────────────────────────────────── */
#policy-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.policy-box {
  background: #1a2535;
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 32px 28px;
  max-width: 440px; width: 100%;
  box-shadow: 0 0 60px rgba(244,197,66,.25);
  animation: fadeUp .4s ease;
}

.policy-box .icon { text-align: center; font-size: 48px; margin-bottom: 12px; }
.policy-box h2 { text-align: center; color: var(--gold); font-size: 20px; margin-bottom: 14px; }
.policy-box p { color: #aabfd0; font-size: 13px; line-height: 1.7; margin-bottom: 22px; }
.policy-box .badge {
  display: flex; align-items: center; gap: 10px;
  background: #0f1923; border-radius: 10px; padding: 10px 14px;
  margin-bottom: 24px; font-size: 12px; color: #4ade80;
  border: 1px solid #1a4731;
}
.policy-box .badge span { font-size: 22px; }

.btn-accept {
  display: block; width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #1a1a1a; font-size: 16px; font-weight: 700;
  border: none; border-radius: 10px; cursor: pointer;
  letter-spacing: .5px; transition: transform .15s, opacity .15s;
  font-family: 'Poppins', sans-serif;
}
.btn-accept:active { transform: scale(.97); }

/* ── Main App Screen ──────────────────────────────── */
#app { display: none; min-height: 100vh; }

/* Header */
.app-header {
  background: linear-gradient(135deg, #1a2535, #0f1923);
  padding: 16px 20px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #2e3f52;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

.app-header .logo {
  display: flex; align-items: center; gap: 12px;
}
.app-header .logo img {
  width: 40px; height: 40px; border-radius: 10px;
  border: 2px solid var(--gold);
}
.app-header .logo h1 {
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  font-size: 16px; color: var(--gold);
  letter-spacing: 1px; line-height: 1.2;
}
.app-header .logo small { color: #7a8fa6; font-size: 10px; display: block; }

/* Points badge */
.points-badge {
  background: linear-gradient(135deg, #1e3a0f, #2a5016);
  border: 1.5px solid #4caf50;
  border-radius: 20px; padding: 6px 14px;
  font-size: 14px; font-weight: 700; color: #4caf50;
  display: flex; align-items: center; gap: 6px;
}
.points-badge .coin { font-size: 18px; }

/* Banner */
#banner-ad {
  width: 100%; overflow: hidden;
  background: #111827;
  border-bottom: 1px solid #2e3f52;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 32px 20px 20px;
  background: radial-gradient(ellipse at 50% 0%, #1e3a1a 0%, transparent 70%);
}
.hero h2 {
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  font-size: 28px; color: var(--gold);
  text-shadow: 0 0 30px rgba(244,197,66,.5);
  margin-bottom: 6px;
}
.hero p { color: #7a8fa6; font-size: 13px; }

/* Games Grid */
.games-section { padding: 24px 16px; }
.section-title {
  font-size: 14px; color: #7a8fa6; text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: #2e3f52;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.game-card {
  background: linear-gradient(145deg, #1a2535, #141e2e);
  border: 1.5px solid #2e3f52;
  border-radius: 16px; padding: 20px 14px;
  text-align: center; cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  text-decoration: none; display: block;
  position: relative; overflow: hidden;
}
.game-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(244,197,66,.05));
  opacity: 0; transition: opacity .2s;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(244,197,66,.2); }
.game-card:hover::before { opacity: 1; }

.game-card .game-icon { font-size: 52px; margin-bottom: 12px; display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.game-card .game-name { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.game-card .game-tag {
  font-size: 10px; color: #4caf50; background: #1a4731;
  padding: 2px 8px; border-radius: 20px; display: inline-block;
}
.game-card.coming-soon { opacity: .55; cursor: default; }
.game-card.coming-soon:hover { transform: none; border-color: #2e3f52; box-shadow: none; }
.coming-badge {
  position: absolute; top: 10px; right: -18px; background: #7a8fa6;
  font-size: 9px; padding: 2px 22px; transform: rotate(30deg);
  color: #fff; letter-spacing: 1px; text-transform: uppercase;
}

.game-card .hot-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--red); color: #fff;
  font-size: 9px; padding: 2px 7px; border-radius: 20px;
  font-weight: 700; text-transform: uppercase;
}

/* Sponsor button */
#sponsor-btn {
  margin: 0 16px 20px;
  display: block;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1e2f4a, #152340);
  border: 1.5px solid #3a5a8a;
  border-radius: 12px;
  text-decoration: none;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color .2s, transform .15s;
}
#sponsor-btn:hover { border-color: #f4c542; transform: scale(1.01); }
#sponsor-btn .sp-left { display: flex; align-items: center; gap: 10px; }
#sponsor-btn .sp-icon { font-size: 28px; }
#sponsor-btn .sp-name { font-size: 13px; color: #7a8fa6; }
#sponsor-btn .sp-text { font-size: 15px; font-weight: 700; color: #fff; }
#sponsor-btn .sp-arrow { color: var(--gold); font-size: 20px; }

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1a2535;
  border-top: 1px solid #2e3f52;
  display: flex; justify-content: space-around; align-items: center;
  height: 56px; z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,.4);
}
.nav-item { display: flex; flex-direction: column; align-items: center;
  gap: 2px; cursor: pointer; padding: 8px 12px;
  color: #7a8fa6; transition: color .2s; text-decoration: none; }
.nav-item span { font-size: 20px; }
.nav-item small { font-size: 9px; letter-spacing: .5px; }
.nav-item.active, .nav-item:hover { color: var(--gold); }

.page-pad { padding-bottom: 70px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media(max-width: 380px) {
  .hero h2 { font-size: 22px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}
