:root,
[data-theme="dark"] {
  --app-bg: #0a0e14;
  --app-card: #141a24;
  --app-accent: #ff2d55;
  --app-accent-soft: rgba(255, 45, 85, 0.15);
  --app-text: #f1f5f9;
  --app-muted: #94a3b8;
  --app-nav-bg: rgba(10, 14, 20, 0.88);
  --app-nav-border: rgba(255, 255, 255, 0.07);
  --app-nav-link: #f1f5f9;
  --app-gradient-mid: #151828;
  --app-timer-track: rgba(255, 255, 255, 0.12);
  --app-answer-border: rgba(255, 255, 255, 0.14);
  --app-answer-bg: rgba(255, 255, 255, 0.04);
  --app-winner-border: rgba(255, 255, 255, 0.1);
  --app-form-bg: rgba(255, 255, 255, 0.06);
  --app-form-border: rgba(255, 255, 255, 0.12);
  --app-list-border: rgba(255, 255, 255, 0.08);
  --app-table-border: rgba(255, 255, 255, 0.1);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-nav: "Montserrat", system-ui, sans-serif;
}

[data-theme="light"] {
  --app-bg: #f8fafc;
  --app-card: #ffffff;
  --app-accent: #e11d48;
  --app-accent-soft: rgba(225, 29, 72, 0.1);
  --app-text: #0f172a;
  --app-muted: #64748b;
  --app-nav-bg: rgba(255, 255, 255, 0.92);
  --app-nav-border: rgba(15, 23, 42, 0.08);
  --app-nav-link: #0f172a;
  --app-gradient-mid: #e0e7ff;
  --app-timer-track: rgba(0, 0, 0, 0.08);
  --app-answer-border: rgba(0, 0, 0, 0.1);
  --app-answer-bg: #ffffff;
  --app-winner-border: rgba(0, 0, 0, 0.06);
  --app-form-bg: #ffffff;
  --app-form-border: rgba(15, 23, 42, 0.12);
  --app-list-border: rgba(15, 23, 42, 0.08);
  --app-table-border: rgba(15, 23, 42, 0.1);
}

.app-body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(1000px 520px at 50% -15%, var(--app-gradient-mid) 0%, var(--app-bg) 52%);
  color: var(--app-text);
  transition: background 0.25s ease, color 0.25s ease;
}

[data-theme="dark"] .app-body {
  background: radial-gradient(1000px 520px at 50% -18%, rgba(21, 24, 40, 0.85) 0%, var(--app-bg) 58%);
}

.app-body--game .container.pb-5 {
  padding-top: 0.25rem;
}

/* Экран игры: TikTok-градиент + переливание (слой ::before, контент выше z-index) */
.app-body--game {
  position: relative;
  isolation: isolate;
  background-color: var(--app-bg);
}

/* По умолчанию = тёмная тема: приглушённые акценты на тёмной базе */
.app-body--game::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 130% 100% at 4% 8%, rgba(37, 244, 238, 0.22) 0%, transparent 48%),
    radial-gradient(ellipse 125% 95% at 96% 92%, rgba(254, 44, 85, 0.2) 0%, transparent 48%),
    linear-gradient(
      118deg,
      rgba(67, 56, 202, 0.12) 0%,
      rgba(126, 34, 206, 0.1) 28%,
      rgba(190, 24, 93, 0.11) 52%,
      rgba(8, 145, 178, 0.12) 78%,
      rgba(225, 29, 72, 0.09) 100%
    );
  background-size: 135% 135%, 135% 135%, 320% 320%;
  background-position: 0% 0%, 100% 100%, 12% 42%;
  animation: gameBgShimmer 16s ease-in-out infinite;
}

