* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0810;
    --bg-2: #100c1a;
    --card: #15111f;
    --card-hover: #1c1629;
    --accent: #a855f7;
    --accent-soft: rgba(168, 85, 247, 0.12);
    --gold: #d4af6a;
    --gold-dim: #b8945a;
    --gold-glow: rgba(212, 175, 106, 0.3);
    --text: #f0eaff;
    --text-dim: #8b7fa8;
    --text-mute: #5a4f70;
    --note: #e0d5b8;
    --green: #4ade80;
    --yellow: #facc15;
    --orange: #fb923c;
    --red: #ef4444;
    --radius: 14px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
}

/* ============ Звёздное небо ============ */
.bg-stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-stars::before,
.bg-stars::after {
    content: '';
    position: absolute;
    inset: -50%;
    pointer-events: none;
    background-repeat: repeat;
}

.bg-stars::before {
    background-image: url('/static/stars_far.png');
    background-size: 800px 800px;
    animation: driftFar 180s linear infinite;
    opacity: 0.85;
}

.bg-stars::after {
    background-image:
        url('/static/stars_near.png'),
        url('/static/stars_mid.png');
    background-size: 1200px 1200px, 1000px 1000px;
    background-position: 0 0, 0 0;
    animation: driftNear 90s linear infinite;
    opacity: 0.9;
}

@keyframes driftFar {
    0%   { background-position: 0 0; }
    100% { background-position: -800px -800px; }
}

@keyframes driftNear {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: -1200px -1200px, -1000px -1000px; }
}

/* ============ Аврора вместо сетки ============ */
.bg-grid {
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(168, 85, 247, 0.18), transparent 60%),
        radial-gradient(ellipse 70% 45% at 80% 5%, rgba(192, 132, 252, 0.14), transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(212, 175, 106, 0.10), transparent 55%);
    z-index: -3;
    pointer-events: none;
    animation: auroraShift 20s ease-in-out infinite;
}

@keyframes auroraShift {
    0%, 100% { opacity: 0.85; transform: scale(1) translateX(0); }
    50% { opacity: 1; transform: scale(1.08) translateX(-2%); }
}

.bg-glow {
    position: fixed;
    top: -35%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(168, 85, 247, 0.05) 40%, transparent 70%);
    z-index: -2;
    pointer-events: none;
    animation: glowPulse 10s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.bg-vignette {
    position: fixed; inset: 0;
    background: radial-gradient(circle at 50% 30%, transparent 40%, rgba(0,0,0,0.5) 100%);
    z-index: -1;
    pointer-events: none;
}

.music-btn {
    position: fixed;
    top: 20px; right: 20px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(21, 17, 31, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 106, 0.25);
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.25s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}
.music-btn:hover {
    border-color: var(--gold);
    transform: scale(1.06);
    box-shadow: 0 0 24px var(--gold-glow);
}

/* ============ Шапка страниц ============ */
.page-header {
    position: relative;
    z-index: 10;
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    background: linear-gradient(135deg, #e8d5ff 0%, #c084fc 40%, #d4af6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-link {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }

.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 64px 20px 60px;
    position: relative;
    z-index: 1;
}

/* ============ Hero ============ */
.hero { text-align: center; margin-bottom: 44px; }

.brand-line {
    font-size: 0.65rem;
    letter-spacing: 6px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 18px;
    font-weight: 500;
    opacity: 0.75;
}

.brand-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 3.4rem;
    font-weight: 600;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #e8d5ff 0%, #c084fc 40%, #d4af6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.35));
    line-height: 1.05;
}

.brand-sub {
    font-size: 0.82rem;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    font-weight: 300;
    text-transform: uppercase;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 20px;
}

.hero-quote {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.15rem;
    color: var(--gold);
    font-style: italic;
    letter-spacing: 0.5px;
    opacity: 0.75;
    font-weight: 300;
}

