:root {
  --bg: #f8f5ef;
  --bg-2: #ece4d8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #18181b;
  --muted: #5e5d67;
  --brand: #0b6e4f;
  --brand-2: #16a34a;
  --accent: #ea580c;
  --accent-soft: #fff1e8;
  --danger: #b00020;
  --ok: #166534;
  --ring: #ffd166;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --radius-card: 16px;
  --radius-control: 12px;
  --control-height: 48px;
  --border-soft: #cbd5e1;
  --border-strong: rgba(100, 116, 139, 0.28);
  --focus-ring: rgba(250, 204, 21, 0.45);
  --radius: 16px;
  --shadow: 0 16px 36px rgba(25, 22, 40, 0.12);
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Noto Sans", sans-serif;
  background:
    radial-gradient(circle at 8% -2%, rgba(251, 191, 36, 0.2), transparent 32%),
    radial-gradient(circle at 92% 0%, rgba(14, 116, 144, 0.18), transparent 38%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}

.booting #authSection,
.booting #appSection {
  display: none !important;
}

.container {
  width: min(1180px, 94vw);
  margin: 1rem auto 4rem;
}

.hero {
  position: relative;
  margin-bottom: 1rem;
  border-radius: 24px;
  background:
    linear-gradient(130deg, rgba(11, 110, 79, 0.95), rgba(6, 95, 70, 0.9)),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.16), transparent 48%);
  box-shadow: 0 22px 40px rgba(11, 66, 51, 0.34);
  color: #f9fffc;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 7px, transparent 7px, transparent 16px);
  pointer-events: none;
}

.heroTop {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem;
}

.heroContent {
  display: grid;
  gap: 0.75rem;
  max-width: min(720px, 100%);
  padding-right: 4.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brandText h1 {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.96;
  letter-spacing: 0.02em;
}

.heroTagline {
  margin: 0.2rem 0 0;
  color: rgba(244, 255, 250, 0.9);
  font-weight: 600;
}

.heroLead {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(248, 255, 252, 0.92);
}

.heroCta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 210px;
  border-radius: 999px;
  padding: 0.76rem 1.05rem;
  color: #0f172a;
  background: linear-gradient(90deg, #ffd166, #fbbf24);
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 22px rgba(40, 23, 0, 0.25);
}

.heroCta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(40, 23, 0, 0.3);
}

.siteLogo {
  width: clamp(72px, 12vw, 98px);
  height: clamp(72px, 12vw, 98px);
  object-fit: contain;
  border-radius: 18px;
  padding: 0.28rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

#homeIntro {
  border: 1px solid rgba(234, 88, 12, 0.25);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 238, 0.96));
}

.introBadges {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.introBadge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.83rem;
  font-weight: 700;
  background: #fff7ed;
  padding: 0.34rem 0.65rem;
}

h1,
h2,
h3 {
  font-family: "Chakra Petch", sans-serif;
  margin: 0.2rem 0 0.7rem;
}

.small {
  color: var(--muted);
  font-size: 0.9rem;
}

.themeBadge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.28rem 0.64rem;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  margin: 0.15rem 0 0.45rem;
}

.theme-sciences {
  background: #e0f2fe;
  color: #0c4a6e;
  border-color: #7dd3fc;
}

.theme-litterature {
  background: #fdf2f8;
  color: #831843;
  border-color: #f9a8d4;
}

.theme-cinema {
  background: #ede9fe;
  color: #4c1d95;
  border-color: #c4b5fd;
}

.theme-histoire {
  background: #ffedd5;
  color: #7c2d12;
  border-color: #fdba74;
}

.theme-geographie {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

.theme-culture-g {
  background: #fef9c3;
  color: #713f12;
  border-color: #fde047;
}

.theme-musique {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fca5a5;
}

.theme-aleatoire {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #cbd5e1;
}

ul.stack {
  margin: 0;
  padding-left: 1.1rem;
}

ul.stack li {
  line-height: 1.35;
}

#playerScoreboard {
  list-style: none;
  padding-left: 0;
  margin: 0.3rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
}

