:root{
  --bg-dark:#070707;
  --panel:rgba(10,10,10,.74);
  --panel-soft:rgba(18,18,18,.62);
  --border:rgba(255,255,255,.10);
  --border-strong:rgba(255,213,79,.30);
  --text:#f3f3f3;
  --muted:#c9c9c9;
  --soft:#9c9c9c;
  --accent:#ff7a00;
  --accent-red:#ff4141;
  --gold:#ffd54f;
  --footer:#d8d8d8;
  --shadow:0 18px 60px rgba(0,0,0,.48);
  --ease:cubic-bezier(.22,1,.36,1);
}

*{box-sizing:border-box;}
html{
  width:100%;
  height:100%;
  overflow:hidden;
}
body{
  width:100%;
  height:100vh;
  min-height:100vh;
  margin:0;
  color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,90,90,.10), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(255,213,79,.10), transparent 28%),
    linear-gradient(180deg, rgba(0,0,0,.54), rgba(0,0,0,.78)),
    url('assets/background/down-club-quiz-bg.png') center/cover no-repeat var(--bg-dark);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size:58px 58px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.68), transparent 80%);
  z-index:0;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.18));
  z-index:0;
}

a{color:inherit;}

.page{
  width:min(1120px, calc(100% - 36px));
  height:calc(100vh - 43px);
  min-height:0;
  margin:0 auto;
  padding:14px 0 10px;
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.topbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:9px 12px;
  border:1px solid rgba(255,213,79,.22);
  border-radius:22px;
  background:
    linear-gradient(135deg, rgba(0,0,0,.78), rgba(44,14,0,.70)),
    radial-gradient(circle at 12% 50%, rgba(255,122,0,.18), transparent 38%);
  backdrop-filter:blur(12px);
  box-shadow:0 12px 34px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.035), 0 0 34px rgba(255,122,0,.08);
  position:relative;
  z-index:10;
  overflow:hidden;
}

.brand{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:max-content;
  text-decoration:none;
  font-weight:1000;
  color:var(--gold);
  letter-spacing:.10em;
  text-transform:uppercase;
  text-shadow:0 0 16px rgba(255,122,0,.26);
}
.brand-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  border-radius:12px;
  filter:drop-shadow(0 0 16px rgba(255,122,0,.42));
}
.nav{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;}
.nav a{
  color:#f4dba0;
  text-decoration:none;
  padding:8px 12px;
  border-radius:13px;
  border:1px solid rgba(255,213,79,.10);
  background:rgba(255,213,79,.035);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.018);
  font-size:.86rem;
  font-weight:800;
  letter-spacing:.04em;
}
.nav a:hover{color:var(--gold);border-color:rgba(255,213,79,.26);background:rgba(255,213,79,.09);}