/* Светлая тема: пастель на светлом --app-bg */
[data-theme="light"] .app-body--game::before {
  background:
    radial-gradient(ellipse 130% 100% at 6% 10%, rgba(125, 211, 252, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse 125% 95% at 94% 90%, rgba(251, 207, 232, 0.52) 0%, transparent 50%),
    linear-gradient(
      122deg,
      rgba(199, 210, 254, 0.65) 0%,
      rgba(233, 213, 255, 0.55) 26%,
      rgba(254, 202, 202, 0.5) 52%,
      rgba(186, 230, 253, 0.58) 78%,
      rgba(254, 215, 170, 0.45) 100%
    );
  background-size: 135% 135%, 135% 135%, 320% 320%;
  background-position: 0% 0%, 100% 100%, 12% 42%;
  animation: gameBgShimmer 16s ease-in-out infinite;
}

.app-body--game > * {
  position: relative;
  z-index: 1;
}

@keyframes gameBgShimmer {
  0% {
    background-position: 0% 0%, 100% 100%, 8% 38%;
  }
  25% {
    background-position: 18% 12%, 82% 88%, 45% 18%;
  }
  50% {
    background-position: 42% 28%, 58% 72%, 88% 55%;
  }
  75% {
    background-position: 72% 8%, 28% 92%, 55% 78%;
  }
  100% {
    background-position: 0% 0%, 100% 100%, 8% 38%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-body--game::before {
    animation: none;
    background-position: 0% 0%, 100% 100%, 30% 45%;
  }
}

.play-current-player {
  font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
}

.app-body--game .play-current-player {
  display: inline-block;
  max-width: min(100%, 44rem);
  margin-left: auto;
  margin-right: auto;
  padding: 0.65rem 1.35rem;
  border-radius: 1.25rem;
  /* «Отвечает:» — светлый на тёмном стекле */
  color: rgba(241, 245, 249, 0.92);
  background: rgba(15, 18, 28, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .app-body--game .play-current-player {
  color: #64748b;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  box-shadow:
    0 4px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  text-shadow: none;
}

/* Имя: на тёмной теме — белый; на светлой — почти чёрный */
.app-body--game .play-current-player .text-accent {
  color: #ffffff !important;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .app-body--game .play-current-player .text-accent {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  text-shadow: none;
}

.play-finish-fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--app-form-border);
  background: rgba(22, 24, 35, 0.92);
  color: #fff;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 0.6rem 0.75rem;
  min-width: 3.1rem;
  justify-content: center;
}

.play-finish-fab:hover {
  color: #fff;
  transform: translateY(-1px);
}

.play-finish-fab__icon {
  font-size: 1rem;
  line-height: 1;
}

.play-finish-fab__count {
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  background: linear-gradient(135deg, #25f4ee 0%, #fe2c55 100%);
  color: #0d0e14;
}

/* кнопка 👥 */
.play-players-fab {
  position: fixed;
  left: 1rem;
  bottom: 4.35rem;
  z-index: 1210;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid var(--app-form-border);
  background: rgba(22, 24, 35, 0.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.play-players-fab:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}
.play-players-fab--active {
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.35), rgba(254, 44, 85, 0.35));
  border-color: rgba(254, 44, 85, 0.6);
}

/* панель участников */
.play-players-panel {
  position: fixed;
  left: 4.8rem;
  bottom: 4.35rem;
  z-index: 1209;
  width: min(320px, calc(100vw - 5.5rem));
  max-height: min(480px, 75vh);
  display: flex;
  flex-direction: column;
  background: rgba(14, 16, 26, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(18px);
  overflow: hidden;
  animation: ppFadeIn 0.18s ease;
}
@keyframes ppFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.play-players-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.play-players-panel__title {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.play-players-panel__close {
  background: none;
  border: none;
  color: var(--app-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 0.35rem;
  transition: color 0.15s ease;
}
.play-players-panel__close:hover { color: #fff; }

/* список */
.play-players-panel__list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  overflow-y: auto;
  flex: 1 1 auto;
  overscroll-behavior: contain;
}
.play-players-panel__list::-webkit-scrollbar { width: 4px; }
.play-players-panel__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.play-players-panel__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  margin: 0.15rem 0.4rem;
  cursor: default;
  user-select: none;
  transition: background 0.12s ease;
}
.play-players-panel__item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.play-players-panel__item--dragging {
  opacity: 0.45;
  background: rgba(37, 244, 238, 0.08);
}
.play-players-panel__item--over {
  background: rgba(254, 44, 85, 0.12);
  outline: 1px dashed rgba(254, 44, 85, 0.5);
}

.play-players-panel__drag {
  font-size: 1rem;
  color: var(--app-muted);
  cursor: grab;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.12s ease;
}
.play-players-panel__item:hover .play-players-panel__drag { opacity: 1; }
.play-players-panel__drag:active { cursor: grabbing; }

.play-players-panel__name {
  flex: 1 1 auto;
  font-size: 0.92rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-players-panel__del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.1rem 0.25rem;
  border-radius: 0.35rem;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
}
.play-players-panel__item:hover .play-players-panel__del,
.play-players-panel__del:focus { opacity: 1; }
.play-players-panel__del:hover { background: rgba(254, 44, 85, 0.18); }

/* поле добавления */
.play-players-panel__add {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.play-players-panel__input {
  flex: 1 1 auto;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.55rem;
  color: #f1f5f9;
  font-size: 0.88rem;
  padding: 0.35rem 0.6rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.play-players-panel__input:focus {
  border-color: rgba(37, 244, 238, 0.55);
}
.play-players-panel__input::placeholder { color: rgba(255,255,255,0.3); }

.play-players-panel__add-btn {
  background: rgba(37, 244, 238, 0.15);
  border: 1px solid rgba(37, 244, 238, 0.35);
  border-radius: 0.55rem;
  color: #25f4ee;
  font-size: 1.1rem;
  padding: 0 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease;
  line-height: 1;
  flex-shrink: 0;
}
.play-players-panel__add-btn:hover { background: rgba(37, 244, 238, 0.28); }

/* сообщение */
.play-players-panel__msg {
  font-size: 0.78rem;
  padding: 0.2rem 0.7rem 0.45rem;
  min-height: 1.3em;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.play-players-panel__msg--err { color: #f87171; }

.play-skip-fab {
  position: fixed;
  left: 1rem;
  z-index: 1200;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid var(--app-form-border);
  background: rgba(22, 24, 35, 0.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.play-skip-fab { bottom: 7.7rem; }


.play-font-tools {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  background: rgba(22, 24, 35, 0.82);
  border: 1px solid var(--app-form-border);
  border-radius: 0.75rem;
  padding: 0.45rem 0.6rem;
  width: 150px;
}

.play-tts-btn {
  border: 1px solid var(--app-form-border);
  background: rgba(22, 24, 35, 0.55);
  color: var(--app-text);
  border-radius: 0.65rem;
  padding: 0.35rem 0.55rem;
  line-height: 1;
  font-size: 1.15rem;
  min-width: 2.5rem;
}

.play-tts-btn:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.45);
  color: var(--app-text);
}

.play-tts-btn:disabled {
  opacity: 0.55;
}

[data-theme="light"] .play-tts-btn {
  background: rgba(255, 255, 255, 0.85);
}

.play-question-body-wrap {
  min-width: 0;
}

.deep-active-team-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  max-width: 100%;
  padding: 0.5rem 1.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--app-form-border);
  background: rgba(22, 24, 35, 0.65);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.deep-active-team-pill__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--app-muted, #8a8b9a);
  font-weight: 600;
}

.deep-active-team-pill__name {
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--app-text);
}

.deep-active-team-pill--team0 {
  border-color: rgba(254, 44, 85, 0.55);
  background: linear-gradient(135deg, rgba(254, 44, 85, 0.18), rgba(22, 24, 35, 0.75));
  box-shadow: 0 10px 32px rgba(254, 44, 85, 0.15);
}

.deep-active-team-pill--team1 {
  border-color: rgba(37, 244, 238, 0.5);
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.16), rgba(22, 24, 35, 0.75));
  box-shadow: 0 10px 32px rgba(37, 244, 238, 0.12);
}

[data-theme="light"] .deep-active-team-pill {
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .deep-active-team-pill--team0 {
  background: linear-gradient(135deg, rgba(254, 44, 85, 0.12), rgba(255, 255, 255, 0.95));
}

[data-theme="light"] .deep-active-team-pill--team1 {
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.14), rgba(255, 255, 255, 0.95));
}

/* Кнопка паузы рядом с таймером */
.deep-timer-pause-btn {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.1rem 0.25rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.15s, transform 0.15s;
}
.deep-timer-pause-btn:hover {
  color: #fff;
  transform: scale(1.15);
  background: transparent;
}
[data-theme="light"] .deep-timer-pause-btn { color: rgba(0, 0, 0, 0.35); }
[data-theme="light"] .deep-timer-pause-btn:hover { color: #161823; }

/* ── Строка статистики команд (вокруг пилюли) ── */
.deep-battle-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.deep-team-stat {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.deep-team-stat--team0 { text-align: right; }
.deep-team-stat--team1 { text-align: left; }

.deep-team-stat--current.deep-team-stat--team0 {
  border-color: rgba(254, 44, 85, 0.4);
  background: rgba(254, 44, 85, 0.08);
}
.deep-team-stat--current.deep-team-stat--team1 {
  border-color: rgba(37, 244, 238, 0.35);
  background: rgba(37, 244, 238, 0.07);
}

.deep-team-stat__name {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
  color: var(--app-text-secondary, #aaa);
  letter-spacing: 0.01em;
}

.deep-team-stat__verdicts {
  display: flex;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
}
.deep-team-stat--team0 .deep-team-stat__verdicts { justify-content: flex-end; }
.deep-team-stat--team1 .deep-team-stat__verdicts { justify-content: flex-start; }

.deep-team-stat__correct { color: #25f4ee; }
.deep-team-stat__wrong   { color: #fe2c55; }

[data-theme="light"] .deep-team-stat__correct { color: #0099cc; }
[data-theme="light"] .deep-team-stat__wrong   { color: #d6173a; }
[data-theme="light"] .deep-team-stat--current.deep-team-stat--team0 {
  background: rgba(214, 23, 58, 0.07);
}
[data-theme="light"] .deep-team-stat--current.deep-team-stat--team1 {
  background: rgba(0, 153, 204, 0.07);
}

@media (max-width: 480px) {
  .deep-battle-scoreboard { gap: 0.4rem; }
  .deep-team-stat { max-width: 110px; padding: 0.35rem 0.4rem; }
  .deep-team-stat__name { font-size: 0.68rem; }
  .deep-team-stat__verdicts { font-size: 0.72rem; gap: 0.3rem; }
}

.admin-shell {
  background: radial-gradient(900px 480px at 80% 0%, rgba(99, 102, 241, 0.12) 0%, var(--app-bg) 45%);
}

[data-theme="light"] .admin-shell {
  background: radial-gradient(900px 480px at 80% 0%, rgba(99, 102, 241, 0.08) 0%, var(--app-bg) 45%);
}

.app-navbar {
  background: var(--app-nav-bg) !important;
  border-bottom: 1px solid var(--app-nav-border);
  backdrop-filter: blur(12px);
  font-family: var(--font-nav);
}

.app-navbar .navbar-nav,
.app-navbar .navbar-nav .nav-link,
.app-navbar .nav-pill,
.app-navbar .fullscreen-btn {
  font-family: var(--font-nav);
}

.app-navbar .navbar-brand {
  color: var(--app-nav-link) !important;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--app-text), var(--app-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

[data-theme="light"] .brand-title {
  background: linear-gradient(90deg, #0f172a, #e11d48);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-muted) !important;
  opacity: 0.95;
}

.nav-pill {
  color: var(--app-accent);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: var(--app-accent-soft);
  transition: transform 0.15s ease;
}

.nav-pill:hover {
  color: var(--app-accent);
  transform: translateY(-1px);
}

.fullscreen-btn {
  border: 0;
  line-height: 1;
  cursor: pointer;
}

/* Переключатель темы: 🌙 — тёмная, ☀️ — светлая */
.theme-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.theme-switch__control {
  position: relative;
  width: 3.2rem;
  height: 1.55rem;
  flex-shrink: 0;
}

.theme-switch__input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.theme-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.45);
  border: 1px solid var(--app-form-border);
  transition: background 0.22s ease, border-color 0.22s ease;
  pointer-events: none;
}

.theme-switch__slider::after {
  content: "🌙";
  position: absolute;
  width: 1.24rem;
  height: 1.24rem;
  left: 0.18rem;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s cubic-bezier(0.22, 0.9, 0.35, 1);
}

.theme-switch__input:checked ~ .theme-switch__slider {
  background: linear-gradient(100deg, rgba(37, 244, 238, 0.45), rgba(254, 44, 85, 0.45));
  border-color: rgba(37, 244, 238, 0.35);
}

.theme-switch__input:checked ~ .theme-switch__slider::after {
  content: "☀️";
  transform: translate(1.62rem, -50%);
}

.theme-switch__input:focus-visible ~ .theme-switch__slider {
  outline: 2px solid var(--app-accent);
  outline-offset: 3px;
}

.game-theme-toggle {
  position: fixed;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  font-family: var(--font-nav);
}

.game-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.55rem;
  border-radius: 999px;
  padding: 0 0.5rem;
}

[data-theme="light"] .theme-switch__input:checked ~ .theme-switch__slider {
  background: linear-gradient(100deg, rgba(37, 244, 238, 0.55), rgba(254, 44, 85, 0.5));
}

.app-body .card {
  background: var(--app-card);
  border: 1px solid var(--app-list-border);
  color: var(--app-text);
}

.app-body .text-secondary {
  color: var(--app-muted) !important;
}

.text-accent {
  color: var(--app-accent) !important;
}

#questionBody {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.45;
}

/* ——— Главный экран: выбор темы ——— */
.pick-hero {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.pick-hero--compact .pick-hero__brand {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.pick-hero__live {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #ff2d55;
  box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.35);
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.15);
  }
}

.pick-hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #fff 0%, var(--app-accent) 45%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .pick-hero__brand {
  background: linear-gradient(120deg, #0f172a 0%, #e11d48 50%, #be185d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pick-hero__brand--sm {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.pick-hero__lead {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--app-muted);
  max-width: 36rem;
}

.pick-hero__lead--sm {
  font-size: 0.95rem;
}

.empty-categories {
  border: 1px dashed var(--app-form-border);
  background: var(--app-card);
}

.cat-pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 200px;
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 1.35rem;
  color: #fff !important;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cat-pick-card:hover:not(:disabled) {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.cat-pick-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.cat-pick-card--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
  transform: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.cat-pick-card__shine {
  position: absolute;
  inset: -40% -30%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.06) 52%,
    transparent 60%
  );
  transform: translateX(-100%) rotate(12deg);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.cat-pick-card:hover:not(:disabled) .cat-pick-card__shine {
  transform: translateX(100%) rotate(12deg);
}

.cat-pick-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.75rem;
}

.cat-pick-card__icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.cat-pick-card__badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
}

.cat-pick-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: auto;
  padding-bottom: 0.75rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.cat-pick-card__cta {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

.cat-pick-card--tone0 {
  background: linear-gradient(145deg, #6366f1 0%, #7c3aed 55%, #5b21b6 100%);
}
.cat-pick-card--tone1 {
  background: linear-gradient(145deg, #ec4899 0%, #db2777 50%, #9d174d 100%);
}
.cat-pick-card--tone2 {
  background: linear-gradient(145deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
}
.cat-pick-card--tone3 {
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 50%, #14532d 100%);
}
.cat-pick-card--tone4 {
  background: linear-gradient(145deg, #f97316 0%, #ea580c 50%, #9a3412 100%);
}
.cat-pick-card--tone5 {
  background: linear-gradient(145deg, #a855f7 0%, #9333ea 50%, #6b21a8 100%);
}

.participant-card {
  border-radius: 1.25rem !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .participant-card {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1) !important;
}

/* ——— Админка ——— */
.admin-page-head {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--app-list-border);
}

.admin-page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
}

.admin-breadcrumb a {
  color: var(--app-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-breadcrumb a:hover {
  color: var(--app-accent);
}

.admin-card {
  border-radius: 1rem !important;
  overflow: hidden;
}

.admin-card-header {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  background: rgba(255, 45, 85, 0.08) !important;
  border-bottom: 1px solid var(--app-list-border) !important;
  color: var(--app-text) !important;
}

[data-theme="light"] .admin-card-header {
  background: rgba(225, 29, 72, 0.06) !important;
}

.admin-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.5rem 1.35rem;
  border-radius: 1.15rem;
  text-decoration: none;
  color: var(--app-text) !important;
  background: var(--app-card);
  border: 1px solid var(--app-list-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  height: 100%;
}

.admin-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  border-color: var(--app-accent);
}

.admin-tile__icon {
  font-size: 2rem;
  line-height: 1;
}

.admin-tile__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.admin-tile__hint {
  font-size: 0.85rem;
  color: var(--app-muted);
}

.admin-tile--danger {
  border-color: rgba(220, 53, 69, 0.35);
}

.admin-tile--danger:hover {
  border-color: #dc3545;
}

.admin-q-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-q-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem 1.25rem;
  padding: 1.1rem 1.2rem;
  border-radius: 1.1rem;
  background: var(--app-card);
  border: 1px solid var(--app-list-border);
  color: var(--app-text);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .admin-q-row {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.admin-q-row:hover {
  border-color: rgba(255, 45, 85, 0.35);
}

.admin-q-row__thumb {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 0.85rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-list-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .admin-q-row__thumb {
  background: #f1f5f9;
}

.admin-q-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-q-row__placeholder {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--app-muted);
  opacity: 0.5;
}

.admin-q-row__body {
  flex: 1 1 200px;
  min-width: 0;
}

.admin-q-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-muted);
}

.admin-q-row__id {
  color: var(--app-accent);
}

.admin-q-row__pill {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 45, 85, 0.15);
  color: var(--app-accent);
}

.admin-q-row__text {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--app-text);
}

.admin-q-row__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  align-items: stretch;
}

@media (min-width: 576px) {
  .admin-q-row__actions {
    flex-direction: row;
    align-items: center;
  }
}

.admin-q-empty {
  border-color: var(--app-list-border) !important;
  background: var(--app-card);
  color: var(--app-muted) !important;
}

.admin-q-form-preview {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
}

.admin-q-options-wrap {
  background: var(--app-card);
  border-color: var(--app-list-border) !important;
}

.admin-q-options-thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-muted);
  border-bottom-color: var(--app-list-border) !important;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.admin-q-options-table td,
.admin-q-options-table th {
  border-color: var(--app-list-border) !important;
  vertical-align: middle;
}

.admin-q-options-table__letter {
  width: 6.5rem;
}

.admin-q-options-table__optional td {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .admin-q-options-table__optional td {
  background: rgba(255, 255, 255, 0.04);
}

.admin-q-opt-badge {
  background: rgba(100, 116, 139, 0.35);
  color: var(--app-text);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

.admin-q-opt-badge--req {
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.35), rgba(254, 44, 85, 0.35));
  color: var(--app-text);
}

.admin-q-options-table .form-control-sm {
  min-width: 0;
}

input.js-correct-radio:disabled + label {
  opacity: 0.4;
  cursor: not-allowed;
}

.quiz-question-media {
  width: 100%;
}

.quiz-question-img {
  max-height: min(50vh, 420px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .quiz-question-img {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.admin-login-card {
  border-radius: 1.5rem !important;
  overflow: hidden;
  background: var(--app-card);
  border: 1px solid var(--app-list-border) !important;
}

.admin-login-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--app-text), var(--app-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.min-vh-50 {
  min-height: 45vh;
}

.timer-wrap {
  max-width: 280px;
}

.timer-num {
  font-size: 3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  font-family: var(--font-display);
}

.timer-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--app-timer-track);
  overflow: hidden;
}

.timer-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--app-accent), #a78bfa);
  transform-origin: left center;
  animation: timerShrink var(--duration, 10s) linear forwards;
}

.timer-wrap.timer-frozen .timer-num {
  opacity: 0.75;
}

.timer-wrap.timer-frozen .timer-bar > i {
  animation-play-state: paused;
}

/* TikTok-палитра: #25F4EE (cyan), #FE2C55 (pink), #161823 (app dark) */
.play-timeout-banner {
  font-size: 1.05rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--app-text);
}

.play-timeout-banner--tiktok {
  position: relative;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #25f4ee 0%, #fe2c55 50%, #25f4ee 100%);
  background-size: 200% 200%;
  animation: tiktokBorderShift 4s ease infinite;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 8px 32px rgba(37, 244, 238, 0.12),
    0 12px 40px rgba(254, 44, 85, 0.1);
}

.play-timeout-banner__inner {
  display: block;
  border-radius: calc(1rem - 2px);
  padding: 0.95rem 1.15rem;
  background: linear-gradient(180deg, #161823 0%, #0d0e14 100%);
  color: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .play-timeout-banner__inner {
  background: linear-gradient(180deg, #f6f7fb 0%, #e8eaef 100%);
  color: #161823;
}

.play-timeout-banner__name {
  background: linear-gradient(90deg, #25f4ee, #fe2c55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@keyframes tiktokBorderShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Варианты ответа — сетка 2×2 в стиле TikTok */
.mm-options-grid {
  --tt-cyan: #25f4ee;
  --tt-pink: #fe2c55;
  --tt-dark: #161823;
  --mm-opt-bg: linear-gradient(165deg, #1c1d28 0%, #12131a 50%, #0b0c10 100%);
  --mm-opt-border: rgba(37, 244, 238, 0.35);
  --mm-opt-glow-cyan: rgba(37, 244, 238, 0.22);
  --mm-opt-glow-pink: rgba(254, 44, 85, 0.2);
}

[data-theme="light"] .mm-options-grid {
  --mm-opt-bg: linear-gradient(165deg, #ffffff 0%, #f0f2f8 55%, #e4e7ef 100%);
  --mm-opt-border: rgba(37, 244, 238, 0.45);
  --mm-opt-glow-cyan: rgba(37, 244, 238, 0.18);
  --mm-opt-glow-pink: rgba(254, 44, 85, 0.15);
}

/* Экран игры: кнопки заметнее на анимированном фоне */
.app-body--game .mm-options-grid {
  --mm-opt-bg: linear-gradient(168deg, #2e3144 0%, #222536 42%, #181a24 100%);
  --mm-opt-border: rgba(255, 255, 255, 0.32);
  --mm-opt-glow-cyan: rgba(37, 244, 238, 0.45);
  --mm-opt-glow-pink: rgba(254, 44, 85, 0.42);
}

[data-theme="light"] .app-body--game .mm-options-grid {
  --mm-opt-bg: linear-gradient(168deg, #ffffff 0%, #eef2f8 55%, #e2e8f0 100%);
  --mm-opt-border: rgba(15, 23, 42, 0.22);
  --mm-opt-glow-cyan: rgba(6, 182, 212, 0.35);
  --mm-opt-glow-pink: rgba(244, 63, 94, 0.3);
}

.mm-option {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: 4.5rem;
  padding: 1rem 1.25rem 1rem 1.35rem;
  border-radius: 1rem;
  border: 2px solid var(--mm-opt-border);
  background: var(--mm-opt-bg);
  color: var(--app-text);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-body--game .mm-option {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(37, 244, 238, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .app-body--game .mm-option {
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow:
    0 5px 0 rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(6, 182, 212, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.mm-option--btn {
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

.mm-option--btn:hover {
  transform: translateY(-3px);
  border-color: rgba(254, 44, 85, 0.55);
  box-shadow:
    0 10px 28px var(--mm-opt-glow-cyan),
    0 14px 36px var(--mm-opt-glow-pink),
    0 5px 0 rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mm-option--btn:active {
  transform: translateY(1px);
}

.mm-option__letter {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0.55rem;
  line-height: 1;
  background: linear-gradient(145deg, #25f4ee 0%, #0ea5e9 52%, #fe2c55 100%);
  color: #0a0e14;
  -webkit-text-fill-color: #0a0e14;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .mm-option__letter {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mm-option__text {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.mm-option--reveal {
  min-height: 5rem;
  padding: 1.15rem 1.5rem;
}

.mm-option--idle {
  opacity: 0.45;
  filter: grayscale(0.15);
}

.mm-option--correct {
  opacity: 1;
  filter: none;
  border-color: #22c55e !important;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.35) 0%, rgba(21, 128, 61, 0.45) 100%) !important;
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.45),
    0 0 32px rgba(34, 197, 94, 0.35),
    0 6px 0 rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: mmCorrectPulse 1.1s ease-in-out infinite;
}

.mm-option--correct .mm-option__letter {
  background: linear-gradient(145deg, #4ade80 0%, #16a34a 100%);
  color: #052e16;
  -webkit-text-fill-color: #052e16;
  border-color: rgba(187, 247, 208, 0.85);
  box-shadow:
    0 2px 10px rgba(34, 197, 94, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@keyframes mmCorrectPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(34, 197, 94, 0.45),
      0 0 28px rgba(34, 197, 94, 0.3),
      0 6px 0 rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(34, 197, 94, 0.55),
      0 0 48px rgba(34, 197, 94, 0.45),
      0 6px 0 rgba(0, 0, 0, 0.2);
  }
}

.mm-option--wrong {
  opacity: 1;
  filter: none;
  border-color: #f97316 !important;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.4) 0%, rgba(185, 28, 28, 0.45) 100%) !important;
  box-shadow:
    0 0 0 3px rgba(249, 115, 22, 0.5),
    0 0 28px rgba(239, 68, 68, 0.35),
    0 6px 0 rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: mmWrongPulse 1.1s ease-in-out infinite;
}

.mm-option--wrong .mm-option__letter {
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
  color: #431407;
  -webkit-text-fill-color: #431407;
  border-color: rgba(254, 215, 170, 0.85);
  box-shadow:
    0 2px 10px rgba(249, 115, 22, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

@keyframes mmWrongPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(249, 115, 22, 0.5),
      0 0 26px rgba(239, 68, 68, 0.3),
      0 6px 0 rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(249, 115, 22, 0.65),
      0 0 44px rgba(239, 68, 68, 0.45),
      0 6px 0 rgba(0, 0, 0, 0.2);
  }
}

/* Модалка подтверждения — TikTok */

/* Модальное окно выше всех fixed-элементов страницы
   (play-font-tools z-index:1200, play-players-fab z-index:1210) */
.tiktok-modal.modal {
  z-index: 1310 !important;
}

/* Собственный backdrop вместо Bootstrap — один на все модалы */
.tiktok-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1305;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tiktok-modal-backdrop.active {
  display: block;
}

.tiktok-modal .modal-dialog {
  max-width: min(420px, 94vw);
}

.tiktok-modal__content.modal-content {
  background-color: transparent;
  position: relative;
  border-radius: 1.15rem;
  padding: 2px;
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.85) 0%, rgba(254, 44, 85, 0.85) 100%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(37, 244, 238, 0.12),
    0 0 56px rgba(254, 44, 85, 0.1);
  overflow: hidden;
}

.tiktok-modal__content::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: calc(1.15rem - 2px);
  background: linear-gradient(180deg, #161823 0%, #0d0e14 100%);
  z-index: 0;
}

.tiktok-modal__header,
.tiktok-modal__body,
.tiktok-modal__footer {
  position: relative;
  z-index: 1;
  background: transparent;
}

.tiktok-modal__header {
  padding: 1.1rem 1.25rem 0.5rem;
}

.tiktok-modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #25f4ee, #fe2c55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.tiktok-modal__body {
  padding: 0.75rem 1.25rem 1rem;
  color: rgba(255, 255, 255, 0.92);
}

.tiktok-modal__footer {
  padding: 0.75rem 1rem 1.15rem;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tiktok-btn {
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tiktok-btn--ghost {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(37, 244, 238, 0.45);
}

.tiktok-btn--ghost:hover {
  color: #fff;
  background: rgba(37, 244, 238, 0.12);
  border-color: rgba(37, 244, 238, 0.75);
}

.tiktok-btn--primary {
  color: #0a0a0f;
  border: none;
  background: linear-gradient(90deg, #25f4ee 0%, #5eeef5 45%, #fe2c55 100%);
  background-size: 140% 100%;
  box-shadow: 0 4px 20px rgba(254, 44, 85, 0.35);
}

.tiktok-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(37, 244, 238, 0.35), 0 6px 24px rgba(254, 44, 85, 0.35);
}

.tiktok-btn--primary:active {
  transform: translateY(0);
}

.tiktok-modal__close {
  opacity: 0.75;
  filter: invert(1);
}

.tiktok-modal__close:hover {
  opacity: 1;
}

.play-reveal-countdown {
  font-size: 1.05rem;
}

@keyframes timerShrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.winner-hero {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.12), rgba(147, 51, 234, 0.12));
  border: 1px solid var(--app-winner-border);
  animation: winnerIn 1s ease both;
}

[data-theme="light"] .winner-hero {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08), rgba(147, 51, 234, 0.08));
}

.winner-hero--burst {
  animation: winnerExplodeIn 0.85s cubic-bezier(0.22, 1.2, 0.36, 1) both;
  border: 2px solid rgba(255, 45, 85, 0.45);
  box-shadow:
    0 0 40px rgba(255, 45, 85, 0.45),
    0 0 100px rgba(236, 72, 153, 0.35),
    0 0 160px rgba(168, 85, 247, 0.25),
    inset 0 0 80px rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(ellipse 90% 70% at 50% 25%, rgba(255, 255, 255, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(255, 45, 85, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, rgba(255, 45, 85, 0.2) 0%, rgba(147, 51, 234, 0.15) 45%, rgba(10, 14, 20, 0.4) 100%);
}

[data-theme="light"] .winner-hero--burst {
  box-shadow:
    0 0 50px rgba(225, 29, 72, 0.35),
    0 0 120px rgba(147, 51, 234, 0.2),
    inset 0 0 60px rgba(255, 255, 255, 0.5);
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(225, 29, 72, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, rgba(255, 200, 220, 0.5) 0%, rgba(233, 213, 255, 0.4) 100%);
}

.winner-hero__content {
  z-index: 2;
}

.winner-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: 0.28em;
  margin-bottom: 0.75rem !important;
  color: #fff;
  text-shadow:
    0 0 20px rgba(255, 45, 85, 0.9),
    0 0 40px rgba(255, 200, 100, 0.5),
    0 4px 24px rgba(0, 0, 0, 0.5);
  animation: winnerLabelPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

[data-theme="light"] .winner-label {
  color: #0f172a;
  text-shadow:
    0 0 24px rgba(225, 29, 72, 0.45),
    0 2px 12px rgba(255, 255, 255, 0.8);
}

@keyframes winnerLabelPop {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-6deg);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0);
  }
}

.winner-burst-ring {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 50%;
  border: 4px solid rgba(255, 220, 120, 0.95);
  pointer-events: none;
  z-index: 0;
  animation: burstRingOut 1.1s cubic-bezier(0.1, 0.65, 0.25, 1) forwards;
}

.winner-burst-ring--2 {
  border-color: rgba(255, 45, 85, 0.85);
  animation-delay: 0.1s;
  animation-duration: 1.15s;
}

.winner-burst-ring--3 {
  border-color: rgba(192, 132, 252, 0.9);
  animation-delay: 0.2s;
  animation-duration: 1.2s;
}

@keyframes burstRingOut {
  0% {
    transform: scale(0.15);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 200, 100, 0.8);
  }
  40% {
    opacity: 0.85;
  }
  100% {
    transform: scale(16);
    opacity: 0;
    box-shadow: 0 0 0 24px transparent;
  }
}

.winner-burst-spark {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 120%;
  height: 120%;
  margin-left: -60%;
  margin-top: -45%;
  pointer-events: none;
  z-index: 1;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 200, 80, 0.15) 25deg,
    transparent 50deg,
    rgba(255, 45, 85, 0.12) 80deg,
    transparent 110deg,
    rgba(168, 85, 247, 0.12) 140deg,
    transparent 180deg,
    rgba(255, 200, 80, 0.1) 220deg,
    transparent 260deg,
    rgba(255, 45, 85, 0.1) 300deg,
    transparent 360deg
  );
  animation: sparkSpin 2.5s linear infinite;
  opacity: 0.85;
}

.winner-burst-spark--b {
  animation-direction: reverse;
  animation-duration: 3.5s;
  opacity: 0.5;
  transform: scale(1.1);
}

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

.winner-burst-flash {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 200, 100, 0.2) 25%, transparent 55%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: burstFlash 0.45s ease-out forwards;
}

@keyframes burstFlash {
  0% {
    opacity: 0.95;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

.winner-name {
  text-shadow:
    0 0 32px rgba(255, 45, 85, 0.55),
    0 4px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .winner-name {
  text-shadow: 0 2px 16px rgba(225, 29, 72, 0.25);
}

.winner-score {
  font-weight: 600;
  opacity: 0.95;
}

.winner-title {
  animation: winnerShakePulse 1.8s ease-in-out infinite;
  font-family: var(--font-display);
}

@keyframes winnerExplodeIn {
  0% {
    opacity: 0;
    transform: scale(0.75);
    filter: brightness(2) saturate(2);
  }
  55% {
    opacity: 1;
    transform: scale(1.04);
    filter: brightness(1.15) saturate(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1) saturate(1);
  }
}

@keyframes winnerShakePulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    text-shadow:
      0 0 20px rgba(255, 45, 85, 0.5),
      0 0 50px rgba(236, 72, 153, 0.35);
  }
  25% {
    transform: scale(1.04) rotate(-0.8deg);
  }
  50% {
    transform: scale(1.07) rotate(0.6deg);
    text-shadow:
      0 0 35px rgba(255, 200, 100, 0.45),
      0 0 70px rgba(255, 45, 85, 0.45);
  }
  75% {
    transform: scale(1.03) rotate(-0.4deg);
  }
}

[data-theme="light"] .winner-title {
  animation: winnerShakePulseLight 1.8s ease-in-out infinite;
}

@keyframes winnerShakePulseLight {
  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 0 18px rgba(225, 29, 72, 0.25);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 0 0 28px rgba(225, 29, 72, 0.35);
  }
}

@keyframes winnerIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.app-body .table {
  color: var(--app-text);
  --bs-table-bg: transparent;
  --bs-table-color: var(--app-text);
}

/* ——— Итоговое место (без Bootstrap table — корректные цвета в обеих темах) ——— */
.standings__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.04em;
  color: var(--app-text);
  margin-bottom: 1.25rem;
}

.standings__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.standings__grid {
  margin-top: 0.25rem;
}

.standings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.15rem 1.35rem;
  border-radius: 1.15rem;
  background: var(--app-card);
  border: 1px solid var(--app-list-border);
  color: var(--app-text);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.standings-row--compact {
  height: 100%;
  padding: 0.95rem 1rem;
  gap: 0.75rem 0.95rem;
}

[data-theme="dark"] .standings-row {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.standings-row:hover {
  border-color: rgba(255, 45, 85, 0.35);
  box-shadow: 0 8px 32px rgba(255, 45, 85, 0.12);
}

.standings-rank {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 45, 85, 0.25), rgba(168, 85, 247, 0.2));
  color: var(--app-text);
  border: 2px solid rgba(255, 45, 85, 0.35);
}

.standings-info {
  flex: 1 1 200px;
  min-width: 0;
}

.standings-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--app-text);
}

.standings-sub {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--app-muted);
}

.standings-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-left: auto;
}

.standings-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 4.5rem;
}

.standings-stat__val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--app-text);
}