/* ============ Меню-карточки ============ */
.menu-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.menu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid rgba(168, 85, 247, 0.08);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s var(--ease-out);
    opacity: 0;
    transform: translateY(12px);
    animation: cardIn 0.5s var(--ease-out) forwards;
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.menu-card:nth-child(1) { animation-delay: 0.05s; }
.menu-card:nth-child(2) { animation-delay: 0.1s; }
.menu-card:nth-child(3) { animation-delay: 0.15s; }
.menu-card:nth-child(4) { animation-delay: 0.2s; }
.menu-card:nth-child(5) { animation-delay: 0.25s; }
.menu-card:nth-child(6) { animation-delay: 0.3s; }
.menu-card:nth-child(7) { animation-delay: 0.35s; }
.menu-card:nth-child(8) { animation-delay: 0.4s; }
.menu-card:nth-child(9) { animation-delay: 0.45s; }

@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

.menu-card:hover {
    border-color: rgba(212, 175, 106, 0.35);
    background: var(--card-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 30px rgba(168, 85, 247, 0.15);
}

.menu-card:hover::before { opacity: 1; }
.menu-card:hover .menu-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--gold);
}

.menu-icon {
    font-size: 1.5rem;
    color: var(--gold);
    width: 32px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
    font-weight: 300;
}

.menu-text { flex: 1; }
.menu-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 3px;
    color: var(--text);
    letter-spacing: 0.3px;
}
.menu-sub {
    font-size: 0.75rem;
    color: var(--text-mute);
    letter-spacing: 0.3px;
    font-weight: 300;
}

.menu-arrow {
    font-size: 1rem;
    color: var(--text-mute);
    opacity: 0.3;
    transform: translateX(-4px);
    transition: all 0.3s var(--ease-out);
}

/* ============ Кнопки ============ */
.btn-primary {
    display: block;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #6b21a8 0%, #a855f7 50%, #c084fc 100%);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    margin-bottom: 24px;
    text-align: center;
    text-decoration: none;
    animation: gradientShift 6s ease infinite;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    position: relative;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 60px rgba(168, 85, 247, 0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-large { padding: 22px; font-size: 1rem; letter-spacing: 5px; }

.btn-arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s var(--ease-out);
}
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-secondary {
    display: block;
    width: 100%;
    padding: 18px;
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 106, 0.35);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    margin-bottom: 20px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}
.btn-secondary:hover {
    background: rgba(212, 175, 106, 0.06);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--gold-glow);
}

.btn-who { display: flex; align-items: center; justify-content: center; gap: 12px; }
.swords { font-size: 1.1rem; }

.btn-ghost {
    display: block;
    text-align: center;
    padding: 12px;
    color: var(--text-mute);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text-dim); }

/* ============ CTA Telegram ============ */
.cta-tg {
    background: linear-gradient(135deg, rgba(21, 17, 31, 1), rgba(30, 22, 45, 1));
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: var(--radius);
    padding: 28px 22px;
    margin-bottom: 20px;
    text-align: center;
    animation: cardIn 0.5s var(--ease-out) 0.4s backwards;
    position: relative;
    overflow: hidden;
}

.cta-tg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.cta-tg-label {
    font-size: 0.65rem;
    letter-spacing: 5px;
    color: var(--gold);
    margin-bottom: 12px;
    opacity: 0.7;
    font-weight: 500;
}

.cta-tg-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: 0.5px;
}

.cta-tg-sub {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    font-weight: 300;
}

.btn-tg {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 4px 24px rgba(42, 171, 238, 0.35);
}
.btn-tg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(42, 171, 238, 0.55);
}

.tg-icon { font-size: 1rem; }

.footnote {
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-mute);
    line-height: 1.6;
    margin-top: 28px;
    padding: 0 10px;
    letter-spacing: 0.3px;
    font-weight: 300;
}

