*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial; }

:root{
  --bg:#060610;
  --card:rgba(255,255,255,.085);
  --border:rgba(255,255,255,.14);
  --text:#fff;
  --muted:rgba(255,255,255,.78);
  --muted2:rgba(255,255,255,.60);
}

body{
  background:
    radial-gradient(1200px 900px at 15% 10%, rgba(120, 72, 255, .33) 0%, transparent 60%),
    radial-gradient(1200px 900px at 85% 90%, rgba(22, 199, 154, .25) 0%, transparent 60%),
    radial-gradient(900px 600px at 60% 35%, rgba(255, 192, 72, .16) 0%, transparent 55%),
    var(--bg);
  color:var(--text);
  overflow:hidden;
}

#fx{
  position:fixed; inset:0;
  width:100%; height:100%;
  z-index:-1;
  pointer-events:none;
}

.wrap{
  min-height:100%;
  display:grid;
  place-items:center;
  padding:18px;
}

.card{
  width:min(1200px, 100%);
  border-radius:24px;
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:0 18px 80px rgba(0,0,0,.58);
  backdrop-filter: blur(10px);
  padding:18px;
  overflow:hidden;
}

.head{ display:flex; flex-direction:column; gap:8px; }

.pill{
  align-self:flex-start;
  font-weight:900;
  font-size:12px;
  letter-spacing:.9px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.22);
}

h1{
  margin:0;
  font-size:clamp(24px, 4.2vw, 58px);
  line-height:1.05;
  text-shadow:0 12px 30px rgba(0,0,0,.35);
}

.sub{ margin:0; color:var(--muted2); font-size:14px; }

.timer{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  padding:16px 0 8px;
}

.box{
  min-width:120px;
  padding:14px 14px 12px;
  border-radius:18px;
  background:rgba(0,0,0,.26);
  border:1px solid var(--border);
  text-align:center;
}

.num{
  font-size:clamp(44px, 6.8vw, 110px);
  font-weight:950;
  line-height:1;
  letter-spacing:.6px;
  text-shadow:0 14px 34px rgba(0,0,0,.45);
  transition:transform .18s ease;
}

.lab{ margin-top:6px; font-size:14px; color:var(--muted); }

.sep{
  font-size:34px;
  color:rgba(255,255,255,.55);
  margin:0 -4px;
}

.hint{
  margin:10px 0 8px;
  text-align:center;
  color:var(--muted2);
  font-size:12px;
}

.speech{
  margin-top:10px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
}

.speechTitle{ font-weight:950; font-size:20px; }
.speechSub{ font-size:12px; color:var(--muted2); margin-top:2px; }
.speechTimer{ font-weight:950; font-size:16px; text-align:right; }
.speechHint{ font-size:12px; color:var(--muted2); text-align:right; margin-top:2px; }

.controls{
  display:flex;
  justify-content:center;
  padding-top:12px;
}

.btn{
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.10);
  color:#fff;
  font-weight:900;
  border-radius:16px;
  padding:12px 16px;
  cursor:pointer;
  transition: transform .08s ease, background .2s ease;
}
.btn:hover{ background: rgba(255,255,255,.14); }
.btn:active{ transform: scale(0.98); }
.btn.big{ width:100%; padding:14px 16px; font-size:16px; border-radius:18px; }

.btn.danger{
  background: rgba(255, 80, 80, .18);
  border-color: rgba(255, 80, 80, .35);
}
.btn.danger:hover{ background: rgba(255, 80, 80, .26); }

.hidden{ display:none !important; }

.mini{ font-size:12px; color:var(--muted2); margin:10px 0 0; }
.center{ text-align:center; }

/* Гейт разрешения звука */
.gate{
  position:fixed; inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.62);
  z-index: 9999;
  padding:16px;
}
.gateCard{
  width:min(520px, 100%);
  border-radius:22px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(20,20,35,.74);
  backdrop-filter: blur(10px);
  padding:18px;
  box-shadow:0 20px 80px rgba(0,0,0,.55);
  text-align:center;
}
.gateIcon{ font-size:34px; }
.gateCard h2{ margin:10px 0 6px; }
.gateCard p{ margin:0 0 12px; color:var(--muted); }

/* Планшет/ПК */
@media (min-width: 760px){
  .card{ padding:22px; }
}

/* ТВ/очень большой экран */
@media (min-width: 1400px){
  .card{ width:min(1500px, 96vw); padding:26px; }
  .speechTitle{ font-size:22px; }
  .speechTimer{ font-size:18px; }
}

/* Телефон */
@media (max-width: 420px){
  .box{ min-width: 104px; padding:12px 10px; }
  .sep{ display:none; }
  .timer{ gap:10px; }
}

/* Праздничный режим */
body.celebrate .card{ animation: glow 1.7s ease-in-out infinite; }
@keyframes glow{
  0%{ box-shadow:0 18px 80px rgba(0,0,0,.58); }
  50%{ box-shadow:0 18px 110px rgba(120,72,255,.25), 0 18px 110px rgba(22,199,154,.16); }
  100%{ box-shadow:0 18px 80px rgba(0,0,0,.58); }
}

@media (prefers-reduced-motion: reduce){
  body.celebrate .card, .num{ animation:none !important; transition:none !important; }
}