.standings-stat__lbl {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  margin-top: 0.2rem;
}

.standings-stat--accent .standings-stat__val {
  color: var(--app-accent);
}

@media (max-width: 575.98px) {
  .standings-stats {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .standings-stat {
    align-items: flex-start;
  }
}

.results-detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  color: var(--app-text);
}

.results-detail-card {
  background: var(--app-card) !important;
  border: 1px solid var(--app-list-border) !important;
  border-radius: 1.15rem !important;
  overflow: hidden;
  color: var(--app-text);
}

.results-detail-card__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--app-list-border);
  background: rgba(255, 45, 85, 0.06);
}

[data-theme="light"] .results-detail-card__head {
  background: rgba(225, 29, 72, 0.06);
}

.results-detail-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--app-text);
}

.results-detail-card__badge {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff2d55, #db2777);
  color: #fff;
}

.results-detail-list {
  padding: 0.25rem 0;
}

.results-detail-item {
  padding: 0.9rem 1.25rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--app-text);
  border-bottom: 1px solid var(--app-list-border);
}

.results-detail-item:last-child {
  border-bottom: none;
}

.results-detail-q {
  color: var(--app-text);
  flex: 1;
  min-width: 0;
}

.results-detail-mark {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 800;
  width: 2rem;
  text-align: center;
}

