* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: #050816; color: #fff; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
.page-bg { min-height: 100vh; position: relative; overflow: hidden; background: radial-gradient(circle at top, rgba(110,130,255,.22), transparent 42%), radial-gradient(circle at bottom, rgba(255,255,255,.08), transparent 34%), #050816; }
.glow { position: absolute; width: 288px; height: 288px; border-radius: 999px; filter: blur(70px); opacity: .32; animation: pulse 4s ease-in-out infinite; pointer-events: none; }
.glow-1 { top: 80px; left: 30px; background: #3b82f6; }
.glow-2 { right: 30px; bottom: 80px; background: #a855f7; animation-delay: 1s; }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:.22 } 50%{ transform: scale(1.12); opacity:.38 } }
.quiz-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; position: relative; z-index: 2; }
.quiz-wrap { width: 100%; max-width: min(440px, 100%); min-width: 0; position: relative; }
.progress-wrap { margin-bottom: 20px; }
.progress-track { height: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; backdrop-filter: blur(18px); }
.progress-fill { height: 100%; width: 14%; background: linear-gradient(90deg, #fff, #60a5fa); border-radius: 999px; transition: width .45s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; color: rgba(255,255,255,.55); font-size: 12px; }
.quiz-card { min-height: 680px; overflow: hidden; border-radius: 36px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); box-shadow: 0 30px 90px rgba(0,0,0,.4); backdrop-filter: blur(28px); }
.hero { min-height: 680px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; overflow: hidden; }
.hero img, .media-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.hero .hero-bg { opacity: 0; transform: scale(1.04); transition: opacity 1.8s ease-in-out; will-change: opacity; }
.hero .hero-bg.is-active { opacity: 1; }
.hero:after, .media-head:after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #050816, rgba(5,8,22,.58), rgba(0,0,0,.18)); }
.hero-content, .media-content { position: relative; z-index: 2; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(20px); font-size: 12px; color: rgba(255,255,255,.86); margin-bottom: 16px; }
h1 { font-size: 38px; line-height: 1.06; letter-spacing: -.04em; margin: 0 0 16px; }
h2 { font-size: 25px; line-height: 1.12; letter-spacing: -.03em; margin: 0; }
p { margin: 0; color: rgba(255,255,255,.72); line-height: 1.55; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 24px 0; }
.stat { padding: 16px 10px; border-radius: 24px; text-align: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(20px); }
.stat strong { display: block; font-size: 24px; }
.stat span { display: block; margin-top: 4px; font-size: 11px; color: rgba(255,255,255,.55); }
.primary-btn, .secondary-btn, .ghost-btn { height: 56px; border-radius: 20px; transition: transform .18s ease, background .18s ease; }
.primary-btn { width: 100%; background: #fff; color: #050816; font-size: 18px; font-weight: 700; box-shadow: 0 20px 50px rgba(255,255,255,.14); }
.secondary-btn { flex: 1; background: #fff; color: #050816; font-weight: 700; }
.ghost-btn { width: 56px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.12); }
.primary-btn:active, .secondary-btn:active, .ghost-btn:active, .option:active { transform: scale(.98); }
.step { min-height: 680px; padding: 20px; display: flex; flex-direction: column; }
.media-head { height: 210px; border-radius: 28px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,.12); margin-bottom: 22px; }
.media-content { position: absolute; left: 20px; right: 20px; bottom: 20px; }
.step-count { font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 8px; }
.step-subtitle { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.65); }
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.options-list { display: grid; gap: 12px; }
.option { position: relative; overflow: hidden; min-height: 76px; border-radius: 24px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); color: #fff; text-align: left; backdrop-filter: blur(22px); transition: all .22s ease; }
.option.active { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.9); box-shadow: 0 16px 45px rgba(255,255,255,.1); }
.option-img { height: 144px; min-height: 144px; }
.option-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.option-img:hover img { transform: scale(1.08); }
.option-img:after { content:""; position:absolute; inset:0; background: linear-gradient(to top, rgba(0,0,0,.78), transparent); }
.option-title-img { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; z-index: 2; font-weight: 700; }
.option-body { display: flex; align-items: center; gap: 14px; padding: 14px; }
.icon-box { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.check { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.nav-row { display: flex; gap: 12px; margin-top: auto; padding-top: 24px; }
.hint { flex: 1; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 20px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.045); color: rgba(255,255,255,.45); font-size: 14px; }
.form-step { min-height: 680px; display: flex; flex-direction: column; }
.form-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.summary-box { padding: 16px; border-radius: 24px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); margin-bottom: 18px; }
.summary-box small { display:block; color: rgba(255,255,255,.45); margin-bottom: 7px; }
.field { width: 100%; height: 56px; border-radius: 18px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.1); color: #fff; outline: 0; padding: 0 18px; margin-bottom: 12px; }
.field::placeholder { color: rgba(255,255,255,.42); }
.field:focus { border-color: rgba(255,255,255,.45); }
.spam-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.messenger-title { margin: 4px 0 10px; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 700; }
.messenger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.messenger { height: 48px; border-radius: 18px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.12); font-weight: 700; }
.messenger.active { background: #fff; color: #050816; }
.error { color: #fca5a5; font-size: 14px; margin: 6px 0 0; min-height: 20px; }
.policy-check { width: 100%; margin-top: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.045); color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.35; cursor: pointer; user-select: none; }
.policy-check input { position: absolute; opacity: 0; pointer-events: none; }
.policy-box { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.policy-check span:last-child { min-width: 0; flex: 1; }
.policy-check a { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255,255,255,.38); text-underline-offset: 3px; }
.policy-check a:hover { text-decoration-color: #fff; }
.policy-box:after { content: ""; width: 10px; height: 6px; border-left: 2px solid #050816; border-bottom: 2px solid #050816; transform: rotate(-45deg) scale(0); transition: transform .18s ease; margin-top: -2px; }
.policy-check input:checked + .policy-box { background: #fff; border-color: #fff; }
.policy-check input:checked + .policy-box:after { transform: rotate(-45deg) scale(1); }
.policy-check input:focus-visible + .policy-box { outline: 2px solid #60a5fa; outline-offset: 3px; }
.policy-check:active .policy-box { transform: scale(.94); }
.success { min-height: 680px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.success-icon { width: 96px; height: 96px; border-radius: 32px; background: #fff; color: #050816; display: flex; align-items: center; justify-content: center; font-size: 48px; margin-bottom: 24px; box-shadow: 0 20px 50px rgba(255,255,255,.15); }
.success h2 { font-size: 38px; margin-bottom: 14px; }
.answers-box { width: 100%; margin: 28px 0; padding: 18px; border-radius: 24px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); text-align: left; color: rgba(255,255,255,.85); font-size: 14px; line-height: 1.7; }
.privacy-page { min-height: 100vh; padding: 32px 16px; position: relative; z-index: 2; }
.privacy-wrap { width: 100%; max-width: 760px; margin: 0 auto; }
.privacy-card { padding: 28px; border-radius: 28px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); box-shadow: 0 30px 90px rgba(0,0,0,.4); backdrop-filter: blur(28px); }
.privacy-back { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; margin-bottom: 18px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 700; }
.privacy-card h1 { margin-bottom: 18px; font-size: 34px; }
.privacy-card h2 { margin: 24px 0 10px; font-size: 19px; }
.privacy-card p, .privacy-card li { color: rgba(255,255,255,.72); line-height: 1.65; }
.privacy-card ul { margin: 0; padding-left: 20px; }
.admin-page { min-height: 100vh; padding: 32px 16px; position: relative; z-index: 2; }
.admin-wrap { width: 100%; max-width: 920px; margin: 0 auto; }
.admin-card { padding: 28px; border-radius: 28px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); box-shadow: 0 30px 90px rgba(0,0,0,.4); backdrop-filter: blur(28px); }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-head h1 { margin-bottom: 10px; font-size: 34px; }
.admin-save { min-height: 48px; padding: 0 22px; border-radius: 16px; background: #fff; color: #050816; font-weight: 800; }
.admin-label { display: grid; gap: 8px; margin-top: 16px; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 700; }
.admin-upload { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.admin-upload .admin-save { margin-bottom: 12px; }
.admin-editor { width: 100%; min-height: 560px; resize: vertical; border-radius: 18px; border: 1px solid rgba(255,255,255,.12); background: rgba(5,8,22,.78); color: #fff; outline: 0; padding: 18px; font: 13px/1.55 Consolas, "Courier New", monospace; }
.admin-alert { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.72); }
.admin-alert.success { color: #bbf7d0; border-color: rgba(187,247,208,.28); background: rgba(34,197,94,.12); }
.admin-alert.error { color: #fecaca; border-color: rgba(254,202,202,.28); background: rgba(239,68,68,.12); }
.cookie-banner { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 10; padding: 20px; border-radius: 24px; border: 1px solid rgba(255,255,255,.14); background: rgba(18,21,34,.9); box-shadow: 0 18px 60px rgba(0,0,0,.42); backdrop-filter: blur(22px); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin-bottom: 18px; font-size: 13px; line-height: 1.45; color: rgba(255,255,255,.78); }
.cookie-banner a { color: #fff; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(255,255,255,.48); text-underline-offset: 3px; }
.cookie-banner button { width: 100%; min-width: 0; min-height: 56px; border-radius: 16px; background: #fff; color: #050816; font-size: 18px; font-weight: 800; }
@media (max-width: 420px) { .quiz-shell { padding: 12px; align-items: flex-start; } .quiz-card, .hero, .step, .form-step, .success { min-height: calc(100vh - 72px); } h1 { font-size: 34px; } h2 { font-size: 23px; } .stats { gap: 8px; } .stat { padding: 13px 7px; } }
@media (max-width: 680px) { .admin-head, .admin-upload { grid-template-columns: 1fr; flex-direction: column; } .admin-save { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .hero .hero-bg { transition: none; transform: scale(1.06); } }

/* ---- Оптимизации для мобильных ---- */
/* backdrop-filter очень дорог на телефонах — заменяем непрозрачным фоном */
@media (max-width: 480px) {
  .quiz-card { backdrop-filter: none; background: rgba(8,11,28,.96); }
  .option { backdrop-filter: none; }
  .badge { backdrop-filter: none; background: rgba(255,255,255,.13); }
  .stat { backdrop-filter: none; background: rgba(255,255,255,.12); }
  .ghost-btn { backdrop-filter: none; background: rgba(255,255,255,.12); }
  .progress-track { backdrop-filter: none; }
  .cookie-banner { backdrop-filter: none; background: rgba(8,11,28,.97); }
  .hint { backdrop-filter: none; }
  /* Упрощаем тяжёлый blur на глоу-элементах */
  .glow { filter: blur(48px); width: 200px; height: 200px; }
  /* Убираем анимацию масштабирования — оставляем только opacity */
  .glow { animation: pulse-mobile 4s ease-in-out infinite; }
}
@keyframes pulse-mobile { 0%,100% { opacity:.18 } 50% { opacity:.34 } }
