:root {
  --bg-deep: #15002b;
  --bg-purple: #32005f;
  --bg-pink: #ff2f92;
  --red: #ff244f;
  --red-dark: #b40028;
  --green: #22d66b;
  --green-dark: #008f42;
  --yellow: #ffd84d;
  --blue: #42d9ff;
  --white: #ffffff;
  --soft-white: rgba(255, 255, 255, 0.86);
  --muted-white: rgba(255, 255, 255, 0.64);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg-deep);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 47, 146, 0.55), transparent 30%),
    radial-gradient(circle at 90% 18%, rgba(66, 217, 255, 0.5), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(255, 216, 77, 0.22), transparent 34%),
    linear-gradient(135deg, #15002b 0%, #32005f 48%, #100020 100%);
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  opacity: 0.42;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  padding: calc(18px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));
  overflow: hidden;
}

.screen-active {
  display: block;
  animation: screenIn 420ms ease both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: scale(0.985);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-screen,
.home-screen,
.name-screen,
.player-game-screen,
.player-final-screen {
  display: none;
  place-items: center;
}

.loading-screen.screen-active,
.home-screen.screen-active,
.name-screen.screen-active,
.player-game-screen.screen-active,
.player-final-screen.screen-active {
  display: grid;
}

.loading-card,
.home-panel,
.mobile-panel,
.host-card,
.host-question-card,
.timer-panel,
.choices-panel,
.answer-column {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.loading-card {
  width: min(420px, 92vw);
  padding: 34px;
  border-radius: var(--radius);
  text-align: center;
}

.loading-logo {
  width: min(320px, 80vw);
  display: block;
  margin: 0 auto 22px;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 5px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--yellow);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.home-panel {
  width: min(1120px, 96vw);
  height: min(720px, 94dvh);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: auto 1fr;
  gap: 22px;
  align-items: center;
}

.game-logo {
  grid-column: 1 / -1;
  width: min(520px, 82vw);
  max-height: 150px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.4));
}

.host-image-wrap {
  align-self: end;
  justify-self: center;
  width: min(440px, 100%);
  height: min(470px, 58dvh);
  display: grid;
  place-items: end center;
  pointer-events: none;
}

.host-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, 0.42));
  animation: hostFloat 3.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hostFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.home-actions {
  align-self: center;
  display: grid;
  gap: 18px;
  z-index: 2;
}

.join-card {
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.join-card h2,
.players-card h2,
.answer-column h2,
.answer-column h3,
.choices-panel h2 {
  margin: 0;
}

.join-card p,
.screen-copy,
.small-copy,
.join-url {
  color: var(--soft-white);
  line-height: 1.35;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.icon-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  color: var(--white);
  font-weight: 900;
  letter-spacing: 0.2px;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--yellow), #ff9f1c 42%, var(--bg-pink));
  box-shadow: 0 12px 30px rgba(255, 47, 146, 0.32);
}