.results-detail-mark[data-ok="1"] {
  color: #22c55e;
}

.results-detail-mark[data-ok="0"] {
  color: #f87171;
}

.results-detail-item--empty {
  color: var(--app-muted);
  font-size: 1rem;
}

.app-body .form-control,
.app-body .form-select {
  background: var(--app-form-bg);
  border-color: var(--app-form-border);
  color: var(--app-text);
}

.app-body .form-control:focus,
.app-body .form-select:focus {
  background: var(--app-form-bg);
  color: var(--app-text);
  border-color: var(--app-accent);
  box-shadow: 0 0 0 0.2rem var(--app-accent-soft);
}

.app-body .list-group-item {
  background: transparent;
  color: var(--app-text);
  border-color: var(--app-list-border);
}

.app-body .btn-primary {
  background: linear-gradient(135deg, #ff2d55, #db2777);
  border: none;
}

.app-body .btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  filter: brightness(1.05);
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.play-reveal-emoji-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 51;
}

/* Крупная эмодзи по центру: «издалека» → рост → исчезновение (параллельно дождю эмодзи) */
.play-reveal-emoji-zoom {
  position: fixed;
  inset: 0;
  z-index: 52;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  perspective: 720px;
  perspective-origin: center center;
}

.play-reveal-emoji-zoom__icon {
  display: block;
  font-size: clamp(3.25rem, 20vw, 8.5rem);
  line-height: 1;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: playRevealEmojiZoom 2.4s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
  will-change: transform, opacity, filter;
}