.hero{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-direction:column;
  text-align:center;
  padding:clamp(14px, 3vh, 32px) 0 8px;
  overflow:hidden;
}
.kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#f4dba0;
  border:1px solid rgba(255,213,79,.24);
  border-radius:999px;
  padding:7px 13px;
  background:rgba(0,0,0,.34);
  letter-spacing:.11em;
  text-transform:uppercase;
  font-weight:850;
  font-size:.74rem;
  margin-bottom:clamp(10px, 1.8vh, 16px);
}
h1{
  margin:0 0 clamp(12px, 2.4vh, 22px);
  font-size:clamp(2rem, 6vw, 4.9rem);
  line-height:.94;
  font-weight:1000;
  letter-spacing:.045em;
  text-transform:uppercase;
  background:linear-gradient(90deg, #ff7a00, #ffd54f 46%, #fff1b8 64%, #ff7a00);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  filter:drop-shadow(0 14px 26px rgba(0,0,0,.55));
}
.quiz-container{
  width:min(900px, 100%);
  min-height:0;
}
.quiz-panel{
  position:relative;
  width:100%;
  text-align:left;
  border:1px solid rgba(255,213,79,.22);
  border-radius:22px;
  background:linear-gradient(135deg, rgba(0,0,0,.80), rgba(18,18,18,.68)), radial-gradient(circle at 15% 20%, rgba(255,122,0,.10), transparent 40%);
  box-shadow:var(--shadow), inset 0 0 0 1px rgba(255,255,255,.03);
  backdrop-filter:blur(12px);
  padding:clamp(16px, 2.5vh, 24px);
  overflow:hidden;
}
.quiz-panel h2{margin:0 0 12px;color:var(--gold);font-size:clamp(1.05rem, 2.2vh, 1.35rem);letter-spacing:.03em;}
.quiz-panel p{color:var(--muted);line-height:1.42;margin:0 0 14px;font-size:clamp(.88rem, 1.8vh, 1rem);}
.question-progress{color:var(--gold);font-size:clamp(1rem, 2.3vh, 1.18rem);font-weight:1000;margin-bottom:7px;}
.question-hint{font-size:.9rem;color:#f4dba0!important;margin-bottom:12px!important;}
.primary-button,.secondary-button{
  border:0;
  cursor:pointer;
  user-select:none;
  font-weight:950;
  letter-spacing:.035em;
  text-transform:uppercase;
  border-radius:13px;
  padding:11px 17px;
  color:#120900;
  background:linear-gradient(135deg, #ffd54f, #ff7a00);
  box-shadow:0 12px 28px rgba(255,122,0,.18), inset 0 0 0 1px rgba(255,255,255,.25);
  transition:transform .2s var(--ease), filter .2s var(--ease), box-shadow .2s var(--ease);
}
.secondary-button{margin-right:10px;background:linear-gradient(135deg,#fff1b8,#ffd54f);}
.primary-button:hover,.secondary-button:hover{transform:translateY(-2px);filter:saturate(1.08);box-shadow:0 16px 34px rgba(255,122,0,.24);}
.choice-select{
  display:block;
  width:100%;
  margin:13px 0 13px;
  color:var(--text);
  background:rgba(0,0,0,.58);
  border:1px solid rgba(255,213,79,.22);
  border-radius:13px;
  padding:11px 14px;
  outline:none;
  font-size:.98rem;
}
.choice-select:focus{border-color:rgba(255,213,79,.58);box-shadow:0 0 0 4px rgba(255,213,79,.08);}
.choice-select option{background:#18110a;color:#fff;}
.custom-player{
  display:grid;
  grid-template-columns:auto auto 1fr auto minmax(110px, 170px);
  gap:12px;
  align-items:center;
  width:100%;
  padding:11px;
  border:1px solid rgba(255,213,79,.18);
  border-radius:18px;
  background:rgba(0,0,0,.48);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
  margin:10px 0 14px;
}
.custom-player audio{display:none!important;}
.player-button{
  width:40px;
  height:40px;
  border:0;
  border-radius:999px;
  color:#120900;
  background:linear-gradient(135deg,#ffd54f,#ff7a00);
  cursor:pointer;
  font-weight:1000;
}
.player-time{font-variant-numeric:tabular-nums;color:#f4dba0;min-width:95px;font-size:.9rem;}
.player-progress,.player-volume{accent-color:#ffd54f;width:100%;}
.volume-label{font-variant-numeric:tabular-nums;color:var(--muted);font-size:.86rem;min-width:38px;text-align:right;}
.player-error{border-color:rgba(255,65,65,.5);}
.result-opponent strong,.result-list strong{color:var(--gold);}
.footer{
  flex:0 0 43px;
  height:43px;
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 16px;
  border-top:1px solid rgba(255,213,79,.30);
  color:var(--footer);
  font-size:.88rem;
  background:rgba(0,0,0,.44);
}
.footer a{color:var(--gold);text-decoration:none;font-weight:850;}
#liveTime{color:var(--gold);font-weight:900;font-variant-numeric:tabular-nums;}

@media (max-width:700px){
  body{overflow:auto;min-height:100%;}
  html{overflow:auto;}
  .page{height:auto;min-height:calc(100vh - 43px);width:min(100% - 22px, 1120px);overflow:visible;}
  .hero{overflow:visible;justify-content:flex-start;padding:18px 0;}
  .custom-player{grid-template-columns:auto 1fr;gap:10px;}
  .player-time,.volume-label{min-width:0;}
  .player-progress,.player-volume{grid-column:1 / -1;}
  h1{font-size:clamp(2rem, 12vw, 4rem);}
}
