/* ============================================================
   Правда или ложь — общие стили
   ============================================================ */

:root {
  --bg: #070b16;
  --bg-soft: #0b1120;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f2f5ff;
  --muted: #98a3c2;
  --dim: #6b7697;
  --accent: #7c5cff;
  --accent-2: #37d0ff;
  --true: #2fe3a4;
  --false: #ff5470;
  --gold: #ffce5c;
  --danger: #ff5470;
  --radius: 20px;
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: rgba(124, 92, 255, 0.45);
}

/* ---------- Фон ---------- */

.flag-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.96;
  filter: saturate(1.08) contrast(1.03);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 12% -5%, rgba(84, 63, 210, 0.34), transparent 62%),
    radial-gradient(1000px 760px at 98% 8%, rgba(19, 111, 160, 0.07), transparent 60%),
    radial-gradient(900px 700px at 60% 110%, rgba(120, 26, 80, 0.06), transparent 65%),
    linear-gradient(180deg, rgba(7, 11, 22, 0.3) 0%, rgba(8, 13, 26, 0.44) 50%, rgba(5, 8, 15, 0.76) 100%);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.05;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-a {
  width: 42vw;
  height: 42vw;
  background: #5b3df5;
  top: -14vw;
  left: -10vw;
}

.orb-b {
  width: 34vw;
  height: 34vw;
  background: #0f8a8a;
  bottom: -14vw;
  right: -8vw;
  animation-delay: -7s;
}

.orb-c {
  width: 26vw;
  height: 26vw;
  background: #b3306b;
  top: 42%;
  left: 62%;
  opacity: 0.18;
  animation-delay: -13s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2vw, 3vh, 0) scale(1.08);
  }
}

/* ---------- Логотип ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 1.85em;
  height: 1.85em;
  flex: none;
  border-radius: 32%;
  background: linear-gradient(140deg, #8b6bff 0%, #6141f0 45%, #2bb8e8 100%);
  box-shadow: 0 10px 34px rgba(112, 82, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 0.82em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.brand .grad {
  background: linear-gradient(100deg, #cfc4ff 0%, #8b6bff 42%, #4bd8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand .versus {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.62em;
  letter-spacing: 0.08em;
  margin: 0 0.15em;
  text-transform: uppercase;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    opacity 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #8b6bff, #6845f5);
  color: #fff;
  box-shadow: 0 10px 30px rgba(112, 82, 255, 0.38);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 40px rgba(112, 82, 255, 0.55);
  transform: translateY(-1px);
}

.btn-true {
  background: linear-gradient(135deg, #25cf93, #12a878);
  color: #03251a;
  box-shadow: 0 10px 30px rgba(47, 227, 164, 0.28);
}

.btn-true:hover:not(:disabled) {
  box-shadow: 0 12px 40px rgba(47, 227, 164, 0.45);
  transform: translateY(-1px);
}

.btn-false {
  background: linear-gradient(135deg, #ff5072, #e22c50);
  color: #fff;
  box-shadow: 0 10px 30px rgba(255, 84, 112, 0.3);
}

.btn-false:hover:not(:disabled) {
  box-shadow: 0 12px 42px rgba(255, 84, 112, 0.48);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.btn-danger-ghost {
  background: rgba(255, 84, 112, 0.08);
  border-color: rgba(255, 84, 112, 0.28);
  color: #ff9db0;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: rgba(255, 84, 112, 0.16);
  border-color: rgba(255, 84, 112, 0.5);
}

.btn-sm {
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 17px 28px;
  border-radius: 16px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

.btn .icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Поля ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(5, 9, 19, 0.65);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-size: 15px;
}

.input::placeholder,
.textarea::placeholder {
  color: #5a6585;
}

.input:focus,
.textarea:focus {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.14);
  background: rgba(9, 14, 28, 0.9);
}

.textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.hint {
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---------- Пилюли и бейджи ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.pill.live {
  color: #c8fff0;
  border-color: rgba(47, 227, 164, 0.35);
  background: rgba(47, 227, 164, 0.09);
}

.pill.live .dot {
  background: var(--true);
  box-shadow: 0 0 12px var(--true);
  animation: pulseDot 1.6s infinite;
}

.pill.lobby {
  color: #cfe4ff;
  border-color: rgba(55, 208, 255, 0.35);
  background: rgba(55, 208, 255, 0.08);
}

.pill.lobby .dot {
  background: var(--accent-2);
}

.pill.results {
  color: #ffe9b0;
  border-color: rgba(255, 206, 92, 0.35);
  background: rgba(255, 206, 92, 0.08);
}

.pill.results .dot {
  background: var(--gold);
}

.pill.done {
  color: #d9d2ff;
  border-color: rgba(124, 92, 255, 0.4);
  background: rgba(124, 92, 255, 0.1);
}

.pill.done .dot {
  background: var(--accent);
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.true {
  color: #052b1e;
  background: linear-gradient(135deg, #45e6ad, #21c98d);
}

.badge.false {
  color: #fff;
  background: linear-gradient(135deg, #ff6a86, #e63758);
}

.badge.neutral {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ---------- Анимации ---------- */

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.015);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}

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

/* ---------- Тост ---------- */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  width: min(92vw, 540px);
  pointer-events: none;
}

.toast {
  padding: 14px 18px;
  border-radius: 14px;
  background: #161d31;
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  animation: toastIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: auto;
}

.toast.error {
  background: #2b1220;
  border-color: rgba(255, 84, 112, 0.5);
  color: #ffdbe2;
}

.toast.success {
  background: #0c2a23;
  border-color: rgba(47, 227, 164, 0.45);
  color: #c9ffef;
}

.toast.hide {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* ---------- Скроллбар ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Лендинг ---------- */

.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding: 6vh 5vw;
  text-align: center;
}

.landing .brand {
  font-size: clamp(30px, 4.6vw, 64px);
}

.landing-title {
  margin: 0;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.landing-title .yes {
  background: linear-gradient(120deg, #61f2bd, #1acb92);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-title .no {
  background: linear-gradient(120deg, #ff7e95, #f43a5e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-sub {
  max-width: 620px;
  margin: 0;
  color: #e2e8fb;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.6;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(1040px, 100%);
}

.landing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px;
  min-height: 190px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(14, 20, 37, 0.82), rgba(8, 13, 25, 0.9));
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.landing-card::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.landing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.landing-card:hover::after {
  opacity: 1;
}

.landing-card .lc-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 22px;
}

.landing-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.landing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.landing-card .arrow {
  margin-top: auto;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 760px) {
  .landing-cards {
    grid-template-columns: 1fr;
  }

  .landing-card {
    min-height: 150px;
  }
}