img.play-reveal-emoji-zoom__icon {
  font-size: unset;
  max-width: min(88vw, 22rem);
  max-height: min(72vh, 22rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

@keyframes playRevealEmojiZoom {
  0% {
    transform: translate3d(0, 0, -320px) scale(0.06);
    opacity: 0;
    filter: blur(22px);
  }
  12% {
    opacity: 1;
  }
  46% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
  64% {
    transform: translate3d(0, 0, 12px) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 80px) scale(1.55);
    opacity: 0;
    filter: blur(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .play-reveal-emoji-zoom {
    display: none;
  }
}

/* ===============================================================
   ������ ����: ����� ������ �� index.php
   =============================================================== */

.cat-pick-wrapper {
  display: flex;
  flex-direction: column;
}

/* ������ �������� ������ ��� ��������� */
.mode-settings-panel {
  margin-top: 0.5rem;
  border-radius: 1rem;
  background: var(--app-card);
  border: 1px solid var(--app-form-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: modePanelIn 0.22s ease;
}

@keyframes modePanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mode-settings-panel__inner {
  padding: 1.25rem 1.25rem 1rem;
}

.mode-settings-panel__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  margin-bottom: 0.75rem;
}

/* �����-������ ������ */
.mode-radios {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.mode-radio {
  cursor: pointer;
  flex: 1 1 auto;
}

.mode-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-radio__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  border: 2px solid var(--app-form-border);
  background: var(--app-form-bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-align: center;
}

.mode-radio__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.mode-radio input[type="radio"]:checked + .mode-radio__box {
  border-color: var(--app-accent);
  background: var(--app-accent-soft);
  color: var(--app-text);
}

/* ���. ��������� ��� ������� ������ */
.mode-extra {
  background: var(--app-form-bg);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--app-form-border);
}

.mode-extra__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.mode-extra__row:last-child { margin-bottom: 0; }

.mode-extra__lbl {
  font-size: 0.82rem;
  color: var(--app-muted);
  white-space: nowrap;
  margin: 0;
}

.mode-extra__num {
  width: 5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--app-form-border);
  background: var(--app-form-bg);
  color: var(--app-text);
  font-size: 0.9rem;
  text-align: center;
}

.mode-extra__check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--app-muted);
  cursor: pointer;
}