/* ============ Экраны ============ */
.screen { display: none; }
.screen.active { display: block; animation: fadeUp 0.4s var(--ease-out); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen-header { text-align: center; margin-bottom: 40px; }

/* ============ Photo guide ============ */
.photo-guide {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    animation: cardIn 0.5s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(12px);
}

.photo-guide-title {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
    opacity: 0.9;
}

.photo-guide-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.photo-guide-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.photo-guide-item b {
    color: var(--note);
    font-weight: 600;
}

.photo-guide-icon {
    color: var(--gold);
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}

/* ============ Загрузка фото ============ */
.upload-zone {
    display: block; width: 100%; aspect-ratio: 3/4; max-height: 440px;
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}
.upload-zone:hover { border-color: var(--gold); background: var(--card-hover); box-shadow: 0 0 40px var(--gold-glow); }
.upload-zone:hover .upload-icon { transform: scale(1.1); color: var(--gold); }

.upload-frame {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; gap: 12px;
}
.upload-icon {
    font-size: 3rem; color: var(--text-mute); font-weight: 200; line-height: 1;
    transition: all 0.3s var(--ease-out);
}
.upload-text { font-size: 0.9rem; color: var(--text-dim); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }
.upload-hint { font-size: 0.72rem; color: var(--text-mute); letter-spacing: 0.5px; }

.preview {
    width: 100%; max-height: 440px; object-fit: contain;
    border-radius: var(--radius); margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 106, 0.3);
    animation: fadeUp 0.4s var(--ease-out);
}

/* ============ Сканирование ============ */
.scan-wrap {
    position: relative; width: 100%; max-height: 480px;
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.5);
    margin-bottom: 24px; background: #000;
}
.scan-img { width: 100%; display: block; filter: brightness(0.5) contrast(1.2); }

#mesh-canvas {
    position: absolute;
    pointer-events: none;
    z-index: 4;
}

/* ============ Лоадинг-факты ============ */
.scan-facts {
    background: rgba(21, 17, 31, 0.85);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
    text-align: left;
    animation: cardIn 0.5s var(--ease-out);
    min-height: 74px;
}

.scan-fact-label {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.9;
}

.scan-fact-text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--note);
    font-weight: 500;
    transition: opacity 0.4s ease;
}

.scan-fact-text.fading {
    opacity: 0;
}

.progress-block { text-align: center; margin-bottom: 16px; }
.progress-bar {
    width: 100%; height: 3px; background: rgba(168, 85, 247, 0.15);
    border-radius: 2px; overflow: hidden; margin-bottom: 12px;
}
.progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #d4af6a);
    box-shadow: 0 0 15px var(--accent);
    transition: width 0.15s linear;
    border-radius: 2px;
}
.progress-percent {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2rem; font-weight: 600; color: var(--gold);
    letter-spacing: 4px;
}
.scan-status { text-align: center; font-size: 0.78rem; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; }

/* ============ Метрики поверх фото ============ */
.metric-tag {
    position: absolute;
    z-index: 5;
    font-family: 'Inter', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #ffd782;
    background: rgba(0,0,0,0.78);
    padding: 5px 9px;
    border: 1px solid rgba(212,175,106,0.55);
    border-radius: 4px;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .5s ease, transform .5s ease;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.metric-tag.on { opacity: 1; transform: translateY(0); }

.scan-topbar {
    position: absolute;
    top: 12px; left: 14px;
    z-index: 5;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #ffd782;
    background: rgba(0,0,0,0.78);
    padding: 6px 10px;
    border: 1px solid rgba(212,175,106,0.55);
    border-radius: 4px;
    opacity: 0;
    transition: opacity .5s;
}
.scan-topbar.on { opacity: 1; }

.scan-fwhr {
    position: absolute;
    top: 12px; right: 14px;
    z-index: 5;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.78);
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity .5s;
}
.scan-fwhr.on { opacity: 1; }

.scan-botbar {
    position: absolute;
    bottom: 12px; right: 14px;
    z-index: 5;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.7);
    padding: 5px 9px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .5s;
}
.scan-botbar.on { opacity: 1; }

/* ============ Результат ============ */
.result-header { text-align: center; margin-bottom: 30px; animation: fadeUp 0.5s var(--ease-out); }
.result-label { font-size: 0.7rem; letter-spacing: 5px; color: var(--gold); margin-bottom: 20px; opacity: 0.75; }

