@import url("https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  color-scheme: light;
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  background: #f9f4ff;
  --shadow: 0 24px 50px rgba(64, 28, 140, 0.18);
  --pink: #ff8bd3;
  --purple: #7c6bff;
  --blue: #4cc9f0;
  --mint: #8ef2d3;
  --sun: #ffe08a;
  --ink: #1f1147;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9) 0%, rgba(247, 235, 255, 0.95) 40%, rgba(217, 236, 255, 0.95) 100%),
    linear-gradient(120deg, rgba(255, 223, 240, 0.6), rgba(196, 229, 255, 0.6));
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px);
  background-size: 90px 90px, 70px 70px;
  background-position: 0 0, 30px 40px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  position: relative;
  z-index: 1;
}

header {
  padding: 4px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(31, 17, 71, 0.62);
  text-transform: uppercase;
  font-family: "Mochiy Pop One", "Nunito", sans-serif;
  padding: 0;
  opacity: 0.9;
}

.lobby {
  margin-top: 20px;
}

.lobby-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(242, 231, 255, 0.95) 100%);
  border-radius: 30px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 24px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
}

.lobby-card::after {
  content: "";
  position: absolute;
  inset: -60% auto auto -20%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(255, 139, 211, 0.15), transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.lobby-eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: rgba(35, 25, 66, 0.45);
}

.lobby-subtitle {
  margin: 6px 0 0;
  color: rgba(31, 17, 71, 0.7);
  font-weight: 600;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.lobby-panel {
  padding: 18px;
  border-radius: 22px;
  border: 2px solid rgba(124, 107, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 26px rgba(124, 107, 255, 0.12);
}

.lobby-panel h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.lobby-label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.lobby-panel input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(124, 107, 255, 0.35);
  font-size: 1rem;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lobby-panel input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 139, 211, 0.2);
}

.room-code-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 139, 211, 0.25), rgba(76, 201, 240, 0.25));
  border: 2px solid rgba(124, 107, 255, 0.3);
  display: grid;
  gap: 6px;
  text-align: center;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.6);
}

.room-code-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(31, 17, 71, 0.65);
  font-weight: 800;
}

.room-code-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.room-code-value {
  font-size: 2rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: #2b1a6f;
  text-shadow: 0 3px 12px rgba(124, 107, 255, 0.35);
  line-height: 1;
}

.copy-room-code {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 2px solid rgba(124, 107, 255, 0.35);
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(216, 236, 255, 0.95));
  color: #2b1a6f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(124, 107, 255, 0.16);
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.copy-room-code svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.copy-room-code:hover {
  transform: translateY(calc(-50% - 1px));
  filter: saturate(1.08);
  box-shadow: 0 10px 20px rgba(124, 107, 255, 0.22);
}

.copy-room-code:active {
  transform: translateY(-50%);
  box-shadow: 0 6px 14px rgba(124, 107, 255, 0.16);
}

.copy-room-code:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 6px rgba(76, 201, 240, 0.5);
}

.room-code-hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(35, 25, 66, 0.65);
}

.lobby-hint {
  margin: 0;
  min-height: 20px;
  color: rgba(31, 17, 71, 0.6);
  font-size: 0.85rem;
}

.player-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.player-list li {
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
  border: 2px solid rgba(124, 107, 255, 0.18);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  box-shadow: 0 10px 18px rgba(124, 107, 255, 0.1);
}

.primary,
.secondary {
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: "Mochiy Pop One", "Nunito", sans-serif;
  transition:
    transform 0.15s ease,
    filter 0.2s ease;
  overflow: hidden;
}

.primary {
  background: linear-gradient(160deg, #8a6bff 0%, #5dd6ff 55%, #86f2d3 100%);
  color: #43308f;
}

.secondary {
  background: linear-gradient(160deg, #fff6ff 0%, #ffe0f4 55%, #ffeeb3 100%);
  color: #6141b2;
}

.primary:hover,
.secondary:hover {
  transform: translateY(-3px) scale(1.03);
  filter: saturate(1.1);
}

.primary:active,
.secondary:active {
  transform: translateY(2px) scale(0.98);
}

.primary:focus-visible,
.secondary:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.primary:disabled,
.secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  margin-top: 24px;
}

.hud {
  display: grid;
  gap: 18px;
}

.card {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
  box-shadow: var(--shadow);
  border: 2px solid rgba(124, 107, 255, 0.16);
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  margin-bottom: 16px;
}

.card input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d5c7ff;
  font-size: 1rem;
}

.stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.95rem;
  font-weight: 600;
}

#phaseTimer {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: #1f2937;
}

#phaseTimer.danger,
#alibiTimer.danger {
  color: #b91c1c;
}

.arena {
  position: relative;
  transform-origin: center;
  will-change: transform;
}

.arena.arena-rumble {
  animation: arena-rumble 0.9s cubic-bezier(0.32, 0.02, 0.3, 1) both;
}

@keyframes arena-rumble {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  12% {
    transform: translate3d(-6px, 4px, 0) rotate(-1.2deg) scale(1.01);
  }
  24% {
    transform: translate3d(6px, -5px, 0) rotate(1.4deg) scale(1.02);
  }
  36% {
    transform: translate3d(-8px, 6px, 0) rotate(-1.6deg) scale(1.01);
  }
  48% {
    transform: translate3d(7px, 3px, 0) rotate(1.2deg) scale(1.02);
  }
  60% {
    transform: translate3d(-5px, -4px, 0) rotate(-1deg) scale(1.01);
  }
  72% {
    transform: translate3d(4px, 5px, 0) rotate(0.8deg) scale(1.01);
  }
  84% {
    transform: translate3d(-3px, -3px, 0) rotate(-0.6deg) scale(1);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

canvas#game {
  width: 100%;
  border-radius: 30px;
  box-shadow: var(--shadow);
  border: 4px solid rgba(255, 255, 255, 0.9);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(240, 237, 255, 0.9));
}

#minimap {
  width: 100%;
  border-radius: 16px;
  border: 2px solid rgba(124, 107, 255, 0.2);
  background: #fbfaff;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(31, 17, 71, 0.72);
  border-radius: 28px;
  backdrop-filter: blur(6px);
}

.overlay-card {
  background: #fff;
  padding: 24px 30px;
  border-radius: 18px;
  text-align: center;
  border: 2px solid rgba(255, 139, 211, 0.25);
  box-shadow: 0 16px 30px rgba(124, 107, 255, 0.25);
}

.alibi {
  margin-top: 24px;
}

.alibi-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  border: 2px solid rgba(124, 107, 255, 0.16);
}

.alibi-header {
  position: relative;
  padding-right: 190px;
}

.alibi-glance-hud {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0;
  min-width: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.alibi-glance-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.alibi-glance-stat span {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: rgba(31, 17, 71, 0.58);
}

.alibi-glance-stat strong {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  color: #4c1d95;
}

.alibi-card h2,
.alibi-card h3 {
  margin: 0;
}

.alibi-subtitle {
  margin: 0;
  color: rgba(31, 17, 71, 0.7);
}

.alibi-collected-items {
  margin: 0;
  color: rgba(31, 17, 71, 0.78);
  font-size: 0.92rem;
}

.alibi-label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.alibi-label textarea {
  resize: vertical;
  min-height: 96px;
  border-radius: 12px;
  border: 2px solid rgba(124, 107, 255, 0.35);
  padding: 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alibi-label textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 139, 211, 0.2);
}

.alibi-visible main {
  display: none;
}

.verdict {
  margin-top: 24px;
}

.verdict-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  border: 2px solid rgba(124, 107, 255, 0.16);
}

.verdict-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.verdict-title h2 {
  margin: 4px 0 6px;
  font-size: 2rem;
}

.verdict-round {
  font-weight: 800;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.verdict-glance-hud {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.verdict-glance-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.verdict-glance-stat span {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: rgba(31, 17, 71, 0.58);
}

.verdict-glance-stat strong {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  color: #4c1d95;
}

.verdict-glance-stat strong.danger {
  color: #b91c1c;
}

.verdict-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(35, 25, 66, 0.6);
}

.verdict-tagline {
  margin: 0;
  color: rgba(35, 25, 66, 0.72);
  font-size: 0.98rem;
}

.verdict-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(255, 210, 240, 0.9));
  box-shadow: 0 12px 24px rgba(255, 139, 211, 0.3);
  border: 2px solid rgba(255, 139, 211, 0.35);
}