/* ����� �dare trigger� */
.mode-dare-radios {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mode-dare-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--app-text);
  cursor: pointer;
}

/* ===============================================================
   ����� ELIMINATION: ����� ������ �� play.php
   =============================================================== */

.elim-scoreboard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.5rem 0;
}

.elim-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--app-text);
  background: var(--app-form-bg);
  border: 1px solid var(--app-form-border);
  border-radius: 0.6rem;
  padding: 0.35rem 0.6rem;
  min-width: 4.5rem;
  transition: opacity 0.3s, filter 0.3s;
}

.elim-player--out {
  opacity: 0.38;
  filter: grayscale(1);
  text-decoration: line-through;
}

.elim-player__errors {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

/* ������ ��������� */
.elimination-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(220,38,38,0.08));
  border: 1px solid rgba(239,68,68,0.4);
  color: var(--app-text);
  font-size: 1rem;
  animation: elimBannerIn 0.35s ease;
}

@keyframes elimBannerIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.elimination-banner__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

/* ������� ����: ��������� ���������� */
.standings-row--winner {
  border: 2px solid rgba(250,204,21,0.6);
  background: linear-gradient(135deg, rgba(250,204,21,0.08), transparent);
}

.standings-rank--gold {
  color: #facc15;
  font-size: 1.5rem;
}