.score-row { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin-bottom: 16px; }
.score-big {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 6.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -3px;
    background: linear-gradient(135deg, #e8d5ff, #c084fc, #d4af6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6));
    animation: scorePop 0.7s var(--ease-out);
    display: inline-block;
    padding: 8px 0 4px 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}
@keyframes scorePop {
    0% { opacity: 0; transform: scale(0.6); }
    60% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}
.score-side { text-align: left; padding-bottom: 16px; }
.score-max { font-size: 0.85rem; color: var(--text-mute); letter-spacing: 2px; }
.score-status { font-size: 1rem; font-weight: 700; color: var(--gold); letter-spacing: 3px; margin-top: 6px; text-transform: uppercase; }

.summary-block {
    background: var(--card); border: 1px solid rgba(212, 175, 106, 0.18);
    border-radius: var(--radius); padding: 22px; margin-bottom: 28px;
    animation: fadeUp 0.6s var(--ease-out) 0.1s backwards;
    position: relative;
}
.summary-block::before {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.4;
}
.summary-label { font-size: 0.65rem; letter-spacing: 4px; color: var(--gold); margin-bottom: 12px; opacity: 0.85; }
.summary-text { font-size: 0.95rem; line-height: 1.65; color: var(--text); font-weight: 400; letter-spacing: 0.2px; }

.params-title { font-size: 0.7rem; letter-spacing: 4px; color: var(--text-mute); margin-bottom: 16px; text-align: center; }
.params { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }

.param-card {
    background: var(--card); border-radius: 12px; padding: 16px 18px;
    border-left: 2px solid var(--gold);
    opacity: 0; transform: translateY(16px);
    animation: cardIn 0.4s var(--ease-out) forwards;
    transition: background 0.2s;
}
.param-card:hover { background: var(--card-hover); }

.param-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.param-name { font-size: 0.75rem; letter-spacing: 2px; color: var(--text-dim); text-transform: uppercase; }
.param-val { font-family: 'Georgia', 'Times New Roman', serif; font-size: 1.4rem; font-weight: 600; }
.param-bar { width: 100%; height: 2px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.param-fill { height: 100%; border-radius: 2px; width: 0; transition: width 0.8s var(--ease-out); }
.param-note {
    font-size: 0.82rem;
    color: var(--note);
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.cta-block {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(212, 175, 106, 0.04));
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: var(--radius); padding: 26px 20px; margin-bottom: 20px;
    text-align: center;
    animation: fadeUp 0.6s var(--ease-out) 0.3s backwards;
}
.cta-title { font-family: 'Georgia', 'Times New Roman', serif; font-size: 1.4rem; font-weight: 600; letter-spacing: 1px; margin-bottom: 6px; }
.cta-sub { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 22px; letter-spacing: 0.5px; }
.cta-block .btn-primary { background: linear-gradient(135deg, #a855f7, #d4af6a); margin-bottom: 10px; font-size: 0.85rem; }
.cta-block .btn-secondary { border-color: rgba(212, 175, 106, 0.5); font-size: 0.8rem; }

/* ============ Пропорции ============ */
.proportions-block {
    margin-top: 30px; padding: 24px 20px;
    background: linear-gradient(180deg, rgba(36,36,62,0.9), rgba(26,26,46,0.9));
    border: 1px solid rgba(212,175,106,0.25); border-radius: 16px;
}
.proportions-title {
    font-size: 13px; font-weight: 700; letter-spacing: 3px;
    color: #d4af6a; margin-bottom: 6px;
}
.proportions-sub {
    font-size: 12px; color: #e0d5b8; opacity: 0.7; margin-bottom: 18px;
}
.prop-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212,175,106,0.12);
    opacity: 0; transform: translateX(-8px);
    animation: propIn 0.4s forwards;
}
.prop-row:last-child { border-bottom: none; }
@keyframes propIn { to { opacity: 1; transform: translateX(0); } }
.prop-left { flex: 1; }
.prop-label { font-size: 13px; color: #fff; font-weight: 500; margin-bottom: 3px; }
.prop-status { font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.prop-right { text-align: right; }
.prop-value { font-size: 18px; font-weight: 700; color: #d4af6a; line-height: 1; }
.prop-avg { font-size: 11px; color: #e0d5b8; opacity: 0.6; margin-top: 3px; }

/* ============ Потенциал ============ */
.potential-block {
    margin-top: 30px; padding: 26px 20px;
    background: linear-gradient(135deg, rgba(157,78,221,0.15), rgba(212,175,106,0.12));
    border: 1px solid rgba(212,175,106,0.35); border-radius: 16px;
    text-align: center;
}
.potential-title {
    font-size: 13px; font-weight: 700; letter-spacing: 3px;
    color: #d4af6a; margin-bottom: 20px;
}
.potential-row {
    display: flex; justify-content: center; align-items: center; gap: 20px;
    font-size: 38px; font-weight: 700; color: #fff;
}
.potential-arrow { color: #d4af6a; font-size: 28px; }
.potential-current { opacity: 0.6; }
.potential-achievable { color: #4ade80; }
.potential-label {
    font-size: 11px; color: #e0d5b8; opacity: 0.7;
    margin-top: 8px; letter-spacing: 0.5px;
}

/* ============ Экран оплаты ============ */
.payment-screen {
    background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(212,175,106,0.06));
    border: 1px solid rgba(212,175,106,0.35);
    border-radius: 16px;
    padding: 32px 22px;
    text-align: center;
    animation: fadeUp 0.5s var(--ease-out);
}
.payment-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.payment-sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 22px;
}
.pack-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}
.pack-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border: 1px solid rgba(212,175,106,0.2);
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
}
.pack-card:hover {
    border-color: var(--gold);
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 30px var(--gold-glow);
}
.pack-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.5px;
}
.pack-price {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.pack-loading {
    opacity: 0.5;
    pointer-events: none;
}
.pack-owned {
    border-color: var(--gold) !important;
    background: var(--card-hover) !important;
}
.payment-status {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 10px;
    letter-spacing: 0.5px;
    min-height: 20px;
}
.payment-guide {
    text-align: left;
    background: rgba(10, 8, 16, 0.5);
    border: 1px solid rgba(212, 175, 106, 0.12);
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 24px;
    margin-bottom: 20px;
}
.payment-guide-title {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
    opacity: 0.85;
}
.payment-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.55;
    padding: 6px 0;
}
.payment-guide-num {
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
    width: 18px;
}
.payment-guide b {
    color: var(--note);
    font-weight: 600;
}
#check-payment-btn {
    display: none;
    margin-top: 14px;
}

/* ============ Статьи ============ */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.article-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.article-card:hover {
    border-color: rgba(212, 175, 106, 0.4);
    background: var(--card-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 30px rgba(168, 85, 247, 0.15);
}
.article-card:hover::before { opacity: 1; }
.article-card:hover .menu-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--gold);
}

.article-card-num {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--gold);
    opacity: 0.75;
    width: 40px;
    flex-shrink: 0;
}