.secondary-btn {
  background: linear-gradient(135deg, #4b1cff, #00b7ff);
  box-shadow: 0 12px 30px rgba(66, 217, 255, 0.24);
}

.danger-btn {
  background: linear-gradient(135deg, #ff244f, #8a001d);
  box-shadow: 0 12px 30px rgba(255, 36, 79, 0.28);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.icon-btn:hover,
.primary-btn:focus,
.secondary-btn:focus,
.danger-btn:focus,
.icon-btn:focus {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.big-btn {
  min-height: 62px;
  font-size: 1.12rem;
}

.small-btn {
  min-height: 42px;
  padding: 0 18px;
}

.room-code-input,
.name-input {
  width: 100%;
  height: 58px;
  margin: 8px 0 14px;
  padding: 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  outline: none;
  background: rgba(0, 0, 0, 0.26);
  color: var(--white);
  font-weight: 900;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.name-input {
  text-transform: none;
  letter-spacing: 0;
}

.room-code-input:focus,
.name-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.18);
}

.mobile-panel {
  width: min(440px, 94vw);
  max-height: 94dvh;
  border-radius: 26px;
  padding: 22px;
  display: grid;
  gap: 16px;
  text-align: center;
}

.mobile-logo {
  width: min(320px, 80vw);
  max-height: 96px;
  object-fit: contain;
  justify-self: center;
}

.mobile-panel h1 {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1.05;
}

.room-pill,
.question-pill,
.question-progress,
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-weight: 900;
}

.room-pill,
.question-progress {
  gap: 7px;
  white-space: nowrap;
}

.host-lobby-screen.screen-active {
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.host-layout {
  width: min(1500px, 100%);
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 350px minmax(220px, 1fr) 380px;
  gap: 18px;
  align-items: stretch;
}

.host-left,
.host-right {
  display: grid;
  gap: 18px;
  min-height: 0;
  position: relative;
  z-index: 2;
}

.host-left {
  grid-template-rows: auto auto 1fr;
}

.host-right {
  grid-template-rows: minmax(0, 1fr) auto;
}

.host-logo {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.host-card {
  border-radius: var(--radius);
  padding: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.host-room-code {
  font-size: clamp(3rem, 5.8vw, 5rem);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 8px;
  color: var(--yellow);
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
}

.qr-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 300px;
}

.qr-code {
  width: min(230px, 100%);
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.qr-code canvas,
.qr-code img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.qr-fallback {
  color: #15002b;
  font-weight: 1000;
  font-size: 2rem;
  letter-spacing: 3px;
}

.join-url {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 0.86rem;
}

.host-centre {
  min-width: 0;
  display: grid;
  place-items: end center;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.host-image-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: end center;
  pointer-events: none;
}

.host-presenter {
  max-width: min(500px, 100%);
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 30px 35px rgba(0, 0, 0, 0.5));
  animation: hostFloat 4s ease-in-out infinite;
  pointer-events: none;
}

.card-heading-row,
.mobile-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.players-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.players-list,
.answer-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  overflow: auto;
}

.players-list li,
.answer-list li {
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  font-weight: 800;
}

.empty-message,
.mobile-message,
.vote-locked-message {
  color: var(--soft-white);
  font-weight: 800;
}

.host-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.host-game-layout {
  width: min(1560px, 100%);
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.host-game-header,
.host-game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.host-game-footer-single {
  justify-content: flex-end;
}

.host-game-logo {
  width: min(320px, 26vw);
  max-height: 82px;
  object-fit: contain;
}

.host-game-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.host-main-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.45fr) minmax(360px, 0.72fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.host-character-corner {
  position: absolute;
  left: -8px;
  bottom: -6px;
  width: min(300px, 23vw);
  height: min(380px, 58vh);
  display: grid;
  place-items: end start;
  pointer-events: none;
  z-index: 30;
}

.host-game-character {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 30px rgba(0, 0, 0, 0.5));
  animation: hostFloat 4s ease-in-out infinite;
  transform: translateZ(0);
  image-rendering: auto;
}

.host-question-card,
.timer-panel {
  border-radius: var(--radius);
  padding: clamp(16px, 1.8vw, 26px);
  min-height: 0;
  position: relative;
  z-index: 5;
}

.host-question-card {
  display: grid;
  align-content: center;
  padding-left: clamp(200px, 19vw, 320px);
  overflow: hidden;
}

.host-question-card h1 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  font-size: clamp(1.7rem, 3.35vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.timer-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.host-timer {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(255, 216, 77, 0.3), rgba(255, 47, 146, 0.08)),
    rgba(0, 0, 0, 0.24);
  border: 7px solid rgba(255, 216, 77, 0.86);
  color: var(--yellow);
  font-size: clamp(4.2rem, 8.5vw, 8.4rem);
  line-height: 1;
  font-weight: 1000;
  text-shadow: 0 12px 0 rgba(0, 0, 0, 0.22);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.host-timer.warning,
.mobile-timer.warning {
  color: #ff244f;
  border-color: #ff244f;
  animation: timerPulse 520ms ease infinite;
}

@keyframes timerPulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.055);
    filter: brightness(1.2);
  }
}

.timer-status {
  margin: 0;
  color: var(--soft-white);
  font-weight: 900;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
}

.choices-panel {
  min-height: 0;
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.choices-panel-header {
  padding-bottom: 2px;
}

.choices-panel h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.8rem);
  line-height: 1.05;
}

.choices-subtitle {
  margin: 6px 0 0;
  color: var(--soft-white);
  font-size: 0.9rem;
  line-height: 1.25;
}

.answer-column {
  min-height: 0;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: none;
  overflow: hidden;
}

.answer-column-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.answer-column h3 {
  font-size: clamp(1rem, 1.35vw, 1.25rem);
}

.answer-count-badge {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.17);
  color: var(--white);
  font-weight: 1000;
}

.red-answer-column {
  border-color: rgba(255, 36, 79, 0.35);
  background:
    linear-gradient(145deg, rgba(255, 36, 79, 0.20), rgba(255, 255, 255, 0.07));
}

.green-answer-column {
  border-color: rgba(34, 214, 107, 0.35);
  background:
    linear-gradient(145deg, rgba(34, 214, 107, 0.18), rgba(255, 255, 255, 0.07));
}

.red-answer-column h3,
.red-answer-column h2 {
  color: #ffb2bf;
}

.green-answer-column h3,
.green-answer-column h2 {
  color: #a8ffc9;
}