.verdict-status {
  margin: 0;
  color: rgba(35, 25, 66, 0.72);
  font-size: 0.92rem;
  min-height: 20px;
}

.verdict-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.verdict-section {
  display: grid;
  gap: 10px;
}

.verdict-section-title {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(35, 25, 66, 0.6);
}

.verdict-highlight {
  border: 2px solid rgba(124, 107, 255, 0.22);
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
}

.verdict-highlight h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.verdict-highlight p {
  margin: 0;
}

.verdict-highlight-name {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.verdict-highlight-reason {
  color: rgba(35, 25, 66, 0.76);
  font-size: 0.88rem;
}

.verdict-highlight.least-suspicious {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(160deg, rgba(229, 255, 246, 0.96), rgba(255, 255, 255, 0.96));
}

.verdict-highlight.most-suspicious {
  border-color: rgba(245, 101, 101, 0.35);
  background: linear-gradient(160deg, rgba(255, 237, 237, 0.96), rgba(255, 255, 255, 0.96));
}

.verdict-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.verdict-list li,
.verdict-entry {
  border: 2px solid rgba(124, 107, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
  box-shadow: 0 10px 18px rgba(124, 107, 255, 0.1);
}

.verdict-entry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.verdict-rank {
  font-size: 0.9rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 107, 255, 0.18);
  color: rgba(35, 25, 66, 0.86);
}

.verdict-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.verdict-tier {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.verdict-entry.is-gold {
  border-color: rgba(255, 193, 7, 0.45);
  background: linear-gradient(135deg, rgba(255, 250, 230, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 28px rgba(255, 193, 7, 0.22);
}

.verdict-entry.is-silver {
  border-color: rgba(107, 114, 128, 0.35);
  background: linear-gradient(135deg, rgba(243, 244, 246, 0.98), rgba(255, 255, 255, 0.98));
}

.verdict-entry.is-bronze {
  border-color: rgba(180, 83, 9, 0.35);
  background: linear-gradient(135deg, rgba(255, 240, 224, 0.98), rgba(255, 255, 255, 0.98));
}

.verdict-entry.is-gold .verdict-tier {
  background: rgba(255, 193, 7, 0.2);
  color: #b45309;
}

.verdict-entry.is-silver .verdict-tier {
  background: rgba(107, 114, 128, 0.18);
  color: #4b5563;
}

.verdict-entry.is-bronze .verdict-tier {
  background: rgba(180, 83, 9, 0.18);
  color: #92400e;
}

.verdict-meter {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  overflow: hidden;
  margin: 10px 0 8px;
}

.verdict-meter span {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.95), rgba(217, 119, 6, 0.95));
  border-radius: inherit;
  transition: width 0.4s ease;
}

.verdict-list h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.verdict-list p {
  margin: 0;
  color: rgba(35, 25, 66, 0.85);
  white-space: pre-wrap;
}

.verdict-list .verdict-meta {
  margin: 0 0 6px;
  color: rgba(35, 25, 66, 0.65);
  font-size: 0.88rem;
}

.verdict-list .verdict-score {
  color: #b45309;
  font-weight: 700;
}

.verdict-entry.suspicion-low .verdict-meter {
  background: rgba(16, 185, 129, 0.22);
}

.verdict-entry.suspicion-low .verdict-meter span {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.95), rgba(5, 150, 105, 0.95));
}

.verdict-entry.suspicion-medium .verdict-meter {
  background: rgba(245, 158, 11, 0.2);
}

.verdict-entry.suspicion-medium .verdict-meter span {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.95), rgba(217, 119, 6, 0.95));
}

.verdict-entry.suspicion-high .verdict-meter {
  background: rgba(245, 101, 101, 0.18);
}

