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

:root {
  --bg:       #080812;
  --surface:  #0f0f1e;
  --surface2: #16162a;
  --border:   #1e1e3a;
  --primary:  #7c3aed;
  --primary-h:#6d28d9;
  --accent:   #06b6d4;
  --success:  #10b981;
  --danger:   #ef4444;
  --text:     #e2e8f0;
  --muted:    #64748b;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: url('/studio-bg.jpg');
  background-size: cover;
  background-position: 60% 45%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* dark overlay so text stays readable over the photo */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(8,8,18,.72) 0%,
    rgba(8,8,18,.55) 40%,
    rgba(8,8,18,.80) 100%
  );
}

/* .stars div kept in HTML but hidden — no longer needed */
.stars { display: none; }

/* ── Screens ── */
.screen { position: relative; z-index: 1; min-height: 100vh; }
.screen.hidden, .hidden { display: none !important; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px;
  background: rgba(8,8,18,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-ball { font-size: 24px; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.points-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  color: #c4b5fd;
  font-size: 14px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
}
.profile-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.profile-btn:hover { background: var(--border); }

/* ── Profile menu ── */
.profile-menu {
  position: fixed; top: 68px; right: 24px; z-index: 200;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.pm-name  { font-weight: 700; font-size: 15px; }
.pm-email { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pm-hr    { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.pm-item  {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--danger); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 6px 0;
}
.pm-item:hover { opacity: .8; }

/* ── Hero ── */
.hero {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px);
  position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(124,58,237,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(6,182,212,.10) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  text-align: center; position: relative; z-index: 1;
  padding: 40px 24px; max-width: 560px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 24px;
  letter-spacing: .05em;
}
.hero-sub {
  font-size: 16px; color: #fff; margin-bottom: 40px; font-weight: 500;
}
.home-btns {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity .15s, transform .1s;
  border: none; text-decoration: none; white-space: nowrap;
}
.btn:hover  { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success  { background: var(--success); color: #fff; box-shadow: 0 0 18px rgba(16,185,129,.4); }
.btn-success:hover { background: #059669; }
.btn-outline  { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-accent   { background: var(--accent); color: #000; font-weight: 800; }
.btn-full     { width: 100%; margin-top: 8px; }

/* ── Modal overlay ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4,4,14,.82);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 16px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
.tc-check-row {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px; font-size: 13px; color: var(--muted);
}
.tc-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.tc-check-row label { cursor: pointer; line-height: 1.4; }
.tc-check-row a { color: var(--accent); text-decoration: none; font-weight: 600; }
.tc-check-row a:hover { text-decoration: underline; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px;
  width: 100%; max-width: 420px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  animation: slideUp .25s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes slideUp { from{transform:translateY(24px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); font-size: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); }
.modal-logo { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.modal-hint { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }
.modal-hint a { color: var(--accent); text-decoration: none; font-weight: 600; }
.modal-body { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }

/* ── Fields ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 14px;
  padding: 10px 14px; outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--primary); }
.opt { font-weight: 400; color: var(--muted); }

/* ── Alerts ── */
.alert-err {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5; font-size: 13px; font-weight: 600;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px;
}
.alert-ok {
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7; font-size: 13px; font-weight: 600;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px;
}

/* ── Success toast ── */
.success-toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid rgba(16,185,129,.4);
  color: #6ee7b7; font-size: 15px; font-weight: 700;
  padding: 16px 28px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  z-index: 400; animation: toastIn .35s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes toastIn { from{transform:translateX(-50%) translateY(-20px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }
.toast-icon { font-size: 20px; }

/* ── Section nav buttons ── */
.section-btns {
  display: flex; gap: 12px; justify-content: center;
  padding: 16px 24px;
}
.sbtn {
  flex: 1; max-width: 180px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--text); font-size: 14px; font-weight: 700;
  padding: 12px 8px; border-radius: 12px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.sbtn:hover { background: rgba(124,58,237,.25); border-color: rgba(124,58,237,.5); }

/* ── Section panels (full-page views) ── */
.section-panel { display: none; }
.section-panel.active { display: block; min-height: calc(100vh - 60px); }
.section-back-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: rgba(8,8,18,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 60px; z-index: 50;
}
.back-btn {
  background: var(--accent); border: none;
  color: #000; font-size: 20px; font-weight: 900;
  width: 40px; height: 40px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
  box-shadow: 0 2px 10px rgba(6,182,212,.4);
}
.back-btn:hover { opacity: .85; }
.section-title { font-size: 17px; font-weight: 800; }
.panel-inner { max-width: 720px; margin: 0 auto; padding: 32px 24px 64px; }
.panel-title { font-size: 20px; font-weight: 800; margin-bottom: 24px; }

/* ── Countdown card ── */
.countdown-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 32px;
  text-align: center;
  box-shadow: 0 0 60px rgba(124,58,237,.08);
}
.cc-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.cc-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.cc-time  { font-size: 14px; color: var(--muted); margin-bottom: 32px; }
.countdown { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.cd-unit  { display: flex; flex-direction: column; align-items: center; }
.cd-val   {
  font-size: clamp(48px, 10vw, 80px); font-weight: 900; line-height: 1;
  color: var(--primary);
  background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.2);
  border-radius: 12px; padding: 8px 16px; min-width: 80px;
}
.cd-lbl   { font-size: 10px; font-weight: 700; color: var(--muted); margin-top: 6px; letter-spacing: .12em; }
.cd-sep   { font-size: 40px; font-weight: 900; color: var(--primary); align-self: flex-start; margin-top: 12px; }
.cc-sub   { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

/* ── Draw cards ── */
.draw-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 24px;
  margin-bottom: 12px; transition: border-color .2s;
}
.draw-card:hover { border-color: var(--primary); }
.dc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dc-name   { font-size: 16px; font-weight: 700; }
.dc-time   { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.dc-prizes { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.dc-footer { display: flex; align-items: center; justify-content: space-between; }
.dc-cost   { font-size: 13px; color: var(--muted); }
.btn-sm    { padding: 7px 18px !important; font-size: 13px !important; }
.badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .06em;
}
.badge-scheduled { background: rgba(124,58,237,.15); color: #a78bfa; }
.badge-running   { background: rgba(16,185,129,.15);  color: #34d399; }
.badge-completed { background: rgba(100,116,139,.15); color: var(--muted); }

/* ── Bingo room panel ── */
.room-panel { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.room-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 48px 40px; text-align: center; max-width: 400px;
}
.room-icon  { font-size: 56px; margin-bottom: 16px; }
.room-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.room-card p  { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }


/* ── Points info ── */
.points-info { background: var(--surface2); border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.pi-row { display: flex; justify-content: space-between; font-size: 14px; }

/* ── Buy modal ── */
.qty-keypad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.qty-key { background: var(--surface2); border: 1.5px solid var(--border); color: var(--text); font-size: 15px; font-weight: 700; padding: 10px 4px; border-radius: 10px; cursor: pointer; text-align: center; transition: background .15s, border-color .15s, color .15s; }
.qty-key:hover { background: var(--border); }
.qty-key.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.buy-cost { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.buy-cost strong { color: var(--text); }
.buy-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: #10b981; color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 28px; border-radius: 40px; z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity:0; transform: translateX(-50%) translateY(16px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ── Loading ── */
.loading-state { color: var(--muted); text-align: center; padding: 48px 0; font-size: 14px; }
.empty-state   { color: var(--muted); text-align: center; padding: 48px 0; font-size: 14px; }
.no-draws-banner {
  background: rgba(124,58,237,.15); border: 1px solid rgba(124,58,237,.35);
  border-radius: 14px; padding: 28px 24px;
  text-align: center; color: #fff;
  font-size: 16px; font-weight: 700;
  margin-top: 8px;
}

/* ── Install banner ── */
.install-banner {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 500; width: calc(100% - 32px); max-width: 480px;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid rgba(124,58,237,.4);
  border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  animation: slideUp .35s ease;
}
.install-banner.hidden { display: none !important; }
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(80px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);   opacity: 1; }
}
.ib-icon { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.ib-text { flex: 1; min-width: 0; }
.ib-text strong { display: block; font-size: 14px; font-weight: 700; }
.ib-text span   { font-size: 12px; color: var(--muted); }
.ib-btn {
  background: var(--primary); color: #fff; border: none;
  font-size: 13px; font-weight: 700; padding: 8px 18px;
  border-radius: 20px; cursor: pointer; white-space: nowrap;
  flex-shrink: 0;
}
.ib-btn:hover { background: var(--primary-h); }
.ib-close {
  background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; padding: 4px; flex-shrink: 0;
}
.ib-close:hover { color: var(--text); }

/* ── iOS install popup ── */
.ios-card { text-align: center; }
.ios-icon { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 16px; display: block; }
.ios-steps { font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 24px; text-align: left; }
.ios-steps strong { color: var(--text); }
.ios-share { font-size: 18px; }
