* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --border: #334155;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #15803d;
  --red: #b91c1c;
  --yellow: #f59e0b;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: var(--text);
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.home-page {
  padding-top: 48px;
}

.hero {
  text-align: center;
  margin-bottom: 30px;
}

.hero p {
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.main-column,
.side-column {
  min-width: 0;
}

.panel {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

.card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-link:hover {
  transform: translateY(-4px);
  border-color: #60a5fa;
}

h1, h2, h3 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #475569;
  background: #0b1220;
  color: var(--text);
}

button {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

button:hover {
  background: var(--blue-dark);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-grid,
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.hidden {
  display: none;
}

.panel-head,
.question-header,
.ranking-item,
.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-badge {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.35);
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.info-box,
.explanation-box {
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

.timer-box {
  min-width: 72px;
  text-align: center;
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(252, 211, 77, 0.3);
  padding: 12px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: bold;
}

.question-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #0b1220;
  border-radius: 16px;
  margin: 18px 0;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.choice-btn {
  background: #1e293b;
  border: 1px solid #475569;
  text-align: left;
}

.choice-btn.correct {
  background: var(--green);
}

.choice-btn--correct {
  background: #1f7a4c;
  border-color: #2ecc71;
  color: #ffffff;
}

.choice-btn.wrong {
  background: var(--red);
}

.choice-btn--wrong {
  background: #7a1f1f;
  border-color: #e74c3c;
  color: #ffffff;
}

.choice-btn--correct,
.choice-btn--wrong {
  animation: revealChoice 0.4s ease;
}

@keyframes revealChoice {
  from {
    transform: scale(0.95);
    opacity: 0.7;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.answer-status {
  min-height: 24px;
  margin-top: 16px;
  color: #93c5fd;
}

.styled-list,
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.participant-item,
.ranking-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.message {
  color: #fca5a5;
  min-height: 24px;
}

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .home-grid,
  .form-grid,
  .lobby-grid,
  .choices {
    grid-template-columns: 1fr;
  }

  .question-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timer-box {
    width: 100%;
  }
}


.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-with-shell {
  flex: 1;
  padding-top: 96px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-brand {
  color: #f8fafc;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.burger-btn {
  width: 56px;
  height: 56px;
  min-width: 56px;
  padding: 0;
  border-radius: 14px;
  background: #0f172a;
  border: 1px solid #334155;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.burger-btn:hover {
  background: #172036;
}

.burger-btn span {
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #f8fafc;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger-btn.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.burger-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.burger-btn.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.burger-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  display: none;
}

.burger-menu.is-open {
  display: block;
}

.burger-menu a {
  display: block;
  color: #f8fafc;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.burger-menu a:hover {
  background: #1e293b;
  color: #93c5fd;
}

.site-footer {
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 24px;
}

.site-footer__inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

@media (max-width: 768px) {
  .site-header__inner,
  .site-footer__inner {
    width: min(1200px, calc(100% - 24px));
  }

  .main-with-shell {
    padding-top: 88px;
  }

  .site-brand {
    font-size: 20px;
  }
}


.session-code-panel {
  text-align: center;
}

.session-code-panel__label {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.session-code-panel__value {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  letter-spacing: 0.16em;
}

.qr-panel {
  text-align: center;
}

.qr-code-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px auto 16px;
  padding: 20px;
  border: 1px solid #334155;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  max-width: 420px;
}

.qr-code-image {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 16px;
}

.qr-code-caption {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.qr-placeholder-panel {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
}

.qr-placeholder-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 2px dashed rgba(148, 163, 184, 0.5);
  background: rgba(11, 18, 32, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

@media (max-width: 768px) {
  .qr-placeholder-panel {
    grid-template-columns: 1fr;
  }
}

.form-grid--setup {
  margin-bottom: 18px;
}

.filters-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head--compact {
  align-items: flex-start;
  margin-bottom: 10px;
}

.muted-copy {
  color: var(--muted);
  margin: 6px 0 0;
}

.inline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.35);
  white-space: nowrap;
}

.multi-select {
  min-height: 220px;
}

.multi-select option {
  padding: 10px 12px;
}

.filters-summary-box code {
  color: #bfdbfe;
}

.admin-tree-grid {
  display: grid;
  gap: 14px;
}

.admin-tree-node {
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.admin-tree-node details {
  margin-left: 18px;
}

.admin-tree-node summary {
  cursor: pointer;
  font-weight: bold;
}

@media (max-width: 900px) {
  .filters-panel {
    grid-template-columns: 1fr;
  }
}


body {
  line-height: 1.5;
}

.home-landing {
  padding-bottom: 24px;
}

.panel--hero {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 30%),
    rgba(17, 24, 39, 0.95);
}

.hero--landing,
.hero--quiz-home {
  padding: 36px;
}

.hero-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(37, 99, 235, 0.15);
  color: #bfdbfe;
  font-size: 13px;
  margin-bottom: 16px;
}

.hero--landing h1,
.hero--quiz-home h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-link:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.btn-link--ghost {
  background: transparent;
  border-color: #475569;
}

.btn-link--ghost:hover {
  background: #172036;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: end;
  margin: 34px 0 18px;
}

.section-heading--compact {
  display: block;
  margin: 0 0 18px;
}

.section-heading__text {
  margin: 0;
}

.games-showcase,
.future-grid,
.seo-columns {
  display: grid;
  gap: 20px;
}

.future-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-card--featured {
  overflow: hidden;
}

.game-card__content {
  display: grid;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 8px;
}

.status-pill--live {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.32);
  color: #bbf7d0;
}

.feature-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.text-link {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 14px;
}

.desktop-nav a,
.burger-menu a.is-active,
.desktop-nav a.is-active {
  text-decoration: none;
}

.desktop-nav a {
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 10px;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.burger-menu a.is-active {
  background: #1e293b;
  color: #93c5fd;
}

.site-footer__inner--grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 24px;
  padding: 28px 0;
}

.site-footer__inner--grid h3,
.site-footer__inner--grid h4 {
  margin: 0 0 10px;
}

.site-footer__inner--grid p {
  text-align: left;
  margin: 0;
}

.site-footer__inner--grid a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  margin: 8px 0;
}

.site-footer__inner--grid a:hover {
  color: #93c5fd;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer__bottom p {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  text-align: center;
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .future-grid,
  .seo-columns,
  .site-footer__inner--grid,
  .section-heading {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) {
  .burger-btn {
    display: none;
  }

  .burger-menu {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hero--landing,
  .hero--quiz-home {
    padding: 24px;
  }

  .hero-actions,
  .card-actions {
    flex-direction: column;
  }

  .btn-link {
    width: 100%;
  }
}


/* ===== TETRIS ===== */
.arcade-page {
  padding-top: 36px;
}

.arcade-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.arcade-layout__main,
.arcade-layout__side {
  min-width: 0;
}

.arcade-hero {
  text-align: left;
}

.arcade-hero p {
  color: var(--muted);
  max-width: 820px;
}

.hero-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  font-size: 14px;
  font-weight: bold;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
}

.btn-link {
  background: var(--blue);
  color: #fff;
}

.btn-link:hover {
  background: var(--blue-dark);
}

.btn-link--ghost {
  background: transparent;
  border: 1px solid #475569;
  color: var(--text);
}

.text-link {
  padding: 0;
  color: #93c5fd;
}

.games-showcase,
.future-grid,
.seo-columns,
.tetris-stats-grid,
.tetris-help-grid,
.home-grid--quiz {
  display: grid;
  gap: 20px;
}

.future-grid,
.seo-columns,
.tetris-stats-grid,
.tetris-help-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.feature-list li + li {
  margin-top: 8px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.section-heading__text,
.muted-copy,
.qr-code-caption,
.scoreboard-note,
.control-help,
.tetris-subcopy {
  color: var(--muted);
}

.section-heading--compact {
  align-items: start;
}

.game-card--featured {
  border-color: rgba(96, 165, 250, 0.35);
}

.future-card,
.game-card {
  min-height: 100%;
}

.tetris-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: start;
}

.tetris-stage-wrap {
  display: flex;
  justify-content: center;
}

.tetris-stage {
  width: min(100%, 420px);
  aspect-ratio: 10 / 20;
  background: #020617;
  border: 2px solid #334155;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

.tetris-sidepanel {
  display: grid;
  gap: 16px;
}

.tetris-mini-canvas {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1;
  background: #020617;
  border: 2px solid #334155;
  border-radius: 16px;
}

.tetris-stat-card {
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.tetris-stat-card strong,
.tetris-stat-card span {
  display: block;
}

.tetris-stat-card span {
  margin-top: 8px;
  font-size: 26px;
  font-weight: bold;
}

.tetris-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 20px;
}

.tetris-scoreboard {
  display: grid;
  gap: 12px;
}

.tetris-score-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.tetris-score-rank {
  font-size: 22px;
  font-weight: bold;
  color: #93c5fd;
}

.tetris-score-main strong {
  display: block;
  margin-bottom: 4px;
}

.tetris-score-meta {
  font-size: 13px;
  color: var(--muted);
}

.tetris-score-value {
  text-align: right;
  font-weight: bold;
}

.tetris-empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed #475569;
  border-radius: 14px;
  color: var(--muted);
}

.tetris-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.82);
  border-radius: 18px;
  text-align: center;
  padding: 20px;
}

.tetris-game-panel {
  position: relative;
}

.tetris-final-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tetris-final-summary .info-box {
  text-align: center;
}

.tetris-controls-list {
  margin: 0;
  padding-left: 18px;
}

.tetris-controls-list li + li {
  margin-top: 8px;
}

.qr-code-wrapper {
  display: flex;
  justify-content: center;
}

.qr-code-image {
  width: min(100%, 260px);
  height: auto;
  background: #fff;
  padding: 12px;
  border-radius: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(71, 85, 105, 0.45);
}

.site-header__inner,
.site-footer__inner,
.site-footer__bottom {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}

.site-brand {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.desktop-nav a,
.burger-menu a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.desktop-nav a,
.burger-menu a {
  padding: 10px 12px;
  border-radius: 10px;
}

.desktop-nav a.is-active,
.desktop-nav a:hover,
.burger-menu a.is-active,
.burger-menu a:hover,
.site-footer a:hover,
.text-link:hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.14);
}

.burger-btn {
  display: none;
  width: 52px;
  height: 52px;
  padding: 12px;
  background: transparent;
  border: 1px solid #475569;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger-btn.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.is-open span:nth-child(2) { opacity: 0; }
.burger-btn.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.burger-menu {
  position: absolute;
  right: 20px;
  top: calc(100% + 8px);
  min-width: 240px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 10px;
  display: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.burger-menu.is-open {
  display: grid;
  gap: 4px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(71, 85, 105, 0.45);
  background: #020617;
}

.site-footer__inner--grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
  padding: 28px 0;
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
}

.site-footer__bottom {
  padding: 14px 0 22px;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .arcade-layout,
  .app-layout,
  .tetris-start-grid,
  .tetris-shell,
  .future-grid,
  .seo-columns,
  .tetris-stats-grid,
  .tetris-help-grid,
  .home-grid,
  .home-grid--quiz,
  .site-footer__inner--grid {
    grid-template-columns: 1fr;
  }

  .desktop-nav {
    display: none;
  }

  .burger-btn {
    display: inline-block;
    margin-left: auto;
  }

  .tetris-mini-canvas {
    max-width: 140px;
  }

  .tetris-final-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .form-grid,
  .lobby-grid,
  .choices,
  .section-heading {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .site-header__inner,
  .site-footer__inner,
  .site-footer__bottom {
    width: min(100% - 24px, 1200px);
  }

  .container {
    padding: 12px;
  }

  .panel,
  .card {
    padding: 16px;
  }

  .tetris-score-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .tetris-score-value {
    grid-column: 1 / -1;
    text-align: left;
  }

  .tetris-final-summary {
    grid-template-columns: 1fr;
  }
}


/* ===== FIX NAV + TETRIS ===== */
.tetris-stage-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tetris-stage {
  --tetris-stage-height: min(600px, max(360px, calc(100svh - 260px)));
  display: block;
  width: min(100%, calc(var(--tetris-stage-height) / 2));
  height: min(var(--tetris-stage-height), calc((100vw - 72px) * 2));
  max-height: 600px;
  max-width: 300px;
  aspect-ratio: 10 / 20;
}

.tetris-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.82);
  border-radius: 18px;
  text-align: center;
  padding: 20px;
}

.tetris-overlay.hidden,
.hidden.tetris-overlay {
  display: none !important;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-dropdown__trigger::after {
  content: '▾';
  font-size: 12px;
  opacity: 0.8;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 250px;
  padding: 10px;
  display: none;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.nav-dropdown.is-open .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  display: grid;
  gap: 4px;
}

.nav-dropdown__menu a {
  display: block;
}

.nav-dropdown.is-active > .nav-dropdown__trigger {
  color: #fff;
  background: rgba(59, 130, 246, 0.14);
}

.burger-submenu {
  display: grid;
  gap: 6px;
}

.burger-submenu__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 12px;
  color: var(--muted);
}

.burger-submenu__toggle:hover,
.burger-submenu__toggle.is-open,
.burger-submenu.is-open .burger-submenu__toggle {
  color: #fff;
  background: rgba(59, 130, 246, 0.14);
}

.burger-submenu__caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.burger-submenu.is-open .burger-submenu__caret,
.burger-submenu__toggle.is-open .burger-submenu__caret {
  transform: rotate(225deg);
}

.burger-submenu__links {
  display: none;
  gap: 4px;
  padding-left: 10px;
}

.burger-submenu.is-open .burger-submenu__links {
  display: grid;
}

.burger-submenu__links a {
  display: block;
}

@media (max-width: 1024px) {
  .tetris-stage {
    --tetris-stage-height: min(560px, max(340px, calc(100svh - 300px)));
    max-width: 280px;
  }
}

@media (max-width: 720px) {
  .tetris-stage {
    --tetris-stage-height: min(520px, max(300px, calc(100svh - 320px)));
    max-width: min(100%, 260px);
  }

  .tetris-sidepanel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== QUIZ TV MONO-COMPTE ===== */

.quiz-tv-page .sidebar-column {
  display: grid;
  gap: 20px;
  align-self: start;
}

.quiz-tv-summary {
  margin-top: 18px;
}

.inline-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}

.inline-form input {
  flex: 1 1 240px;
}

.field-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.panel-section {
  margin-top: 20px;
}

.error-text {
  color: #fca5a5;
  margin-top: 14px;
  min-height: 24px;
}

.quiz-tv-turnbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.quiz-tv-turnmeta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.info-chip {
  min-width: 120px;
  padding: 12px 14px;
  border: 1px solid rgba(71, 85, 105, 0.7);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
}

.info-chip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.info-chip strong {
  font-size: 18px;
}

.question-card {
  display: grid;
  gap: 18px;
}

.question-theme {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.question-image {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.6);
  background: rgba(15, 23, 42, 0.75);
}

.quiz-tv-remove {
  margin-left: 8px;
  background: transparent;
  border: 0;
  color: #93c5fd;
  cursor: pointer;
}

.choices-grid--static .choice-btn {
  cursor: default;
}

@media (max-width: 1024px) {
  .quiz-tv-page {
    grid-template-columns: 1fr;
  }
}
