:root {
  --bg-dark: #0f1220;
  --text-main: #e6e6eb;
  --text-muted: #b8b8c5;
  --accent: #5b7cfa;

  --card: rgba(20,20,30,0.6);
  --card-2: rgba(20,20,30,0.35);
  --stroke: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
  position: relative;
}

body::before {
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(circle at 20% 30%, #1b1f3b, transparent 40%),
    radial-gradient(circle at 80% 70%, #241a40, transparent 45%),
    radial-gradient(circle at 50% 50%, #111426, transparent 60%);
  filter: blur(40px);
  z-index:-1;
}

.container {
  text-align: center;
  padding: 24px;
  max-width: 980px;
  width: 100%;
  opacity: 0;
  animation: pageFadeIn 1200ms ease forwards;
}

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

h1 {
  font-size: clamp(20px,4.5vw,30px);
  font-weight: 500;
  margin-bottom: 14px;
}

.sub {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.countdown {
  font-size: clamp(22px,5vw,34px);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.tg-button {
  display:inline-block;
  padding:14px 28px;
  border-radius:14px;
  background: linear-gradient(135deg,var(--accent),#7a8dff);
  color:#fff;
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  box-shadow:0 10px 30px rgba(91,124,250,0.35);
  border: 0;
  cursor: pointer;
}
.tg-button:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(91,124,250,0.45); }

.tg-button[disabled]{
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Иконка звука (как у тебя) */
#sound-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,20,30,0.6);
  border-radius: 50%;
  user-select: none;
  transition: background 0.2s;
}
#sound-toggle:hover { background: rgba(91,124,250,0.6); }

/* ===== Jeopardy board ===== */
.topbar {
  display:flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin: 10px auto 18px;
  max-width: 980px;
}

.pill {
  background: var(--card);
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text-muted);
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  min-height: 42px;
}

.pill strong { color: var(--text-main); font-weight: 600; }

.board {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(10,10,18,0.25);
  box-shadow: 0 16px 60px rgba(0,0,0,0.35);
}

.board-grid {
  display:grid;
  grid-template-columns: repeat(4, 1fr);
}

.theme {
  background: rgba(20,20,30,0.55);
  border-right: 1px solid var(--stroke);
  padding: 14px 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  color: var(--text-muted);
}
.theme:last-child { border-right: 0; }

.cell {
  height: 92px;
  border-top: 1px solid var(--stroke);
  border-right: 1px solid var(--stroke);
  background: rgba(20,20,30,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px;
}
.cell:nth-child(4n) { border-right: 0; }

.qbtn {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border-radius: 14px;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, background .12s, border-color .12s;
}
.qbtn:hover {
  transform: translateY(-1px);
  background: rgba(91,124,250,0.18);
  border-color: rgba(91,124,250,0.35);
}
.qbtn[disabled]{
  opacity: .40;
  cursor: not-allowed;
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
  transform: none;
}
.lock {
  font-size: 18px;
  margin-left: 8px;
  opacity: .9;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,18,0.70);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 50;
  padding: 18px;
}
.overlay .modal {
  max-width: 520px;
  width: 100%;
  background: rgba(20,20,30,0.88);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 16px 60px rgba(0,0,0,0.45);
}
.overlay h2 { font-size: 18px; margin-bottom: 10px; }
.overlay p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.35; }

@media(max-width:900px){
  .cell{ height: 76px; }
  .qbtn{ font-size: 22px; border-radius: 12px; }
}
@media(max-width:560px){
  .container{ padding: 16px; }
  .theme{ font-size: 11px; padding: 12px 10px; }
  .cell{ height: 64px; }
}

.qbtnAnswered{
  background: rgba(43, 213, 118, 0.18) !important;
  border-color: rgba(43, 213, 118, 0.35) !important;
  color: var(--text-main) !important;
  cursor: not-allowed !important;
}
.check {
  font-size: 18px;
  margin-left: 8px;
}

.input{
  width: 100%;
  max-width: 520px;
  display: block;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 18px;
  outline: none;
}
.input:focus{
  border-color: rgba(91,124,250,0.55);
  box-shadow: 0 0 0 4px rgba(91,124,250,0.15);
}