.verdict-entry.suspicion-high .verdict-meter span {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.95), rgba(220, 38, 38, 0.95));
}

.verdict-list .verdict-entry.suspicion-low .verdict-score {
  color: #047857;
}

.verdict-list .verdict-entry.suspicion-medium .verdict-score {
  color: #b45309;
}

.verdict-list .verdict-entry.suspicion-high .verdict-score {
  color: #dc2626;
}

.verdict-list .verdict-reason {
  color: rgba(35, 25, 66, 0.8);
  font-weight: 600;
}

.verdict-list .verdict-loading {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.verdict-loading-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(240, 232, 255, 0.95));
  border: 2px solid rgba(124, 107, 255, 0.35);
  box-shadow: 0 16px 30px rgba(76, 29, 149, 0.2);
  display: grid;
  gap: 10px;
  text-align: center;
}

.verdict-loading-sparks {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 1.35rem;
}

.verdict-loading-spark {
  display: inline-block;
  filter: drop-shadow(0 2px 6px rgba(124, 107, 255, 0.35));
  animation: verdict-spark-pop 1.8s ease-in-out infinite;
  animation-delay: var(--spark-delay, 0ms);
}

.verdict-loading-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #3b1b6a;
}

.verdict-loading-card p {
  margin: 0;
  color: rgba(35, 25, 66, 0.75);
}

.verdict-loading-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(124, 107, 255, 0.15);
  overflow: hidden;
  position: relative;
}

.verdict-loading-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.9), rgba(124, 107, 255, 0.95), rgba(236, 72, 153, 0.9));
  border-radius: 999px;
  transition: width 120ms linear;
}

.verdict-loading-progress {
  font-weight: 700;
  color: #6d28d9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.gameover {
  margin-top: 24px;
}

.gameover-card {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(244, 240, 255, 0.95));
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  border: 2px solid rgba(124, 107, 255, 0.16);
}

.gameover-hero h2 {
  margin: 0;
  font-size: 2rem;
}

.gameover-subtitle {
  margin: 6px 0 0;
  color: rgba(35, 25, 66, 0.72);
  font-weight: 700;
}

.gameover-winner {
  margin: 0;
  font-weight: 800;
  color: #3b1b6a;
}

.gameover-section {
  display: grid;
  gap: 10px;
}

.gameover-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.gameover-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid rgba(124, 107, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 255, 0.96));
}

.gameover-entry.is-winner {
  border-color: rgba(255, 193, 7, 0.5);
  background: linear-gradient(145deg, rgba(255, 250, 230, 0.98), rgba(255, 255, 255, 0.98));
}

.gameover-rank {
  font-size: 0.88rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 107, 255, 0.18);
}

.gameover-score {
  margin-left: auto;
  font-weight: 800;
  color: #4c1d95;
}

@keyframes verdict-spark-pop {
  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 0.92;
  }
  35% {
    transform: translateY(-7px) scale(1.08) rotate(-4deg);
    opacity: 1;
  }
  65% {
    transform: translateY(-2px) scale(0.98) rotate(3deg);
    opacity: 0.95;
  }
}

.verdict-visible main,
.verdict-visible #alibiScreen,
.verdict-visible #lobby {
  display: none;
}

.gameover-visible main,
.gameover-visible #alibiScreen,
.gameover-visible #lobby,
.gameover-visible #verdictScreen {
  display: none;
}

.game-hidden main {
  display: none;
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 20px 18px 32px;
  }

  .verdict-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .verdict-glance-hud {
    flex-wrap: wrap;
    gap: 10px;
  }

  .lobby-card {
    padding: 22px;
  }

  .room-code-value {
    font-size: 1.6rem;
    letter-spacing: 0.12em;
  }

  .copy-room-code {
    right: 2px;
    width: 34px;
    height: 34px;
  }

  .alibi-glance-hud {
    position: static;
    transform: none;
    gap: 10px;
  }

  .alibi-glance-stat span {
    font-size: 0.54rem;
  }

  .alibi-glance-stat strong {
    font-size: 0.9rem;
  }

  .alibi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 0;
    gap: 10px;
  }
}