.standings-stat--danger .standings-stat__val {
  color: #f87171;
}

/* ===============================================================
   ����� DARE: �������� �������
   =============================================================== */

.dare-card {
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(217,70,239,0.1));
  border: 1px solid rgba(168,85,247,0.4);
  overflow: hidden;
  animation: dareCardIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dareCardIn {
  from { opacity: 0; transform: scale(0.85) rotate(-2deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.dare-card__header {
  background: rgba(168,85,247,0.25);
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-text);
}

.dare-card__body {
  padding: 1.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.5;
}

.dare-card--result .dare-card__body--lg {
  font-size: 1.4rem;
  padding: 1.5rem 1.5rem 1.75rem;
}

.dare-result-section .standings__title {
  margin-bottom: 1rem;
}

/* ===============================================================
   PARTICIPANTS: ������ ������� (participants.php)
   =============================================================== */

.dare-list-card {
  background: var(--app-card);
}

.dare-empty-notice {
  background: var(--app-form-bg);
  border: 1px dashed var(--app-form-border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  color: var(--app-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.dare-list {
  max-height: 18rem;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.dare-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--app-list-border);
  margin-bottom: 0.4rem;
  background: var(--app-form-bg);
}

.dare-list__body {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--app-text);
}

.dare-list__del {
  background: none;
  border: none;
  padding: 0 0.25rem;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.dare-list__del:hover { opacity: 1; }

.dare-add-row { }
.dare-add-row__input {
  resize: vertical;
}

.dare-msg {
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* ── Выбор формата игры (главная) ─────────────────────────── */
.game-format-row {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.game-format-card {
  display: block;
  padding: 1.25rem 1.35rem;
  border-radius: 1.15rem;
  background: var(--app-form-bg);
  border: 2px solid var(--app-form-border);
  color: var(--app-text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-align: left;
}

.game-format-card:hover:not(:disabled) {
  border-color: rgba(37, 244, 238, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.game-format-card--active {
  border-color: rgba(254, 44, 85, 0.55);
  box-shadow: 0 0 0 1px rgba(254, 44, 85, 0.25);
}

.game-format-card--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.game-format-card__icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.game-format-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.35rem;
}

.game-format-card__hint {
  display: block;
  font-size: 0.85rem;
  color: var(--app-muted);
  line-height: 1.4;
}

.game-format-card__badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #25f4ee;
}

.game-format-card__warn {
  display: block;
  margin-top: 0.5rem;
  color: #f87171;
}

.deep-start-panel {
  border-radius: 1.15rem;
}

/* ── Глубокие вопросы (play_deep) ─────────────────────────── */
.deep-question-body {
  line-height: 1.5;
  color: var(--app-text);
}

.deep-turn-callout__inner {
  background: linear-gradient(180deg, rgba(22, 24, 35, 0.95) 0%, rgba(13, 14, 20, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  max-width: 480px;
  margin: 0 auto;
}

[data-theme="light"] .deep-turn-callout__inner {
  background: linear-gradient(180deg, #fff 0%, #f0f2f7 100%);
  border-color: rgba(0, 0, 0, 0.08);
}

.deep-turn-callout__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 2rem);
  background: linear-gradient(90deg, #25f4ee, #fe2c55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.deep-host-pick__inner {
  border-radius: 1.15rem;
}

.deep-results-list__item {
  padding: 1rem 1.25rem;
}

/* Итоги «Битва команд» — в одном стиле с results.php */
.deep-results-hero-note {
  color: rgba(255, 255, 255, 0.88);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}

[data-theme="light"] .deep-results-hero-note {
  color: rgba(15, 23, 42, 0.82);
}

.deep-results-verdict-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .deep-results-verdict-badge {
  background: rgba(255, 255, 255, 0.65);
  color: var(--app-text);
  border-color: rgba(0, 0, 0, 0.1);
}

.deep-results-qtext {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--app-text);
}

.results-detail-item.deep-results-detail__q {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.results-detail-item.deep-results-detail__q:first-child {
  border-bottom: 1px solid var(--app-list-border);
}

.deep-results-answer {
  line-height: 1.45;
  color: var(--app-text);
}

.deep-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 8, 14, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: deepRevealIn 0.25s ease;
}

@keyframes deepRevealIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.deep-reveal-overlay__panel {
  max-width: min(720px, 100%);
  text-align: center;
  padding: 2rem 1.5rem;
}

.deep-reveal-overlay__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.deep-reveal-overlay__answer {
  font-size: clamp(1.15rem, 3.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
}

.deep-reveal-overlay__ok {
  min-width: 11rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(254, 44, 85, 0.4);
}

.deep-reveal-overlay__ok:hover {
  box-shadow: 0 12px 32px rgba(254, 44, 85, 0.5);
  transform: translateY(-1px);
}

.deep-reveal-overlay__ok:active {
  transform: translateY(0);
}

[data-theme="light"] .deep-reveal-overlay {
  background: rgba(246, 247, 251, 0.96);
}

[data-theme="light"] .deep-reveal-overlay__answer {
  color: #161823;
}

/* Группа FAB-кнопок справа сверху (🏠 + 🏁) */
.deep-fab-group {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 1200;
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.deep-fab-group__btn {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid var(--app-form-border);
  background: rgba(22, 24, 35, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 0;
  opacity: 0.9;
  flex-shrink: 0;
}

.deep-fab-group__btn:hover {
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
}

[data-theme="light"] .deep-fab-group__btn {
  background: rgba(255, 255, 255, 0.92);
  color: #161823;
  border-color: rgba(0, 0, 0, 0.12);
}
