* { box-sizing: border-box; }

:root {
  --bg: #0b0d17;
  --panel: #141830;
  --panel-2: #1b2145;
  --text: #e8ebff;
  --muted: #9aa3c7;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --danger: #f43f5e;
  --ok: #34d399;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 70% -10%, #1c1444 0%, var(--bg) 55%);
  overflow-x: hidden;
}

.fog {
  position: fixed;
  inset: auto -20% -30% -20%;
  height: 70vh;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.18), transparent);
  filter: blur(30px);
  animation: drift 26s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.fog--2 {
  inset: 10% -30% auto -30%;
  height: 50vh;
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.12), transparent);
  animation-duration: 34s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(-4%, 0, 0) scale(1); }
  to   { transform: translate3d(6%, -4%, 0) scale(1.15); }
}

.hero, .fact-card, .toolbar, .grid, .quiz, .footer, .empty {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.hero { padding: 72px 0 24px; text-align: center; }

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero__title {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.35);
}

.accent {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}

.hero__actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #06101f;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn--small { padding: 8px 14px; font-size: 13px; background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.14); }

.hero__stats { display: flex; gap: 28px; justify-content: center; margin-top: 32px; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 28px; color: var(--accent-2); }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.section-title { font-size: clamp(22px, 3.5vw, 30px); margin: 0 0 18px; }

/* Факт дня — металлическая плашка */
.fact-card {
  margin-top: 40px;
  padding: 22px 24px;
  background: linear-gradient(145deg, #b0b0b0, #7d7d7d, #5e5e5e, #8a8a8a);
  background-size: 100% 100%;
  border: 1px solid #4a4a4a;
  border-radius: var(--radius);
  text-align: center;
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.7),
    inset 0 -1px 3px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(150, 150, 150, 0.5);
}
.fact-card__label {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 900;
  background: linear-gradient(to bottom, #333, #111);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.fact-card__text {
  font-size: clamp(16px, 2.4vw, 20px);
  line-height: 1.55;
  margin: 12px 0 16px;
  color: #1a1a1a !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
  font-weight: 600;
}
.fact-card .btn--small {
  background: linear-gradient(to bottom, #666, #333) !important;
  color: #ddd !important;
  border: 1px solid #222 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5),
    0 4px 6px rgba(0, 0, 0, 0.5);
  text-shadow: 0 -1px 0 #000 !important;
  border-radius: 4px;
}
.fact-card .btn--small:hover {
  background: linear-gradient(to bottom, #7a7a7a, #444) !important;
  transform: translateY(-1px);
}

.toolbar { margin-top: 48px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 20px rgba(139,92,246,0.35); }

.search {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.search:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(34,211,238,0.18); }
.search::placeholder { color: var(--muted); }

.grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: pop 0.35s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,0.5); box-shadow: 0 14px 40px rgba(0,0,0,0.45); }

.card.visited { border-color: rgba(52,211,153,0.55); background: linear-gradient(180deg, rgba(52,211,153,0.07), var(--panel)); }

.card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__emoji { font-size: 34px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.card__tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent-2); background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }

.card__title { margin: 0; font-size: 19px; }
.card__region { font-size: 12px; color: var(--muted); margin-top: -4px; }
.card__text { margin: 0; font-size: 14px; line-height: 1.6; color: #cdd3f2; }

.card__facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.card__facts li { font-size: 13px; color: var(--muted); padding-left: 18px; position: relative; line-height: 1.45; }
.card__facts li::before { content: '🕯️'; position: absolute; left: 0; font-size: 11px; }

.card__actions { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 17px; }

.quiz {
  margin-top: 56px;
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 26px;
}
.quiz__question { font-size: clamp(16px, 2.4vw, 19px); line-height: 1.55; margin: 0 0 16px; }
.quiz__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.quiz__opt {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.quiz__opt:hover:not(:disabled) { border-color: var(--accent); background: rgba(139,92,246,0.15); }
.quiz__opt.correct { background: rgba(52,211,153,0.2); border-color: var(--ok); }
.quiz__opt.wrong { background: rgba(244,63,94,0.2); border-color: var(--danger); }
.quiz__opt:disabled { cursor: default; opacity: 0.85; }
.quiz__feedback { min-height: 24px; margin: 14px 0 10px; font-size: 15px; font-weight: 600; }
.quiz__feedback.ok { color: var(--ok); }
.quiz__feedback.bad { color: var(--danger); }

.footer { margin-top: 60px; padding: 30px 0 46px; text-align: center; color: var(--muted); font-size: 14px; }
.footer__muted { opacity: 0.55; font-size: 12px; margin-top: 6px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--panel-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  box-shadow: 0 10px 34px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .hero { padding-top: 48px; }
  .hero__stats { gap: 18px; }
  .quiz { padding: 18px; }
}