.article-card-text { flex: 1; }

.article-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.article-card-sub {
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.article-full {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: var(--radius);
    padding: 26px 22px;
    margin-bottom: 30px;
    animation: fadeUp 0.5s var(--ease-out);
}

.article-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(212, 175, 106, 0.1);
}
.article-section:last-child { border-bottom: none; }

.article-heading {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.article-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text);
    letter-spacing: 0.2px;
}
.article-text b {
    color: var(--note);
    font-weight: 600;
}

.article-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    padding-left: 20px;
    position: relative;
}

.article-list li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--gold);
    opacity: 0.7;
    font-size: 0.7rem;
    top: 4px;
}

.article-list li b {
    color: var(--note);
    font-weight: 600;
}

/* ============ Словарь ============ */
.dict-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.dict-card {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-left: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px 22px;
    animation: fadeUp 0.5s var(--ease-out);
    transition: background 0.2s;
}
.dict-card:hover { background: var(--card-hover); }

.dict-term {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.dict-def {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text);
    letter-spacing: 0.2px;
}
.dict-def b {
    color: var(--note);
    font-weight: 600;
}

/* ============ Battle ============ */
.battle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.battle-upload {
    aspect-ratio: 3/4;
    max-height: 280px;
    border: 1px dashed rgba(212, 175, 106, 0.4);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.battle-upload:hover {
    border-color: var(--gold);
    background: var(--card-hover);
    box-shadow: 0 0 30px var(--gold-glow);
}

.battle-upload-icon {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--gold);
    opacity: 0.7;
}