.playerScoreCard {
  border-radius: 14px;
  border: 1px solid #d4d4d8;
  background: linear-gradient(145deg, #fafaf9, #f4f4f5);
  padding: 0.65rem 0.7rem;
  display: grid;
  gap: 0.25rem;
  box-shadow: 0 6px 16px rgba(24, 24, 27, 0.08);
}

.playerScoreCard .rankBadge {
  width: fit-content;
  font-size: 0.76rem;
  font-weight: 800;
  color: #3f3f46;
  background: #e4e4e7;
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
}

.playerScoreCard .playerName {
  font-size: 0.95rem;
  color: #0f172a;
}

.playerScoreCard .playerPoints {
  font-size: 1.8rem;
  line-height: 1;
  color: #14532d;
}

.playerScoreCard .playerMeta {
  font-size: 0.82rem;
  color: #3f3f46;
}

.playerScoreCard.is-active {
  border-color: #0ea5e9;
  background: linear-gradient(145deg, #ecfeff, #cffafe);
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.2);
}

.playerScoreCard.is-leader {
  border-color: #f59e0b;
  background: linear-gradient(145deg, #fef3c7, #fde68a);
}

#roundSummary {
  background:
    radial-gradient(circle at 10% 10%, rgba(125, 211, 252, 0.22), transparent 45%),
    linear-gradient(145deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
}

#finalSummary {
  background:
    radial-gradient(circle at 85% 12%, rgba(250, 204, 21, 0.24), transparent 45%),
    linear-gradient(145deg, #ecfeff, #d1fae5);
  border: 1px solid #6ee7b7;
}

#roundStats,
#finalStats,
.statsTiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.resultTile {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
}

.resultTile strong {
  display: block;
  font-size: 1.72rem;
  line-height: 1;
  color: #0f172a;
}

.resultTile span {
  font-size: 0.82rem;
  color: #334155;
}

#roundPlayersSummary,
#finalPlayersSummary {
  list-style: none;
  padding-left: 0;
  margin: 0.2rem 0 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.resultPlayerRow {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 0.52rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.resultPlayerRow .left {
  font-weight: 700;
  color: #0f172a;
}

.resultPlayerRow .right {
  font-size: 0.9rem;
  color: #334155;
}

.badgeList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.miniBadge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  border: 1px solid rgba(63, 63, 70, 0.14);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  animation: fadeUp 0.3s ease;
}

#authSection > .card:first-child {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(255, 251, 235, 0.9), rgba(255, 255, 255, 0.95));
}

#authSection > .card:last-child {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: 1fr;
}

.stack {
  display: grid;
  gap: 0.6rem;
}

.row {
  display: flex;
  align-items: center;
}

.row.space {
  justify-content: space-between;
}

label {
  display: grid;
  gap: 0.36rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #27272a;
}

.checkboxRow {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #27272a;
}

.checkboxRow input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.08rem;
  flex: 0 0 auto;
}

input,
textarea,
select,
button {
  width: 100%;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-soft);
  padding: 0.72rem 0.82rem;
  font-size: 1rem;
  font-family: inherit;
}

input,
textarea,
select {
  background: var(--surface-strong);
}

select[multiple] {
  min-height: 110px;
}

.friendRow {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.friendActions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

textarea {
  min-height: 110px;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  margin-right: 0.7rem;
  background: linear-gradient(90deg, #334155, #1f2937);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  margin-right: 0.7rem;
  background: linear-gradient(90deg, #334155, #1f2937);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

#reportStatusFilter,
#adminReportStatusFilter,
.reportStatusSelect {
  width: auto;
  min-width: 150px;
}

#refreshSharedGamesBtn {
  width: auto;
  padding: 0.46rem 0.72rem;
  font-size: 0.9rem;
}

button {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #ffffff;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, filter 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button.secondary {
  background: linear-gradient(90deg, #334155, #1f2937);
}

button.danger {
  background: linear-gradient(90deg, #b91c1c, #dc2626);
}

#startBtn {
  font-size: 1.03rem;
  min-height: 54px;
  background: linear-gradient(90deg, #ea580c, #f59e0b);
  box-shadow: 0 12px 20px rgba(155, 69, 10, 0.28);
  border-radius: var(--radius-control);
  margin-top: var(--space-2);
}

#sharedGamesCard,
#startGameCard,
#gameCard,
#roundSummary,
#finalSummary {
  border-width: 1px;
  border-style: solid;
  border-color: var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

#sharedGamesCard,
#startGameCard,
#gameCard {
  background:
    radial-gradient(circle at 88% -10%, rgba(191, 219, 254, 0.22), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
}

#sharedGamesCard h3,
#startGameCard h2,
#gameCard #roundLabel,
#roundSummary h3,
#finalSummary h3 {
  letter-spacing: 0.01em;
}

#sharedGamesHint {
  margin: 0;
}

#sharedGamesList {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

#sharedGamesList .friendRow {
  padding: 0.6rem 0.68rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.82);
}

#sharedGamesList .friendRow span {
  font-size: 0.9rem;
  color: #1f2937;
}

#sharedGamesList .friendActions button {
  width: auto;
  padding: 0.44rem 0.68rem;
}

#gameCard .row.space {
  margin-bottom: 0.2rem;
}

#questionCategoryLabel {
  margin-top: 0.2rem;
}