.hidden-answers {
  display: none;
}

.revealed-answers li {
  animation: answerPop 360ms ease both;
}

@keyframes answerPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-timer-wrap {
  display: inline-flex;
  justify-self: center;
  align-items: baseline;
  gap: 7px;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 900;
}

.mobile-timer {
  color: var(--yellow);
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 1000;
}

.player-question-area {
  display: grid;
  gap: 16px;
  min-height: 0;
}

.player-question-area h1 {
  margin: 0;
  max-height: 34dvh;
  overflow: auto;
  padding: 2px;
  font-size: clamp(1.35rem, 6.4vw, 2.15rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

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

.flag-choice {
  min-height: 146px;
  padding: 12px;
  border-radius: 20px;
  color: var(--white);
  display: grid;
  place-items: center;
  gap: 6px;
  font-weight: 1000;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, filter 160ms ease, outline 160ms ease;
}

.flag-choice:hover,
.flag-choice:active,
.flag-choice:focus {
  transform: scale(1.03);
  filter: brightness(1.06);
}

.flag-choice img {
  width: min(96px, 32vw);
  height: auto;
  object-fit: contain;
}

.red-choice {
  background: linear-gradient(145deg, #ff496b, #9a001f);
}

.green-choice {
  background: linear-gradient(145deg, #35e87a, #007638);
}

.selected-choice {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

.vote-locked-message {
  display: none;
  min-height: 46px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.voted .vote-buttons {
  pointer-events: none;
  opacity: 0.62;
}

.voted .vote-locked-message {
  display: block;
}

.time-up .vote-buttons {
  pointer-events: none;
  opacity: 0.4;
}

.final-screen.screen-active {
  display: grid;
  place-items: center;
}

.final-layout {
  width: min(1220px, 96vw);
  height: min(760px, 94dvh);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
}

.final-logo {
  width: min(420px, 60vw);
  max-height: 100px;
  justify-self: center;
  object-fit: contain;
}

.final-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.final-host-image {
  width: min(180px, 20vw);
  max-height: 180px;
  object-fit: contain;
  pointer-events: none;
}

.final-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
}

.final-copy p {
  margin: 6px 0 0;
  color: var(--soft-white);
}

.final-results-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.result-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.result-card h3 {
  margin: 0 0 8px;
}

.result-card p {
  margin: 0;
  color: var(--soft-white);
}

.result-stat-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.result-stat {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  font-weight: 1000;
}

.result-red {
  background: rgba(255, 36, 79, 0.28);
}

.result-green {
  background: rgba(34, 214, 107, 0.24);
}

.final-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.player-final-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.player-final-stats div {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.player-final-stats span {
  display: block;
  font-size: 2.8rem;
  font-weight: 1000;
}

.player-final-stats small {
  color: var(--soft-white);
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 50;
  max-width: min(420px, 90vw);
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: var(--white);
  font-weight: 900;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .host-layout {
    grid-template-columns: 330px minmax(140px, 0.7fr) 360px;
  }

  .host-presenter {
    max-width: min(390px, 100%);
    max-height: 76%;
  }

  .host-main-stage {
    grid-template-columns: minmax(0, 1fr) 200px 330px;
  }

  .host-character-corner {
    width: min(245px, 22vw);
  }

  .host-question-card {
    padding-left: clamp(165px, 18vw, 255px);
  }

  .host-question-card h1 {
    font-size: clamp(1.55rem, 3vw, 3.45rem);
  }
}

@media (max-width: 1050px) {
  .home-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .host-image-wrap {
    height: min(300px, 34dvh);
  }

  .host-layout {
    grid-template-columns: 320px 1fr;
  }

  .host-centre {
    display: none;
  }

  .host-right {
    z-index: 3;
  }

  .host-room-code {
    letter-spacing: 4px;
  }

  .host-main-stage {
    grid-template-columns: minmax(0, 1fr) 200px 320px;
  }

  .host-character-corner {
    display: none;
  }

  .host-question-card {
    padding-left: clamp(18px, 2vw, 28px);
  }
}

@media (max-width: 820px) {
  .screen {
    padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
  }

  .home-panel {
    width: 100%;
    height: 100%;
    border-radius: 22px;
  }

  .game-logo {
    max-height: 110px;
  }

  .host-image-wrap {
    height: min(260px, 30dvh);
  }

  .join-card {
    padding: 18px;
  }

  .host-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .host-left {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .host-logo {
    display: none;
  }

  .host-right {
    min-height: 0;
    gap: 12px;
  }

  .qr-card {
    min-height: 230px;
  }

  .qr-code {
    width: min(200px, 50vw);
  }

  .host-game-layout {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .host-game-logo {
    width: 190px;
  }

  .host-main-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 0.95fr) auto minmax(0, 1.15fr);
  }

  .timer-panel {
    padding: 12px;
  }

  .host-timer {
    width: min(145px, 42vw);
    font-size: clamp(3.7rem, 15vw, 6rem);
  }

  .host-question-card {
    padding-left: 16px;
    padding-right: 16px;
    align-content: center;
  }

  .host-question-card h1 {
    font-size: clamp(1.35rem, 6vw, 2.7rem);
    line-height: 1.06;
  }

  .choices-panel {
    min-height: 0;
  }

  .final-layout {
    height: 100%;
  }
}

@media (max-width: 560px) {
  .app {
    background:
      radial-gradient(circle at 20% 8%, rgba(255, 47, 146, 0.6), transparent 32%),
      radial-gradient(circle at 80% 15%, rgba(66, 217, 255, 0.48), transparent 30%),
      linear-gradient(145deg, #15002b 0%, #32005f 56%, #100020 100%);
  }

  .home-panel {
    padding: 18px;
    gap: 14px;
  }

  .host-image-wrap {
    height: 25dvh;
  }

  .big-btn {
    min-height: 56px;
  }

  .mobile-panel {
    width: 100%;
    max-height: 100%;
    padding: 18px;
  }

  .mobile-logo {
    max-height: 82px;
  }

  .vote-buttons {
    gap: 10px;
  }

  .flag-choice {
    min-height: 126px;
    border-radius: 18px;
  }

  .flag-choice img {
    width: min(82px, 30vw);
  }

  .host-game-header {
    align-items: start;
  }

  .host-game-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .host-game-footer,
  .final-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .answer-column {
    padding: 11px;
  }

  .answer-column h3,
  .answer-column h2 {
    font-size: 1rem;
  }

  .answer-list li {
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .choices-subtitle {
    font-size: 0.82rem;
  }

  .final-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .final-host-image {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .screen {
    padding: 10px;
  }

  .host-layout {
    grid-template-columns: 300px minmax(140px, 1fr) 330px;
    gap: 12px;
  }

  .host-left,
  .host-right {
    gap: 12px;
  }

  .host-card {
    padding: 14px;
  }

  .host-logo {
    max-height: 78px;
  }

  .host-room-code {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
  }

  .small-copy {
    margin: 8px 0 0;
    font-size: 0.9rem;
  }

  .qr-card {
    min-height: 230px;
    gap: 8px;
  }

  .qr-code {
    width: 170px;
    padding: 9px;
  }

  .join-url {
    display: none;
  }

  .host-presenter {
    max-height: 70%;
    max-width: 360px;
  }

  .players-list li {
    margin-bottom: 7px;
    padding: 9px 11px;
  }

  .big-btn {
    min-height: 52px;
  }

  .host-game-layout {
    gap: 10px;
  }

  .host-game-logo {
    max-height: 58px;
  }

  .host-main-stage {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 160px 310px;
  }

  .host-question-card,
  .timer-panel,
  .choices-panel,
  .answer-column {
    padding: 12px;
  }

  .host-question-card {
    padding-left: 185px;
  }

  .host-question-card h1 {
    font-size: clamp(1.45rem, 2.95vw, 3.2rem);
    line-height: 1.03;
  }

  .host-character-corner {
    width: 178px;
    height: 265px;
  }

  .host-timer {
    width: 140px;
    font-size: clamp(3.4rem, 7vw, 5.8rem);
    border-width: 5px;
  }

  .answer-list li {
    margin-bottom: 6px;
    padding: 8px 10px;
  }

  .choices-panel h2 {
    font-size: 1.25rem;
  }

  .choices-subtitle {
    display: none;
  }
}

@media (max-height: 610px) and (min-width: 821px) {
  .host-layout {
    grid-template-columns: 270px minmax(80px, 0.6fr) 300px;
  }

  .host-logo,
  .host-centre {
    display: none;
  }

  .host-left {
    grid-template-rows: auto auto;
  }

  .qr-card {
    min-height: 210px;
  }

  .qr-code {
    width: 160px;
  }

  .host-room-code {
    font-size: 2.7rem;
  }

  .players-card h2 {
    font-size: 1.2rem;
  }

  .host-main-stage {
    grid-template-columns: minmax(0, 1fr) 135px 280px;
  }

  .host-character-corner {
    display: none;
  }

  .host-question-card {
    padding-left: 12px;
  }

  .host-question-card h1 {
    font-size: clamp(1.35rem, 2.65vw, 2.9rem);
  }

  .host-timer {
    width: 120px;
  }

  .choices-panel h2 {
    font-size: 1.1rem;
  }
}