.battle-upload-text {
    font-size: 0.78rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.battle-previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.battle-preview-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 280px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0a0810;
}

.battle-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0a0810;
    border-radius: var(--radius);
    border: 1px solid rgba(212, 175, 106, 0.3);
    animation: fadeUp 0.4s var(--ease-out);
    display: block;
}

.battle-preview-wrap canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    z-index: 3;
}

.battle-result {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(212, 175, 106, 0.04));
    border: 1px solid rgba(212, 175, 106, 0.3);
    border-radius: var(--radius);
    padding: 26px 20px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeUp 0.6s var(--ease-out);
}

.battle-winner {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 22px;
    letter-spacing: 1px;
}

.battle-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.battle-score-box {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 12px;
    padding: 18px 12px;
    transition: all 0.3s var(--ease-out);
}

.battle-winner-box {
    border-color: var(--gold);
    box-shadow: 0 0 30px var(--gold-glow);
    background: var(--card-hover);
}

.battle-score-label {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--text-mute);
    margin-bottom: 8px;
}

.battle-score-value {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.battle-score-status {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.battle-diff {
    font-size: 0.82rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ============ Профиль ============ */
.profile-hero {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeUp 0.5s var(--ease-out);
}

.profile-avatar-wrap {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold);
    box-shadow: 0 0 40px var(--gold-glow);
    background: var(--card);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-stub {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.6;
}

.profile-username {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.profile-status {
    font-size: 0.82rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 20px;
}

.profile-score-row {
    margin: 20px 0 12px;
}

.profile-score-big {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    filter: drop-shadow(0 0 30px rgba(212, 175, 106, 0.4));
}

.profile-score-label {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-mute);
    text-transform: uppercase;
    margin-top: 6px;
}

.profile-meta {
    font-size: 0.82rem;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.profile-stat-card {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 12px;
    padding: 16px 14px;
    text-align: center;
    transition: all 0.3s var(--ease-out);
}
.profile-stat-card:hover {
    border-color: var(--gold);
    background: var(--card-hover);
}

.profile-stat-value {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.profile-stat-label {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--text-mute);
    text-transform: uppercase;
    font-weight: 500;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 175, 106, 0.1);
}
.profile-info-row:last-child { border-bottom: none; }

.profile-info-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.profile-info-value {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.profile-edit-field {
    margin-bottom: 16px;
}

.profile-edit-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.85;
}

.profile-edit-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    background: rgba(10, 8, 16, 0.6);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    margin-bottom: 10px;
    transition: all 0.2s var(--ease-out);
    resize: vertical;
}
.profile-edit-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.profile-edit-btn {
    padding: 10px 16px !important;
    font-size: 0.75rem !important;
    letter-spacing: 2px !important;
    margin-bottom: 0 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 140px;
}

.profile-edit-status {
    font-size: 0.82rem;
    text-align: center;
    min-height: 20px;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

/* ============ Loading / Error ============ */
.loading-spinner {
    font-size: 3rem;
    text-align: center;
    margin: 60px 0 20px;
    animation: spin 2s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.error-block {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: var(--radius);
    padding: 32px 22px;
    text-align: center;
    margin-top: 40px;
    animation: fadeUp 0.5s var(--ease-out);
}
.error-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.7;
}
.error-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.error-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ============ AI-чат ============ */
.chat-roles {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.chat-roles::-webkit-scrollbar { display: none; }

.chat-role {
    flex-shrink: 0;
    padding: 8px 14px;
    background: rgba(21, 17, 31, 0.8);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: 20px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.chat-role:hover {
    border-color: var(--gold);
    color: var(--text);
}

.chat-role.active {
    background: linear-gradient(135deg, #6b21a8, #a855f7);
    border-color: #a855f7;
    color: #fff;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.chat-limit-bar {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: rgba(212, 175, 106, 0.08);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.chat-container {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
}

.chat-messages {
    flex: 1;
    min-height: 380px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, rgba(10, 8, 16, 0.5), rgba(21, 17, 31, 0.3));
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 106, 0.25);
    border-radius: 3px;
}

.chat-bubble {
    max-width: 85%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-wrap: break-word;
    animation: bubbleIn 0.3s var(--ease-out);
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6b21a8, #a855f7);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble-assistant {
    align-self: flex-start;
    background: rgba(21, 17, 31, 0.9);
    border: 1px solid rgba(212, 175, 106, 0.2);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.chat-typing {
    opacity: 0.7;
    font-style: italic;
    color: var(--gold);
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(212, 175, 106, 0.15);
    background: var(--card);
}

.chat-input {
    flex: 1;
    background: rgba(10, 8, 16, 0.6);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 10px 12px;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}

.chat-send {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b21a8, #a855f7);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
}

.chat-send:hover { transform: scale(1.06); }
.chat-send:active { transform: scale(0.96); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-suggestion {
    flex: 1 1 auto;
    padding: 9px 14px;
    background: rgba(212, 175, 106, 0.06);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: 20px;
    color: var(--note);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-suggestion:hover {
    background: rgba(212, 175, 106, 0.14);
    border-color: var(--gold);
    color: var(--text);
}

/* ============ База знаний — каталог ============ */
.guides-progress-bar {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.guides-progress-text {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.guides-progress-text span {
    color: var(--text);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
}

.guides-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(212, 175, 106, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.guides-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a855f7, #d4af6a);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(212, 175, 106, 0.5);
    transition: width 0.8s var(--ease-out);
}

.guides-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s var(--ease-out);
    opacity: 0;
    transform: translateY(12px);
    animation: cardIn 0.5s var(--ease-out) forwards;
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.guide-card:hover {
    border-color: rgba(212, 175, 106, 0.4);
    background: var(--card-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 30px rgba(168, 85, 247, 0.15);
}

.guide-card:hover::before { opacity: 1; }
.guide-card:hover .menu-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--gold);
}

.guide-card-locked {
    opacity: 0.75;
}

.guide-emoji {
    font-size: 1.7rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    filter: drop-shadow(0 0 8px rgba(212, 175, 106, 0.3));
}

.guide-text {
    flex: 1;
    min-width: 0;
}

.guide-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.guide-lock {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-left: 4px;
}

.guide-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.2px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.guide-preview {
    font-size: 0.7rem;
    color: var(--text-mute);
    letter-spacing: 0.2px;
    line-height: 1.4;
    opacity: 0.8;
}

/* ============ База знаний — гайд ============ */
.guide-content {
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: var(--radius);
    padding: 24px 22px;
    margin-bottom: 20px;
    animation: fadeUp 0.5s var(--ease-out);
}

.guide-h2 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gold);
    margin-top: 26px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    line-height: 1.3;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 106, 0.15);
}

.guide-h2:first-child { margin-top: 0; }

.guide-h3 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--note);
    margin-top: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.guide-p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}

.guide-p b {
    color: var(--note);
    font-weight: 600;
}

.guide-content ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 14px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-content li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    padding-left: 20px;
    position: relative;
    letter-spacing: 0.2px;
}

.guide-content li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--gold);
    opacity: 0.7;
    font-size: 0.7rem;
}