#questionWrap h3 {
  margin: 0.1rem 0 0.35rem;
  font-size: clamp(1.06rem, 2.2vw, 1.22rem);
  line-height: 1.3;
  color: #0f172a;
}

#questionWrap img {
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#questionWrap .secondary {
  background: linear-gradient(90deg, #475569, #334155);
}

button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 3px solid var(--ring);
  outline-offset: 1px;
}

#questionWrap .choiceBtn {
  text-align: left;
  background: #f0fdf4;
  color: #14532d;
  border: 1px solid #bbf7d0;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(20, 83, 45, 0.08);
}

#questionWrap .choiceBtn:hover {
  transform: translateY(-1px);
  background: #dcfce7;
  box-shadow: 0 7px 14px rgba(20, 83, 45, 0.14);
}

#questionWrap .choiceBtn.is-locked {
  opacity: 0.95;
  cursor: not-allowed;
}

#questionWrap .choiceBtn.is-correct {
  background: #16a34a;
  color: #ffffff;
  border-color: #15803d;
}

#questionWrap .choiceBtn.is-wrong {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

#feedback {
  margin-top: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  background: #e2e8f0;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  min-height: 50px;
}

#feedback.is-correct {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

#feedback.is-wrong {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fca5a5;
}

.timerWrap {
  height: 10px;
  background: #dde8ec;
  border-radius: 99px;
  overflow: hidden;
  margin: 0.6rem 0 1rem;
}

.timerBar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #86efac);
  transition: width 0.8s linear;
}

#questionTimerLabel {
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 800;
  min-width: 90px;
  height: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: radial-gradient(circle at 30% 30%, #22c55e 0%, #15803d 65%);
  box-shadow: 0 8px 20px rgba(22, 101, 52, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

#questionTimerLabel.is-warning {
  background: radial-gradient(circle at 30% 30%, #ffd166 0%, #ef8354 65%);
  box-shadow: 0 8px 20px rgba(239, 131, 84, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

#questionTimerLabel.is-critical {
  background: radial-gradient(circle at 30% 30%, #ff6b6b 0%, #c1121f 65%);
  box-shadow: 0 10px 26px rgba(193, 18, 31, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

#questionTimerLabel.is-tick {
  animation: timerTickPulse 0.95s ease;
}

@keyframes timerTickPulse {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.1);
  }

  55% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1);
  }
}

.hidden {
  display: none !important;
}

.accountToggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(90deg, #0f172a, #1f2937);
  color: #fff;
  padding: 0.56rem 0.82rem;
  box-shadow: 0 6px 14px rgba(2, 8, 23, 0.35);
}

.accountIcon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #facc15;
  color: #111827;
  font-size: 0.8rem;
  font-weight: 800;
}

.accountPanel {
  position: sticky;
  top: 0.6rem;
  z-index: 10;
}

.accountCloseBtn {
  width: auto;
  padding: 0.45rem 0.7rem;
}

.accountTabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.2rem 0 0.8rem;
}

.tabBtn {
  width: auto;
  background: #e2e8f0;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.7rem;
}

.tabBtn.active {
  background: linear-gradient(90deg, #0f766e, #0ea5a5);
  color: #fff;
  border-color: #0f766e;
}

.tabPanel {
  padding-top: 0.3rem;
}

.adminTopGrid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

#adminDifficultyList {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.adminDifficultyInline {
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow-x: auto;
}

.settingsCompactRow {
  align-items: start;
  gap: var(--space-3);
}

.settingsGrid {
  display: grid;
  gap: var(--space-3);
  align-items: start;
}

.settingsBlock {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-card);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.85), rgba(248, 250, 252, 0.9));
}

.settingsBlock h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.settingsCompactRow label {
  margin: 0;
}

#startGameCard label {
  display: grid;
  gap: var(--space-1);
  font-size: 0.9rem;
  margin: 0;
}

.form-control {
  min-height: var(--control-height);
  width: 100%;
  font-size: 0.95rem;
  padding: 0.6rem 0.72rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
  background: #fff;
}

.form-control:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: #f59e0b;
}

#startGameCard #friendPlayersSelect {
  min-height: 108px;
}

#friendPlayersHint,
#questionPlan {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
}

#questionPlan {
  margin-top: var(--space-2);
}

#gameCard #questionWrap {
  gap: 0.5rem;
}

#gameCard #questionWrap .choiceBtn {
  font-size: 0.95rem;
  padding: 0.62rem 0.7rem;
}

#leaderboard {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.1rem;
}

.podiumWrap {
  margin: 0.6rem 0 1rem;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(161, 98, 7, 0.25);
  background: linear-gradient(140deg, #fffbeb, #fefce8);
}

.podiumStage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
}

.podiumSlot {
  display: grid;
  gap: 0.25rem;
  text-align: center;
}

