@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #0b0c10;
  color: #e6e6e6;
  overflow-x: hidden;
  background: radial-gradient(circle at 20% 30%, #1a1c22, #0b0c10 70%);
}

/* разные режимы страниц */
.page-home { padding: 0; }
.page-details { padding: 40px 10%; line-height: 1.8; }

.noise {
  position: fixed;
  inset: 0;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.06;
  pointer-events: none;
  z-index: 999;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
}

.topic {
  max-width: 900px;
  opacity: 0.75;
  margin: 0 0 18px;
  font-size: 1rem;
}

.glitch {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  position: relative;
}

.subtitle {
  max-width: 700px;
  font-size: 1.1rem;
  opacity: 0.8;
}

.section { padding: 80px 12%; }
.section h2 { font-size: 2rem; margin-bottom: 25px; }
.section p { font-size: 1.05rem; line-height: 1.6; opacity: 0.9; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* карточки */
.card {
  display: block;
  text-decoration: none;
  color: inherit;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 20px;
  cursor: pointer;
  overflow: hidden;

  max-height: 95px;
  transition: max-height 0.5s ease, transform 0.4s ease, border-color 0.3s ease, background 0.3s ease;
}

.card-title { font-size: 1.2rem; font-weight: 300; }

.card-content {
  margin-top: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.4s ease;
}

.card:hover {
  max-height: 300px;
  border-color: #ff0033;
  background: rgba(255,0,51,0.05);
  transform: translateY(-6px) scale(1.03);
}

.card:hover .card-content { opacity: 1; transform: translateY(0); }

/* блок заголовков */
.headline-box {
  max-width: 650px;
  background: rgba(255,255,255,0.03);
  border-left: 4px solid #ff0033;
  padding: 30px;
  transition: 0.3s;
}

.fact { opacity: 0.7; margin-bottom: 15px; }
.fact span { color: #ff0033; font-weight: 600; }

.headline { font-size: 1.2rem; margin-bottom: 10px; min-height: 60px; }
.explain { font-size: 0.95rem; opacity: 0.8; border-left: 3px solid #ff0033; padding-left: 10px; }

.buttons button {
  margin-top: 20px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid #ff0033;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.buttons button:hover { background: #ff0033; color: black; }

.buttons button:nth-child(2):hover { background: #aaa; border-color: #aaa; color: black; }
.buttons button:nth-child(3):hover { background: #00ff88; border-color: #00ff88; color: black; }

/* режимы */
.headline-box.bad { border-color: #ff0033; }
.headline-box.bad .headline { color: #ff0033; }

.headline-box.neutral { border-color: #aaa; }
.headline-box.neutral .headline { color: #ddd; }

.headline-box.good { border-color: #00ff88; }
.headline-box.good .headline { color: #00ff88; }

/* список советов */
.tips { list-style: none; padding: 0; }
.tips li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }

footer {
  text-align: center;
  padding: 30px;
  background: #050505;
  opacity: 0.6;
}

/* детали */
.page-details .section h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ff0033;
  text-shadow: 0 0 6px rgba(255,0,51,0.6);
}

.page-details .section p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  padding-left: 10px;
  border-left: 3px solid #ff0033;
  opacity: 0.9;
}

.page-details .section h2 {
  font-size: 1.6rem;
  margin-top: 40px;
  margin-bottom: 15px;
  color: #00ff88;
}

.page-details .section a {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  font-weight: 600;
  color: #ff0033;
  transition: 0.3s;
}
.page-details .section a:hover {
  color: #fff;
  text-shadow: 0 0 6px rgba(255,0,51,0.8);
}

/* Glitch-анимация */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0.75;
  clip-path: inset(0 0 0 0);
}

.glitch::before {
  transform: translate(-2px, 0);
  animation: glitchA 2.2s infinite linear alternate-reverse;
}

.glitch::after {
  transform: translate(2px, 0);
  animation: glitchB 1.7s infinite linear alternate-reverse;
}

@keyframes glitchA {
  0% { clip-path: inset(10% 0 80% 0); }
  20% { clip-path: inset(40% 0 40% 0); }
  40% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(20% 0 60% 0); }
  80% { clip-path: inset(55% 0 25% 0); }
  100% { clip-path: inset(35% 0 45% 0); }
}

@keyframes glitchB {
  0% { clip-path: inset(75% 0 10% 0); }
  25% { clip-path: inset(15% 0 65% 0); }
  50% { clip-path: inset(45% 0 35% 0); }
  75% { clip-path: inset(5% 0 85% 0); }
  100% { clip-path: inset(60% 0 20% 0); }
}

/* Верхняя навигация */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 14px 16px;
  background: rgba(5,5,5,0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topnav a {
  text-decoration: none;
  color: #e6e6e6;
  opacity: 0.8;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  transition: 0.25s;
}

.topnav a:hover {
  opacity: 1;
  border-color: rgba(255,0,51,0.7);
  box-shadow: 0 0 16px rgba(255,0,51,0.15);
}

/* Полоса прогресса */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: #ff0033;
  z-index: 1000;
  box-shadow: 0 0 16px rgba(255,0,51,0.35);
}

/* Quiz */
.quiz {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
}

.quiz-q {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 16px 0 10px;
}

.quiz-a {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  opacity: 0.9;
  transition: 0.25s;
}

.quiz-a:hover {
  border-color: rgba(0,255,136,0.6);
  box-shadow: 0 0 16px rgba(0,255,136,0.08);
}

.quiz-a input {
  margin-right: 10px;
}

.quiz-btn {
  margin-top: 8px;
  width: 100%;
}

.quiz-result {
  margin-top: 14px;
  opacity: 0.9;
  font-weight: 600;
}
.quiz-result {
  margin-top: 14px;
  opacity: 0;
  transition: 0.4s ease;
}

.quiz-result.show {
  opacity: 1;
}


.quiz-btn {
  margin-top: 18px;
  width: 100%;
  padding: 14px 20px;

  background: #0b0c10;
  border: 2px solid transparent;
  border-radius: 14px;

  color: #ff0033;
  font-weight: 700;
  letter-spacing: 1px;

  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: 0.3s ease;
}

.quiz-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(90deg, #ff0033, #00ff88);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.quiz-btn:hover {
  color: #00ff88;
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
}


/* Прячем стандартные radio */
.quiz-a input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  cursor: pointer;
  transition: 0.3s ease;
  background: transparent;
}

/* Hover эффект */
.quiz-a input[type="radio"]:hover {
  border-color: #ff0033;
  box-shadow: 0 0 8px rgba(255, 0, 51, 0.5);
}

/* Когда выбран */
.quiz-a input[type="radio"]:checked {
  border-color: #ff0033;
  background: radial-gradient(circle, #ff0033 45%, transparent 46%);
  box-shadow: 0 0 12px rgba(255, 0, 51, 0.7);
  transform: scale(1.1);
}

/* Вся строка — как кнопка */
.quiz-a {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: 0.25s ease;
}

.quiz-a:hover {
  border-color: rgba(255,0,51,0.5);
  background: rgba(255,0,51,0.05);
}

/* Когда выбран вариант — подсветим весь блок */
.quiz-a input[type="radio"]:checked + span {
  color: #ff0033;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* высота твоего меню + чуть воздуха */
}

.section {
  scroll-margin-top: 90px; /* чтобы якорь не прятался под меню */
}

.topnav a.active {
  border-color: #ff0033;
  color: #ff0033;
  box-shadow: 0 0 14px rgba(255,0,51,0.4);
}

.section {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.6s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.muted {
  opacity: 0.75;
  max-width: 820px;
}

.sim-card {
  max-width: 860px;
  margin: 22px auto 0;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 20px rgba(255,0,51,0.06);
}

.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 700px) {
  .sim-grid { grid-template-columns: 1fr; }
}

.sim-control {
  padding: 14px 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.12);
}

.sim-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 12px;
}

.sim-value {
  font-weight: 800;
  color: #ff0033;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,0,51,0.4);
  background: rgba(255,0,51,0.08);
}

/* Стили range */
.sim-range {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, #ff0033 0%, rgba(255,255,255,0.15) 0%);
  border: 1px solid rgba(255,255,255,0.12);
}

/* бегунок Chrome/Safari */
.sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0b0c10;
  border: 2px solid #ff0033;
  box-shadow: 0 0 18px rgba(255,0,51,0.5);
  cursor: pointer;
  transition: 0.2s ease;
}

.sim-range::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

/* бегунок Firefox */
.sim-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0b0c10;
  border: 2px solid #ff0033;
  box-shadow: 0 0 18px rgba(255,0,51,0.5);
  cursor: pointer;
}

/* дорожка Firefox */
.sim-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

/* Результат */
.sim-result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.sim-result-title {
  opacity: 0.75;
  font-weight: 700;
}

.sim-result-badge {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ff0033;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,0,51,0.45);
  background: rgba(255,0,51,0.08);
  box-shadow: 0 0 18px rgba(255,0,51,0.15);
}

.sim-hint {
  flex: 1;
  min-width: 260px;
  opacity: 0.85;
}