.guide-content li b {
    color: var(--note);
    font-weight: 600;
}

.guide-line {
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 8px;
    border-left: 3px solid;
    letter-spacing: 0.2px;
}

.guide-line-bad {
    background: rgba(239, 68, 68, 0.06);
    border-left-color: var(--red);
    color: #ffb3b3;
}

.guide-line-good {
    background: rgba(74, 222, 128, 0.06);
    border-left-color: var(--green);
    color: #b3ffcc;
}

.guide-line-warn {
    background: rgba(251, 146, 60, 0.06);
    border-left-color: var(--orange);
    color: #ffd9b3;
}

/* ============ Знакомства (Dating) ============ */
.dating-counter {
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: rgba(212, 175, 106, 0.08);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 10px;
}

.dating-stack {
    position: relative;
    width: 100%;
    height: 480px;
    margin-bottom: 20px;
    perspective: 1000px;
}

.dating-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    border: 1px solid rgba(212, 175, 106, 0.25);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    will-change: transform;
}

.dating-card:active {
    cursor: grabbing;
}

.dating-photo {
    position: relative;
    flex: 1;
    min-height: 0;
    background: linear-gradient(135deg, #1c1629, #0a0810);
    overflow: hidden;
}

.dating-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
}

.dating-photo-stub {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    opacity: 0.3;
}