.podiumMedal {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.podiumName {
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.podiumScore {
  font-size: 0.8rem;
  color: #475569;
}

.podiumBlock {
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(24, 24, 27, 0.15);
}

.podiumSlot.bronze .podiumMedal {
  color: #92400e;
}

.podiumSlot.bronze .podiumBlock {
  min-height: 64px;
  background: linear-gradient(180deg, #fdba74, #ea580c);
}

.podiumSlot.gold .podiumMedal {
  color: #854d0e;
}

.podiumSlot.gold .podiumBlock {
  min-height: 104px;
  background: linear-gradient(180deg, #fde047, #eab308);
}

.podiumSlot.silver .podiumMedal {
  color: #475569;
}

.podiumSlot.silver .podiumBlock {
  min-height: 82px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.modal {
  width: min(92vw, 480px);
  border: 0;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  z-index: 2100;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: none;
}

.modalCard {
  position: relative;
  z-index: 1;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.deleteAccountZone {
  margin-top: 0.35rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(185, 28, 28, 0.35);
}

#profileDifficultyList li,
#profileThemeList li,
#leaderboard li {
  overflow-wrap: anywhere;
}

.tableWrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: #fff;
}

.simpleTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.simpleTable th,
.simpleTable td {
  text-align: left;
  padding: 0.52rem 0.62rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 0.88rem;
  color: #1f2937;
}

.simpleTable th {
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.simpleTable tbody tr:last-child td {
  border-bottom: 0;
}

.siteFooter {
  margin: 1rem 0 0.4rem;
  padding: 0.8rem 0.2rem 0.2rem;
  border-top: 1px solid rgba(100, 116, 139, 0.35);
}

.footerNav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.footerNav a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.footerNav a:hover {
  text-decoration: underline;
}

.legalPage .card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.legalPage .card li {
  margin-bottom: 0.34rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  min-width: 220px;
  text-align: center;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2000;
  backdrop-filter: none;
}

.toast.show {
  opacity: 1;
}

.toast.err {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fecaca;
}

.ok {
  color: var(--ok);
}

.err {
  color: var(--danger);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@media (min-width: 760px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }

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

  .adminTopGrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1080px) {
  .settingsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .container {
    width: min(100%, 96vw);
    margin: 0.6rem auto 3rem;
  }

  .heroTop {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .heroLead {
    font-size: 0.95rem;
  }

  .heroCta {
    min-width: 100%;
  }

  .brand {
    align-items: flex-start;
  }

  .accountPanel {
    position: static;
  }

  .accountToggle {
    position: static;
    top: auto;
    right: auto;
    align-self: flex-end;
  }

  .heroContent {
    max-width: 100%;
    padding-right: 0;
  }

  .card {
    padding: 0.88rem;
  }

  input,
  textarea,
  select,
  button {
    min-height: 44px;
  }

  #startGameCard input,
  #startGameCard select {
    font-size: 0.94rem;
    min-height: 44px;
  }

  #questionTimerLabel {
    min-width: 74px;
    height: 74px;
    font-size: 2rem;
  }

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

  .row.space {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tabBtn {
    flex: 1 1 48%;
    text-align: center;
  }

  .row {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
  }

  .row > button {
    width: auto;
    flex: 1 1 140px;
  }

  #startBtn {
    min-height: 52px;
  }

  #reportStatusFilter,
  #adminReportStatusFilter,
  .reportStatusSelect {
    width: 100%;
    min-width: 0;
  }

  .footerNav {
    gap: 0.45rem 0.8rem;
  }

  .podiumName {
    font-size: 0.84rem;
  }

  .podiumSlot.bronze .podiumBlock {
    min-height: 54px;
  }

  .podiumSlot.gold .podiumBlock {
    min-height: 86px;
  }

  .podiumSlot.silver .podiumBlock {
    min-height: 68px;
  }
}

@media (max-width: 640px) {
  .hero {
    border-radius: 18px;
  }

  .heroTop {
    padding: 0.85rem;
  }

  .siteLogo {
    width: 62px;
    height: 62px;
    border-radius: 12px;
  }

  .brandText h1 {
    font-size: clamp(1.8rem, 9vw, 2.25rem);
  }

  .heroTagline,
  .heroLead {
    font-size: 0.9rem;
  }

  .card {
    border-radius: 14px;
    padding: 0.8rem;
  }

  .accountTabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tabBtn {
    flex: initial;
    width: 100%;
  }

  #questionTimerLabel {
    min-width: 66px;
    height: 66px;
    font-size: 1.7rem;
  }

  .podiumStage {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .podiumSlot {
    text-align: left;
  }

  .podiumBlock {
    min-height: 18px !important;
    border-radius: 8px;
  }

  .modal {
    width: min(96vw, 480px);
  }
}
