@font-face {
  font-family: "RBFont";
  src: url("assets/шрифт.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #040404;
  --bg-2: #0a0a0a;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.15);
  --text: #f3f3f3;
  --muted: #adadad;
  --btn: #ffffff;
  --btn-text: #050505;
  --ok: #36d07d;
  --bad: #ff4d4d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: "RBFont", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(170deg, #0a0a0a, #020202 65%);
}

#app {
  min-height: 100vh;
}

.page {
  width: min(1080px, 94vw);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 0 18px;
}

.switch-row {
  width: min(520px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  gap: 8px;
}

.switch-row span {
  font-size: 12px;
  color: var(--muted);
}

.switch-row span.left {
  text-align: right;
}

.switch-row span.right {
  text-align: left;
}

.switch-row span.active {
  color: var(--text);
}

.toggle {
  width: 52px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111;
  position: relative;
  cursor: pointer;
}

.toggle::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 4px;
  top: 3px;
  transition: transform 0.22s ease;
}

.toggle.on::before {
  transform: translateX(22px);
}

.menu-title {
  text-align: center;
  font-size: clamp(34px, 7vw, 54px);
  letter-spacing: 0.06em;
  margin-top: 10px;
}

.menu-buttons {
  margin: auto 0;
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  align-self: center;
}

.byline {
  text-align: center;
  color: #7b7b7b;
  font-size: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.panel.center {
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mode-tag {
  color: #cfcfcf;
  font-size: 13px;
}

.question {
  font-size: clamp(22px, 3.1vw, 31px);
  line-height: 1.16;
}

.subtitle {
  margin-top: 7px;
  color: #d1d1d1;
  white-space: pre-line;
}

.btn {
  border: 1px solid #fff;
  background: #fff;
  color: #050505;
  border-radius: 10px;
  font-size: 18px;
  padding: 12px 14px;
  cursor: pointer;
}

.btn.small {
  font-size: 15px;
  padding: 9px 12px;
}

.btn.wide {
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn.ghost {
  background: transparent;
  color: #fff;
  border-color: #8f8f8f;
}

.btn.green {
  background: var(--ok);
  border-color: var(--ok);
}

.btn.red {
  background: var(--bad);
  border-color: var(--bad);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.debug {
  color: #ffda75;
  font-size: 12px;
  line-height: 1.4;
}

.err {
  color: #ff7f7f;
  font-size: 12px;
}

.color-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.color-blue { background: #1e3a8a; }
.color-yellow { background: #facc15; color: #050505; }
.color-green { background: #15803d; }
.color-red { background: #b91c1c; }
.color-brown { background: #6b4423; }

.stats-list,
.faq-list {
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.fx-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 24;
}

.fx-item {
  position: absolute;
  top: -40px;
  animation: fall linear forwards;
  opacity: 0.95;
}

@keyframes fall {
  0% { transform: translateY(-40px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(90deg); opacity: 0.12; }
}

.round-curtain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.round-curtain.hidden {
  display: none;
}

.round-curtain-card {
  margin: 12px auto 0;
  width: min(720px, 92vw);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.92);
  padding: 12px 14px;
  animation: curtainIn 0.2s ease;
}

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

.round-curtain-title {
  font-size: 12px;
  color: #cfcfcf;
}

.round-curtain-text {
  margin-top: 3px;
  font-size: 20px;
}

input[type="range"] {
  width: 100%;
}

@media (max-width: 760px) {
  .page {
    width: 95vw;
    padding-top: 10px;
  }

  .menu-title {
    margin-top: 4px;
    margin-bottom: 2px;
  }

  .question {
    font-size: 24px;
  }

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

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