.dating-boost {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 106, 0.5);
    z-index: 3;
}

.dating-overlay-like,
.dating-overlay-dislike {
    position: absolute;
    top: 40px;
    font-size: 5rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    z-index: 4;
    text-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.dating-overlay-like {
    left: 30px;
    color: var(--green);
    transform: rotate(-15deg);
}

.dating-overlay-dislike {
    right: 30px;
    color: var(--red);
    transform: rotate(15deg);
}

.dating-info {
    padding: 16px 18px 18px;
    background: var(--card);
    border-top: 1px solid rgba(212, 175, 106, 0.15);
}

.dating-name {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.dating-city {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.dating-status {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--gold);
    background: rgba(212, 175, 106, 0.1);
    border: 1px solid rgba(212, 175, 106, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 4px;
}

.dating-social {
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    margin-left: 6px;
    opacity: 0.9;
}

.dating-bio {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--note);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 106, 0.1);
    max-height: 80px;
    overflow-y: auto;
}

.dating-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.dating-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid;
    background: rgba(21, 17, 31, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.dating-btn:hover {
    transform: scale(1.08);
}

.dating-btn:active {
    transform: scale(0.92);
}

.dating-btn-dislike {
    border-color: var(--red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}
.dating-btn-dislike:hover {
    background: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.dating-btn-like {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}
.dating-btn-like:hover {
    background: rgba(74, 222, 128, 0.15);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
}

.dating-btn-super {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}
.dating-btn-super:hover {
    background: rgba(212, 175, 106, 0.15);
    box-shadow: 0 0 30px var(--gold-glow);
}

.dating-empty {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 20px;
}

.dating-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.dating-empty-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 10px;
}

.dating-empty-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.dating-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.dating-match-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 16, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeUp 0.4s var(--ease-out);
}

.dating-match-content {
    background: var(--card);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 320px;
    box-shadow: 0 0 60px var(--gold-glow);
    animation: scorePop 0.6s var(--ease-out);
}

.dating-match-emoji {
    font-size: 4rem;
    margin-bottom: 12px;
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.dating-match-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
}

.dating-match-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 22px;
    line-height: 1.5;
}

/* ============ Адаптив ============ */
@media (max-width: 420px) {
    .brand-title { font-size: 2.8rem; }
    .score-big { font-size: 6rem; }
    .container { padding: 52px 16px 40px; }
    .article-card { padding: 16px 18px; }
    .article-card-num { font-size: 1.3rem; width: 32px; }
    .article-card-title { font-size: 0.88rem; }
    .dict-card { padding: 16px 18px; }
    .dict-term { font-size: 1.05rem; }
    .battle-winner { font-size: 1.3rem; }
    .battle-score-value { font-size: 2rem; }
    .profile-score-big { font-size: 2.8rem; }
    .profile-avatar-wrap { width: 120px; height: 120px; }
    .chat-messages { min-height: 320px; }
    .dating-stack { height: 420px; }
    .dating-btn { width: 56px; height: 56px; font-size: 1.3rem; }
}


/* ============ BATTLE v3 — фикс слотов ============ */
.battle-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}
.battle-replace-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(167, 139, 250, 0.9);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    z-index: 4;
    transition: background 0.2s, transform 0.2s;
}
.battle-replace-btn:hover { background: rgba(167, 139, 250, 1); transform: scale(1.05); }

/* Перебиваем старые правила: слот и превью должны быть в одной ячейке */
.battle-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}
.battle-grid > .battle-cell > .battle-upload {
    display: flex;
    aspect-ratio: 3/4;
    max-height: none;
}
.battle-grid > .battle-cell > .battle-preview-wrap {
    aspect-ratio: 3/4;
    max-height: none;
}