/* =====================================================
   Охота на ботов — стили
   ===================================================== */
:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --text: #142033;
  --text-soft: #33405a;
  --muted: #6f7c91;
  --muted-light: #96a2b3;
  --line: #e7ecf4;
  --line-strong: #dbe3ef;
  --accent: #2f80ed;
  --accent-dark: #1d63c7;
  --accent-soft: #eaf2ff;
  --teal: #13a99b;
  --success: #168b68;
  --success-soft: #e9f9f3;
  --success-line: #bcebdc;
  --danger: #e5484d;
  --danger-dark: #c7353a;
  --danger-soft: #fff3f3;
  --danger-line: #f7c9ca;
  --warning: #f3a712;
  --shadow-card: 0 6px 22px rgba(25, 42, 70, 0.06);
  --shadow-card-hover: 0 12px 28px rgba(25, 42, 70, 0.11);
  --shadow-float: 0 22px 55px rgba(23, 42, 76, 0.15);
  --radius: 12px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(900px 520px at 5% -4%, rgba(47, 128, 237, 0.13), transparent 62%),
    radial-gradient(800px 500px at 96% 0%, rgba(19, 169, 155, 0.1), transparent 58%),
    linear-gradient(180deg, #f8faff 0%, var(--bg) 44%, #f5f8fc 100%);
  background-attachment: fixed;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent); }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 3px solid rgba(47, 128, 237, 0.32); outline-offset: 3px; }
img, svg { display: block; }
p, h1, h2, h3 { margin: 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; padding: 10px 17px; border: 1px solid transparent;
  border-radius: var(--radius); font-weight: 700; font-size: 0.93rem;
  line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  color: #fff; background: linear-gradient(135deg, #3b8bf4 0%, #2f80ed 42%, #1f67ce 100%);
  box-shadow: 0 8px 20px rgba(47, 128, 237, 0.24);
}
.btn--primary:hover { box-shadow: 0 12px 26px rgba(47, 128, 237, 0.31); }
.btn--primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn--ghost, .btn--quiet {
  color: var(--text-soft); background: rgba(255, 255, 255, 0.9);
  border-color: var(--line-strong);
}
.btn--ghost:hover, .btn--quiet:hover {
  color: var(--accent-dark); border-color: #bfd4f5; background: #fff;
}
.btn--quiet { min-height: 38px; padding: 8px 13px; font-size: 0.86rem; }
.btn--danger-ghost {
  width: 100%; color: var(--danger-dark); background: var(--danger-soft); border-color: var(--danger-line);
}
.btn--danger-ghost:hover { background: #ffeaea; border-color: #efb4b5; }
.btn--danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-dark); }
.btn--lg { min-height: 50px; padding: 13px 22px; border-radius: var(--radius); font-size: 1rem; }
.btn--full { width: 100%; }
.btn__arrow { display: inline-block; font-size: 1.15em; line-height: 1; transition: transform 0.18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.rules-icon {
  display: grid; place-items: center; width: 18px; height: 18px;
  border: 1.5px solid currentColor; border-radius: 50%;
  font-size: 0.72rem; font-weight: 800; line-height: 1;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(218, 227, 240, 0.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 18px; width: min(1120px, calc(100% - 32px)); min-height: 66px;
  margin: 0 auto; padding: 9px 0;
}
.profile-chip {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  min-width: 0; max-width: 100%; padding: 5px 13px 5px 5px; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 3px 12px rgba(28, 43, 71, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.profile-chip:hover { border-color: #c9d8ee; box-shadow: 0 6px 18px rgba(28, 43, 71, 0.09); transform: translateY(-1px); }
.profile-chip__copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-right: 3px; text-align: left; }
.profile-chip__label { color: var(--muted); font-size: 0.63rem; font-weight: 700; line-height: 1.2; letter-spacing: 0.055em; text-transform: uppercase; }
.profile-chip__name { max-width: 170px; overflow: hidden; font-size: 0.88rem; font-weight: 750; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: center; min-width: 0; font-size: 0.96rem; font-weight: 800; letter-spacing: -0.02em; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: #fff; background: linear-gradient(140deg, #3d8cf5 0%, #2f80ed 48%, #13a99b 115%);
  border-radius: 10px; box-shadow: 0 6px 14px rgba(47, 128, 237, 0.24);
}
.brand__mark svg { width: 20px; height: 20px; }
.header-rules { justify-self: end; }

/* ---------- Аватары ---------- */
.avatar {
  position: relative; display: grid; flex: 0 0 auto; place-items: center;
  width: 42px; height: 42px; overflow: hidden; color: #26364f;
  font-size: 1.2rem; line-height: 1; background: #eef3fb;
  border: 1px solid rgba(208, 219, 235, 0.7); border-radius: 50%; user-select: none;
}
.avatar--profile { width: 38px; height: 38px; font-size: 1.16rem; background: linear-gradient(140deg, #eaf3ff, #e5faf5); }
.avatar--lg { width: 48px; height: 48px; font-size: 1.35rem; }
.avatar--xl { width: 72px; height: 72px; font-size: 2.05rem; border: 3px solid #fff; box-shadow: 0 8px 22px rgba(27, 46, 78, 0.14); }
.avatar--empty { color: #aab5c5; background: #e9edf3; }
.avatar--empty svg { width: 60%; height: 60%; }
.avatar--tone-1 { background: #e9f2ff; }
.avatar--tone-2 { background: #fdf0e7; }
.avatar--tone-3 { background: #f1edff; }
.avatar--tone-4 { background: #e7f8f2; }
.avatar--tone-5 { background: #fff5dc; }

/* ---------- Основной каркас ---------- */
.app { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 12px; }
.screen { animation: screenIn 0.38s ease both; }
.start-screen { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.78fr); gap: clamp(30px, 5vw, 78px); align-items: center; min-height: calc(100vh - 182px); padding: 38px 10px 66px; }

/* ---------- Главный экран ---------- */
.hero { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px;
  color: #3d5f8e; font-size: 0.74rem; font-weight: 750; line-height: 1.2;
  letter-spacing: 0.035em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.76); border: 1px solid #dfe8f5; border-radius: 999px;
}
.eyebrow__dot { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(19, 169, 155, 0.12); }
.hero__title { max-width: 720px; margin: 22px 0 18px; font-size: clamp(3rem, 6.15vw, 5.25rem); font-weight: 850; line-height: 0.93; letter-spacing: -0.06em; }
.hero__accent { color: #2f80ed; background: linear-gradient(112deg, #2f80ed 8%, #1f67ce 44%, #13a99b 110%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__lead { max-width: 560px; color: #52617a; font-size: clamp(1rem, 1.35vw, 1.1rem); line-height: 1.65; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero__facts { display: flex; align-items: center; gap: 0; margin-top: 32px; }
.hero__fact { display: flex; align-items: baseline; gap: 6px; padding: 0 20px; border-left: 1px solid #dce5f1; }
.hero__fact:first-child { padding-left: 0; border-left: 0; }
.hero__fact strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }
.hero__fact span { color: var(--muted); font-size: 0.78rem; }

/* Селектор сложности */
.difficulty-selector { display: grid; gap: 10px; margin-top: 25px; max-width: 400px; }
.difficulty-btn { display: flex; align-items: center; gap: 15px; padding: 15px 20px; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 16px; transition: 0.2s; cursor: pointer; }
.difficulty-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.difficulty-btn.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 15px rgba(47, 128, 237, 0.15); }
.difficulty-icon { font-size: 1.5rem; }
.difficulty-text strong { display: block; font-size: 1.05rem; }
.difficulty-text small { font-size: 0.8rem; color: var(--muted); }

/* ---------- ОРБИТЫ И ПРЕВЬЮ ---------- */
.preview-wrap { position: relative; display: flex; justify-content: center; min-width: 0; padding: 36px 18px; }
.orbit-system { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.orbit-ring { position: absolute; top: 50%; left: 50%; border: 1.5px solid rgba(47, 128, 237, 0.15); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-ring--1 { width: 320px; height: 320px; animation: spin 15s linear infinite; border-style: dashed; }
.orbit-ring--2 { width: 440px; height: 440px; animation: spin 25s linear infinite reverse; }
.orbit-ring--3 { width: 560px; height: 560px; animation: spin 35s linear infinite; border-color: rgba(19, 169, 155, 0.1); }
.orbit-ring::before { content: ''; position: absolute; border-radius: 50%; }
.orbit-ring--1::before { width: 12px; height: 12px; background: var(--accent); top: 10%; left: 10%; box-shadow: 0 0 15px var(--accent); }
.orbit-ring--2::before { width: 16px; height: 16px; background: var(--teal); bottom: 15%; right: 15%; box-shadow: 0 0 20px var(--teal); }
.orbit-ring--3::before { width: 8px; height: 8px; background: var(--warning); top: 50%; left: 0%; box-shadow: 0 0 15px var(--warning); }
.orbit-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; animation: floatY 4s ease-in-out infinite; z-index: 1; }
@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes floatY { 0%, 100% { transform: translate(-50%, -50%) translateY(0); } 50% { transform: translate(-50%, -50%) translateY(-15px); } }

.preview-card { position: relative; z-index: 2; width: min(100%, 390px); padding: 19px; background: #fff; border: 1px solid rgba(220, 229, 241, 0.9); border-radius: 20px; box-shadow: var(--shadow-float); transform: rotate(1.2deg); backdrop-filter: blur(10px); }
.preview-card::before { position: absolute; inset: 9px -9px -9px 9px; z-index: -1; content: ""; background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(219, 228, 241, 0.8); border-radius: 20px; }
.preview-card__head { display: flex; align-items: center; gap: 10px; }
.preview-card__author { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.preview-card__author strong { font-size: 0.83rem; font-weight: 750; }
.preview-card__author span { color: var(--muted); font-size: 0.68rem; }
.preview-card__menu { align-self: flex-start; color: #a0abba; font-size: 0.82rem; letter-spacing: 0.03em; }
.preview-card__text { margin: 14px 0; color: #33415b; font-size: 0.84rem; line-height: 1.5; }
.preview-card__divider { height: 1px; margin-bottom: 13px; background: var(--line); }

.mini-comment { display: flex; align-items: flex-start; gap: 9px; padding: 8px; border: 1px solid transparent; border-radius: 11px; }
.mini-comment + .mini-comment { margin-top: 2px; }
.mini-comment .avatar { width: 32px; height: 32px; font-size: 0.93rem; }
.mini-comment__body { flex: 1; min-width: 0; }
.mini-comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.mini-comment__meta b { font-size: 0.74rem; }
.mini-comment__meta span { color: var(--muted); font-size: 0.62rem; }
.mini-comment p { margin-top: 2px; color: #536179; font-size: 0.72rem; line-height: 1.38; }
.mini-comment--bot { background: #fff7f7; border-color: #f5cbcc; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.055); }
.mini-comment--bot .mini-comment__meta b { color: #b92f35; }
.mini-comment__flag { flex: 0 0 auto; font-size: 0.9rem; }

.float-tag { position: absolute; z-index: 3; display: inline-flex; align-items: center; padding: 8px 12px; color: #31445f; font-size: 0.7rem; font-weight: 750; white-space: nowrap; background: rgba(255, 255, 255, 0.95); border: 1px solid #dfe8f5; border-radius: 999px; box-shadow: 0 9px 24px rgba(27, 46, 78, 0.12); animation: floatY2 5s ease-in-out infinite; }
.float-tag--top { top: 13px; right: 0; }
.float-tag--bottom { bottom: 9px; left: 0; animation-delay: -2.4s; }
@keyframes floatY2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- Игровой экран ---------- */
.game-screen { width: min(840px, 100%); margin: 0 auto; padding: 10px 0 62px; }
.game-topbar { position: sticky; top: calc(var(--header-height) + 10px); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 18px; padding: 13px 18px; background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(222, 230, 242, 0.95); border-radius: 14px; box-shadow: 0 8px 24px rgba(25, 42, 70, 0.07); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.progress-block { flex: 1; min-width: 0; max-width: 460px; }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.progress-label { color: var(--muted); font-size: 0.78rem; font-weight: 650; letter-spacing: 0.015em; }
.progress-label strong { color: var(--text); font-size: 0.92rem; font-weight: 800; }
.score-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; color: #6b5a31; font-size: 0.71rem; font-weight: 700; background: #fff8e8; border: 1px solid #f5e5bd; border-radius: 999px; }
.score-pill strong { font-size: 0.78rem; }
.progress-track { width: 100%; height: 7px; overflow: hidden; background: #edf1f7; border-radius: 999px; }
.progress-fill { display: block; width: 5%; height: 100%; background: linear-gradient(90deg, #2f80ed, #13a99b); border-radius: inherit; transition: width 0.42s ease; }
.lives-block { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 1px; }
.lives-label { color: var(--muted); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.lives { display: flex; align-items: center; gap: 2px; min-height: 28px; }
.heart { display: inline-block; font-size: 1.23rem; line-height: 1; filter: drop-shadow(0 2px 3px rgba(229, 72, 77, 0.12)); transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease; }
.heart--lost { opacity: 0.24; filter: grayscale(1); transform: scale(0.88); }

/* ---------- Пост ---------- */
.post-card { padding: 22px; background: var(--surface); border: 1px solid rgba(226, 233, 242, 0.95); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.post-card__head { display: flex; align-items: center; gap: 12px; }
.post-author { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.post-author__name { overflow: hidden; font-size: 0.96rem; font-weight: 800; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.post-author__meta { margin-top: 1px; color: var(--muted); font-size: 0.71rem; }
.post-badge { flex: 0 0 auto; padding: 4px 9px; color: #386ca9; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--accent-soft); border: 1px solid #d7e7ff; border-radius: 999px; }
.post-text { margin: 18px 0 18px; color: #273650; font-size: clamp(1.02rem, 1.8vw, 1.14rem); line-height: 1.58; letter-spacing: -0.008em; }
.post-card__footer { display: flex; align-items: center; gap: 15px; padding-top: 13px; color: var(--muted); font-size: 0.75rem; border-top: 1px solid var(--line); }
.reaction { display: inline-flex; align-items: center; gap: 4px; }
.post-card__spacer { flex: 1; }

/* ---------- Комментарии ---------- */
.comments-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 24px 2px 12px; }
.comments-heading h2 { display: flex; align-items: center; gap: 7px; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.comments-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; color: #53657e; font-size: 0.7rem; font-weight: 800; background: #eef2f8; border-radius: 999px; }
.comments-heading p { margin-top: 3px; color: var(--muted); font-size: 0.77rem; }
.detective-badge { flex: 0 0 auto; padding: 6px 10px; color: #51627b; font-size: 0.69rem; font-weight: 700; white-space: nowrap; background: rgba(255, 255, 255, 0.72); border: 1px solid #e3eaf4; border-radius: 999px; }

.comments-list { display: grid; gap: 10px; }
.comment-card { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 15px 16px; text-align: left; background: var(--surface); border: 1px solid #e8edf5; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(25, 42, 70, 0.045); cursor: pointer; outline: none; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.25s ease, background-color 0.18s ease; }
.comment-card:not([aria-disabled="true"]):hover { z-index: 1; background: #fff; border-color: #c7d8ef; box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.comment-card[aria-disabled="true"] { cursor: default; }
.comment-card .avatar { width: 40px; height: 40px; font-size: 1.12rem; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.comment-name { display: block; font-size: 0.89rem; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.comment-reg { display: block; margin-top: 1px; color: var(--muted); font-size: 0.69rem; line-height: 1.4; }
.comment-text { margin-top: 7px; color: #40506a; font-size: 0.88rem; line-height: 1.48; }
.comment-note { margin-top: 10px; padding: 9px 11px; color: #45536a; font-size: 0.77rem; line-height: 1.45; background: #f7f9fc; border: 1px solid #e8edf5; border-radius: 9px; animation: fadeIn 0.25s ease both; }
.comment-note--error { color: #8c3539; background: #fff6f6; border-color: #f5d6d7; }
.comment-note--success { color: #176c54; background: #f0fbf7; border-color: #c7ecdf; }
.comment-note b { font-weight: 800; }
.comment-verdict { position: absolute; top: -9px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 0.63rem; font-weight: 850; letter-spacing: 0.045em; text-transform: uppercase; border-radius: 999px; animation: badgeIn 0.25s ease both; }
.comment-verdict--bot { color: #fff; background: var(--danger); box-shadow: 0 4px 10px rgba(229, 72, 77, 0.24); }
.comment-verdict--real { color: #8e3a3d; background: #fff; border: 1px solid #efc0c1; box-shadow: 0 3px 9px rgba(229, 72, 77, 0.1); }
.comment-card.is-wrong { background: #fff8f8; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.075); }
.comment-card.is-caught { background: #fffafa; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.12), 0 8px 20px rgba(229, 72, 77, 0.1); animation: caughtPulse 0.48s ease both; }
.comment-card.is-wrong .comment-pick, .comment-card.is-caught .comment-pick { display: none; }
@keyframes badgeIn { from { opacity: 0; transform: translateY(4px) scale(0.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes caughtPulse { 0% { transform: scale(1); } 45% { transform: scale(1.012); } 100% { transform: scale(1); } }

/* ---------- Обратная связь ---------- */
.feedback { display: flex; align-items: flex-start; gap: 12px; margin-top: 15px; padding: 14px 15px; border: 1px solid; border-radius: var(--radius); animation: fadeUp 0.28s ease both; }
.feedback--success { background: var(--success-soft); border-color: var(--success-line); }
.feedback--error { background: var(--danger-soft); border-color: var(--danger-line); }
.feedback__icon { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; font-size: 1.05rem; background: rgba(255, 255, 255, 0.7); border-radius: 10px; }
.feedback__body { flex: 1; min-width: 0; }
.feedback__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.91rem; font-weight: 800; }
.feedback--success .feedback__title { color: #126e55; }
.feedback--error .feedback__title { color: #a62c31; }
.feedback__text { margin-top: 3px; color: #53617a; font-size: 0.81rem; line-height: 1.48; }
.feedback--error .feedback__text { color: #7c4b4e; }
.next-row { display: flex; justify-content: flex-end; margin-top: 16px; }
#nextButton { animation: popIn 0.28s ease both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ---------- Экран результата ---------- */
.result-screen { display: grid; place-items: center; min-height: calc(100vh - 210px); padding: 34px 0 64px; }
.result-card { position: relative; width: min(700px, 100%); padding: 40px 42px 30px; overflow: hidden; text-align: center; background: #fff; border: 1px solid rgba(224, 232, 243, 0.95); border-radius: 24px; box-shadow: 0 24px 70px rgba(25, 42, 70, 0.13); }
.result-card::before, .result-card::after { position: absolute; width: 260px; height: 260px; content: ""; border-radius: 50%; opacity: 0.72; pointer-events: none; }
.result-card::before { top: -150px; left: -110px; background: radial-gradient(circle, rgba(47, 128, 237, 0.16), transparent 68%); }
.result-card::after { top: -165px; right: -105px; background: radial-gradient(circle, rgba(19, 169, 155, 0.15), transparent 68%); }
.result-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto 19px; font-size: 2.55rem; background: linear-gradient(145deg, #e9f9f4, #e7f1ff); border: 1px solid #d7ece6; border-radius: 26px; box-shadow: 0 11px 28px rgba(23, 58, 96, 0.1); transform: rotate(-3deg); }
.result-kicker { position: relative; z-index: 1; color: var(--accent); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.result-card h1 { position: relative; z-index: 1; max-width: 550px; margin: 8px auto 10px; font-size: clamp(1.75rem, 4vw, 2.45rem); font-weight: 850; line-height: 1.1; letter-spacing: -0.045em; }
.result-text { position: relative; z-index: 1; max-width: 470px; margin: 0 auto; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.result-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 26px 0 20px; }
.result-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: #f7f9fd; border: 1px solid #e9eef6; border-radius: var(--radius); }
.result-stat strong { font-size: 1.48rem; font-weight: 850; line-height: 1.15; letter-spacing: -0.03em; }
.result-stat span { color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.result-actions { position: relative; z-index: 1; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }

/* ---------- Модальные окна ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(17, 29, 49, 0.42); backdrop-filter: blur(7px); }
.modal__panel { position: relative; z-index: 1; width: min(100%, 500px); max-height: calc(100dvh - 40px); padding: 28px; overflow-y: auto; background: #fff; border: 1px solid rgba(231, 236, 244, 0.9); border-radius: 20px; box-shadow: 0 28px 80px rgba(12, 27, 51, 0.24); animation: modalIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close { position: absolute; top: 15px; right: 15px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #7e8a9c; background: #f6f8fc; border: 1px solid #e8edf5; border-radius: 50%; transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; cursor: pointer; }
.modal-close:hover { color: var(--text); background: #eef2f8; border-color: #dbe3ef; }
.modal-kicker { display: block; color: var(--accent); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.105em; text-transform: uppercase; }
.modal__panel h2 { margin-top: 5px; font-size: 1.55rem; font-weight: 850; line-height: 1.15; letter-spacing: -0.04em; }
.modal-lead { margin-top: 8px; color: var(--muted); font-size: 0.86rem; line-height: 1.52; }
.setup-icon { display: block; text-align: center; font-size: 3rem; margin-bottom: 10px; }

/* ---------- Форма профиля ---------- */
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.form-label { color: #33425a; font-size: 0.76rem; font-weight: 750; }
.text-input { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--text); font-size: 0.96rem; background: #fbfcff; border: 1.5px solid var(--line-strong); border-radius: var(--radius); outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
.text-input::placeholder { color: #a3adbc; }
.text-input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.1); }
.text-input.has-error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.08); }
.avatar-picker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.avatar-option { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; font-size: 1.55rem; line-height: 1; background: #f7f9fd; border: 2px solid transparent; border-radius: var(--radius); transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; cursor: pointer; }
.avatar-option:hover { background: #f0f5fd; transform: translateY(-2px); }
.avatar-option.is-selected { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1); }

/* ---------- Профиль (статистика) ---------- */
.profile-hero { display: flex; align-items: center; gap: 15px; margin: 3px 30px 22px 0; }
.profile-hero h2 { margin-top: 3px; overflow-wrap: anywhere; }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.profile-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 10px; background: #f7f9fd; border: 1px solid #e9eef6; border-radius: var(--radius); text-align: center; }
.profile-stat strong { overflow: hidden; font-size: 1.4rem; font-weight: 850; line-height: 1.15; letter-spacing: -0.035em; color: var(--accent); }
.profile-stat span { color: var(--muted); font-size: 0.66rem; line-height: 1.35; }
.profile-reset { margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }

/* ---------- Правила ---------- */
.rules-levels { display: grid; gap: 10px; margin-bottom: 20px; }
.rules-level-item { padding: 12px 15px; border-radius: 12px; border: 1px solid var(--line); }
.rules-level-item strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.rules-level-item p { font-size: 0.85rem; color: var(--text); opacity: 0.8; line-height: 1.4; }

/* ---------- Поделиться ---------- */
.share-preview { display: flex; align-items: center; gap: 15px; padding: 15px; background: var(--surface-soft); border-radius: 12px; border: 1px solid var(--line); margin-bottom: 20px; }
.share-preview__avatar { font-size: 2rem; }
.share-preview strong { display: block; font-size: 1rem; }
.share-preview p { font-size: 0.85rem; color: var(--muted); }
.share-preview p b { color: var(--text); }
#copyStatus { color: var(--success); font-size: 0.8rem; margin-top: 8px; font-weight: 600; min-height: 20px; }

/* ---------- Адаптивность ---------- */
@media (max-width: 960px) {
  .start-screen { grid-template-columns: 1fr; gap: 18px; min-height: 0; padding: 32px 0 52px; text-align: center; }
  .hero__lead { margin: 0 auto 20px; }
  .hero__actions { justify-content: center; }
  .difficulty-selector { margin: 20px auto 0; text-align: left; }
  .preview-wrap { width: min(100%, 440px); margin: 0 auto; padding: 26px 20px; }
}
@media (max-width: 760px) {
  .header__inner { grid-template-columns: 1fr auto; width: calc(100% - 24px); }
  .brand { display: none; }
  .app { width: calc(100% - 24px); padding-top: 18px; }
  .game-topbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .lives-block { flex-direction: row; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
}
@media (max-width: 600px) {
  .hero__title { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .difficulty-btn { padding: 12px 15px; }
  .difficulty-icon { font-size: 1.2rem; }
  .difficulty-text strong { font-size: 0.95rem; }
  .difficulty-text small { font-size: 0.75rem; }
  .hero__facts { justify-content: center; margin-top: 20px; }
  .hero__fact { flex-direction: column; align-items: center; padding: 0 10px; border: none; }
  .preview-wrap { display: none; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .avatar-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}