/* ===== GhostCloud — Purple Cyber Theme ===== */

/* --- Tokens --- */
:root {
    --primary: #a855f7;
    --primary-dark: #9333ea;
    --primary-light: #d8b4fe;
    --accent: #c084fc;
    --secondary: #7c3aed;
    --gradient: linear-gradient(135deg, #a855f7, #c084fc);
    --gradient-accent: linear-gradient(135deg, #c084fc, #7c3aed);

    /* dark (default) */
    --bg: #0a0a0f;
    --bg-2: #111118;
    --bg-3: #1a1a24;
    --bg-card: rgba(168, 85, 247, 0.04);
    --bg-card-h: rgba(168, 85, 247, 0.08);
    --glass: rgba(168, 85, 247, 0.03);
    --glass-border: rgba(168, 85, 247, 0.12);
    --glass-border-h: rgba(168, 85, 247, 0.4);
    --text: #f5f5f7;
    --text-2: rgba(255, 255, 255, 0.72);
    --text-3: rgba(255, 255, 255, 0.45);
    --header-bg: rgba(10, 10, 15, 0.82);
    --modal-bg: #16161e;
    --input-bg: rgba(255, 255, 255, 0.04);
    --border: rgba(168, 85, 247, 0.15);
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    --success: #34d399;
    --error: #f87171;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xl: 20px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f5f0ff;
        --bg-2: #ede8fc;
        --bg-3: #ffffff;
        --bg-card: rgba(147, 51, 234, 0.05);
        --bg-card-h: rgba(147, 51, 234, 0.1);
        --glass: rgba(255, 255, 255, 0.6);
        --glass-border: rgba(147, 51, 234, 0.2);
        --glass-border-h: rgba(147, 51, 234, 0.5);
        --text: #1e1630;
        --text-2: rgba(30, 22, 48, 0.72);
        --text-3: rgba(30, 22, 48, 0.48);
        --header-bg: rgba(245, 240, 255, 0.9);
        --modal-bg: #ffffff;
        --input-bg: rgba(0, 0, 0, 0.04);
        --shadow: 0 24px 64px rgba(80, 40, 120, 0.1);
    }
}

html.light-theme {
    --bg: #f5f0ff;
    --bg-2: #ede8fc;
    --bg-3: #ffffff;
    --bg-card: rgba(147, 51, 234, 0.05);
    --bg-card-h: rgba(147, 51, 234, 0.1);
    --glass: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(147, 51, 234, 0.2);
    --glass-border-h: rgba(147, 51, 234, 0.5);
    --text: #1e1630;
    --text-2: rgba(30, 22, 48, 0.72);
    --text-3: rgba(30, 22, 48, 0.48);
    --header-bg: rgba(245, 240, 255, 0.9);
    --modal-bg: #ffffff;
    --input-bg: rgba(0, 0, 0, 0.04);
    --shadow: 0 24px 64px rgba(80, 40, 120, 0.1);
}
html.dark-theme {
    --bg: #0a0a0f;
    --bg-2: #111118;
    --bg-3: #1a1a24;
    --bg-card: rgba(168, 85, 247, 0.04);
    --bg-card-h: rgba(168, 85, 247, 0.08);
    --glass: rgba(168, 85, 247, 0.03);
    --glass-border: rgba(168, 85, 247, 0.12);
    --glass-border-h: rgba(168, 85, 247, 0.4);
    --text: #f5f5f7;
    --text-2: rgba(255, 255, 255, 0.72);
    --text-3: rgba(255, 255, 255, 0.45);
    --header-bg: rgba(10, 10, 15, 0.82);
    --modal-bg: #16161e;
    --input-bg: rgba(255, 255, 255, 0.04);
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

/* --- Theme toggle --- */
.theme-toggle {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-2);
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; font-size: 18px;
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--glass-border-h); color: var(--primary); background: var(--bg-card-h); }
.theme-toggle .bi-sun-fill { display: none; }
.theme-toggle .bi-moon-fill { display: inline; }
html.light-theme .theme-toggle .bi-sun-fill { display: inline; }
html.light-theme .theme-toggle .bi-moon-fill { display: none; }

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; caret-color: transparent; }
input, textarea, select, [contenteditable] { caret-color: auto; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Кнопки и кликабельные <a> без href всегда показывают pointer-курсор,
   а текст внутри нельзя выделить (иначе появляется I-beam) */
button, a:not([href]) { cursor: pointer; }
button > *, a > * { user-select: none; }

/* --- Grid background --- */
.grid-bg {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
}
.glow-orb {
    position: absolute; border-radius: 50%; filter: blur(100px);
}
.orb-1 { width: 500px; height: 500px; background: rgba(168, 85, 247, 0.15); top: -10%; left: -5%; }
.orb-2 { width: 400px; height: 400px; background: rgba(124, 58, 237, 0.12); bottom: -10%; right: -5%; }
.orb-3 { width: 350px; height: 350px; background: rgba(34, 211, 238, 0.1); top: 40%; left: 60%; }

/* --- Container --- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: var(--header-bg);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.3s, box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text);
}
.logo-mark {
    position: relative; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
}
.logo-img { width: 40px; height: 40px; border-radius: 10px; position: relative; z-index: 2; }
.logo-pulse {
    position: absolute; inset: -2px; border-radius: 12px;
    border: 1.5px solid var(--primary);
    opacity: 0; animation: logo-pulse 3s ease-in-out infinite;
}
@keyframes logo-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0; }
}
.logo-text {
    font-size: 20px; font-weight: 800; letter-spacing: -0.5px;
    font-family: 'Inter', sans-serif;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-badge {
    display: inline-block; padding: 3px 8px; border-radius: 6px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--primary); font-size: 10px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-link {
    color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: color 0.2s; position: relative;
}
.nav-link::after {
    content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1.5px;
    background: var(--gradient); border-radius: 1px; transition: width 0.25s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-login {
    padding: 10px 22px; border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text) !important; font-weight: 600; font-size: 14px;
    text-decoration: none; transition: all 0.25s;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
}
.nav-login:hover { border-color: var(--glass-border-h); background: var(--bg-card-h); color: var(--primary) !important; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; z-index: 210; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 110px 0 60px; position: relative; }
.hero-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 16px; border-radius: 100px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    font-size: 13px; font-weight: 500; color: var(--primary);
    margin-bottom: 24px;
    font-family: 'JetBrains Mono', monospace;
}
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: blink 2s ease-in-out infinite;
}
.badge-divider { width: 1px; height: 14px; background: rgba(168, 85, 247, 0.3); }
.badge-status { color: var(--text-2); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-title {
    font-size: clamp(40px, 5.8vw, 72px);
    font-weight: 900; line-height: 1.05;
    letter-spacing: -0.03em; margin-bottom: 20px;
}
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: clamp(16px, 1.6vw, 18px); color: var(--text-2);
    max-width: 540px; margin-bottom: 36px; line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-metrics { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.metric { display: flex; flex-direction: column; padding: 0 22px; }
.metric:first-child { padding-left: 0; }
.metric-val {
    font-size: 30px; font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.metric-lbl { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }
.metric-sep { width: 1px; height: 38px; background: var(--glass-border); }

/* Character visual */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.character-wrap {
    position: relative; width: 400px; height: 500px;
    display: flex; justify-content: center; align-items: center;
}
.char-img {
    width: 320px; height: auto;
    border-radius: 0;
    position: relative; z-index: 3;
    filter: drop-shadow(0 20px 60px rgba(168, 85, 247, 0.45));
    animation: float-char 4s ease-in-out infinite;
    object-fit: contain;
    object-position: bottom;
}
@keyframes float-char {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.char-glow {
    position: absolute; bottom: 0; width: 260px; height: 200px; border-radius: 50%;
    background: var(--gradient); filter: blur(80px); opacity: 0.3;
    animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse { 0%, 100% { transform: scale(1); opacity: 0.25; } 50% { transform: scale(1.2); opacity: 0.15; } }

.char-ring {
    position: absolute; border: 1px solid rgba(168, 85, 247, 0.2); border-radius: 50%;
    animation: ring-expand 5s ease-out infinite;
}
.char-ring-1 { width: 250px; height: 250px; animation-delay: 0s; }
.char-ring-2 { width: 340px; height: 340px; animation-delay: 1s; }
.char-ring-3 { width: 420px; height: 420px; animation-delay: 2s; }
@keyframes ring-expand {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 0; }
}

.char-shield {
    position: absolute; top: 30%; right: 5%;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 14px;
    color: var(--primary);
    z-index: 4;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
    animation: float-char 4s ease-in-out infinite reverse;
}
.char-shield svg { width: 28px; height: 28px; }

.floating-tag {
    position: absolute; padding: 8px 14px;
    background: var(--bg-2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 100px;
    font-size: 12px; font-weight: 600;
    color: var(--primary);
    display: flex; align-items: center; gap: 6px;
    z-index: 4;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.tag-1 { top: 15%; left: -5%; animation: float-tag 5s ease-in-out infinite; }
.tag-2 { bottom: 20%; left: -10%; animation: float-tag 5s ease-in-out infinite 1s; }
.tag-3 { bottom: 35%; right: -5%; animation: float-tag 5s ease-in-out infinite 2s; }
@keyframes float-tag {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 28px; border-radius: 10px; font-size: 15px;
    font-weight: 600; text-decoration: none; border: none; cursor: pointer;
    transition: all 0.25s ease; position: relative; overflow: hidden;
    font-family: inherit;
}
.btn-primary {
    background: var(--gradient); color: #020617;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(168, 85, 247, 0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-accent {
    background: var(--gradient-accent); color: #020617;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5); }

.btn-outline {
    background: transparent; color: var(--text);
    border: 1.5px solid var(--glass-border-h);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(168, 85, 247, 0.08); color: var(--primary); }

.btn-ghost {
    background: transparent; color: var(--text-2);
    border: 1.5px solid var(--glass-border);
}
.btn-ghost:hover { border-color: var(--glass-border-h); color: var(--text); background: var(--bg-card); }

.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* --- Sections --- */
.section { padding: clamp(80px, 12vw, 120px) 0; position: relative; }
.section-head { text-align: center; margin-bottom: 60px; }
.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px; border-radius: 100px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    font-size: 12px; font-weight: 600; color: var(--primary);
    letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
}
.label-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }

.section-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px;
    line-height: 1.15;
}
.section-desc { font-size: 17px; color: var(--text-2); max-width: 580px; margin: 0 auto; }

/* --- Features --- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.f-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); padding: 30px 26px;
    transition: all 0.35s ease; position: relative;
    backdrop-filter: blur(10px);
}
.f-card::before {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), transparent 60%);
    opacity: 0; transition: opacity 0.35s ease;
}
.f-card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-h);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.12);
}
.f-card:hover::before { opacity: 1; }
.f-icon {
    font-size: 32px; margin-bottom: 18px; position: relative; z-index: 1;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 14px;
}
.f-icon i.bi { font-size: 26px; color: var(--primary); }
.f-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1; }
.f-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; position: relative; z-index: 1; }

/* --- Pricing --- */
.pricing-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
    max-width: 1140px; margin: 0 auto;
}
.p-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); padding: 32px 24px;
    position: relative; transition: all 0.35s ease;
    display: flex; flex-direction: column;
    backdrop-filter: blur(10px);
}
.p-card:hover { transform: translateY(-5px); border-color: var(--glass-border-h); }

.p-card-pop {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.06);
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25), 0 20px 40px rgba(168, 85, 247, 0.1);
    transform: scale(1.03);
}
.p-card-pop:hover { transform: scale(1.03) translateY(-5px); }

.p-card-best {
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.04);
}
.p-card-best:hover { border-color: rgba(124, 58, 237, 0.6); }

.p-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    padding: 5px 16px; border-radius: 100px;
    background: var(--gradient); color: #020617; font-size: 12px; font-weight: 700;
    white-space: nowrap; box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5);
    letter-spacing: 0.3px;
    font-family: 'JetBrains Mono', monospace;
}
.p-badge-best { background: var(--gradient-accent); }

.p-name {
    font-size: 16px; font-weight: 700; color: var(--text);
    text-align: center; margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}
.p-price {
    display: flex; align-items: baseline; justify-content: center; gap: 4px;
    margin-bottom: 6px;
}
.p-val {
    font-size: 44px; font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.p-cur { font-size: 20px; color: var(--text-3); font-weight: 600; }
.p-period {
    text-align: center; font-size: 13px; color: var(--text-3);
    margin-bottom: 24px; padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.p-save {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--success); font-size: 11px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.p-list { list-style: none; margin-bottom: 24px; flex: 1; }
.p-list li {
    padding: 8px 0; font-size: 13px; color: var(--text-2);
    display: flex; align-items: center; gap: 10px;
}
.check { color: var(--primary); font-weight: 700; font-size: 14px; }

/* --- Apps --- */
.apps-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.a-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 26px 18px; text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.a-card:hover { transform: translateY(-4px); border-color: var(--glass-border-h); }
.a-icon { display: flex; justify-content: center; margin-bottom: 12px; }
.a-icon img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.a-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.a-card p { font-size: 11px; color: var(--text-3); }

/* --- FAQ --- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.faq-item:hover { border-color: var(--glass-border-h); }
.faq-item.active { border-color: var(--primary); background: rgba(168, 85, 247, 0.04); }
.faq-q {
    width: 100%; padding: 20px 24px; display: flex; justify-content: space-between;
    align-items: center; background: none; border: none; color: var(--text);
    font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; gap: 16px;
}
.faq-chevron { color: var(--primary); transition: transform 0.3s ease; flex-shrink: 0; font-size: 18px; }
.faq-item.active .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.active .faq-a { max-height: 200px; }
.faq-a p { padding: 0 24px 20px; font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* --- Footer --- */
.footer {
    background: var(--bg-2);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
    margin-bottom: 40px;
}
.footer-brand p { color: var(--text-3); font-size: 14px; margin-top: 16px; max-width: 360px; }
.footer-col h4 {
    font-size: 13px; font-weight: 700; color: var(--text);
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 18px;
    font-family: 'JetBrains Mono', monospace;
}
.footer-col a {
    display: block; color: var(--text-2); text-decoration: none;
    font-size: 14px; font-weight: 500; padding: 6px 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--glass-border); }
.footer-bottom p { color: var(--text-3); font-size: 13px; }

/* --- Modal --- */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; }
.modal .modal-overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-content {
    position: relative;
    background: var(--modal-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); padding: 36px;
    max-width: 440px; width: 100%;
    animation: modal-in 0.35s ease;
    max-height: 90vh; overflow-y: auto;
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.92) translateY(16px); } to { opacity: 1; transform: none; } }
.modal-close {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { border-color: var(--glass-border-h); color: var(--primary); }
.modal-head { text-align: center; margin-bottom: 28px; }
.modal-logo { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px; }
.modal-head h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal-plan-info { color: var(--text-2); font-size: 15px; }
.modal-plan-info strong { color: var(--primary); }

.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.form-group input {
    width: 100%; padding: 14px 18px; background: var(--input-bg);
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 15px; transition: all 0.25s; font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15); }
.form-group input::placeholder { color: var(--text-3); }
.form-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }

.email-exists-warn {
    display: flex; gap: 12px; padding: 16px;
    background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-sm); margin-bottom: 18px;
    animation: modal-in 0.25s ease;
}
.email-exists-warn .warn-icon { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.email-exists-warn .warn-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.email-exists-warn .warn-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.email-exists-warn .warn-text strong { color: var(--primary); }
.email-exists-warn .warn-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.warn-btn {
    padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 700;
    font-family: inherit; cursor: pointer; border: none; transition: all 0.2s;
}
.warn-btn-primary { background: var(--primary); color: #020617; }
.warn-btn-primary:hover { opacity: 0.85; }
.warn-btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--glass-border); }
.warn-btn-ghost:hover { border-color: var(--glass-border-h); color: var(--text); }
.warn-reset-ok {
    display: flex; align-items: center; gap: 6px; margin-top: 10px;
    font-size: 13px; font-weight: 600; color: var(--success);
}

.pay-secure {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 18px; color: var(--text-3); font-size: 12px;
}

.spinner { width: 20px; height: 20px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Account Popup --- */
.nav-account-wrap { position: relative; }
.nav-account-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px 6px 6px; border-radius: 10px;
    border: 1.5px solid var(--glass-border-h);
    background: transparent; color: var(--text); font-weight: 600; font-size: 14px;
    cursor: pointer; transition: all 0.25s;
}
.nav-account-btn:hover { background: rgba(168, 85, 247, 0.08); border-color: var(--primary); }
.nav-account-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--gradient); color: #020617; font-weight: 700; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.nav-account-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-popup-overlay { display: none; position: fixed; inset: 0; z-index: 299; }
.account-popup-overlay.active { display: block; }

.account-popup {
    display: none; position: fixed; z-index: 300; width: 320px;
    background: var(--bg-2);
    border: 1px solid var(--glass-border-h);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px); overflow: hidden;
    animation: popupIn 0.2s ease;
}
.account-popup.active { display: block; }
@keyframes popupIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.account-popup-header {
    padding: 16px 20px; border-bottom: 1px solid var(--glass-border);
    background: rgba(168, 85, 247, 0.04);
}
.account-popup-user { display: flex; align-items: center; gap: 12px; }
.account-popup-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gradient); color: #020617; font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-popup-login { font-weight: 700; font-size: 15px; color: var(--text); }
.account-popup-email { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.account-popup-body { padding: 12px 20px; }
.account-popup-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.account-popup-row:last-of-type { border-bottom: none; }
.account-popup-label { font-size: 13px; color: var(--text-2); }
.account-popup-value { font-size: 14px; font-weight: 600; color: var(--text); }
.account-popup-balance { color: var(--primary); }
.account-popup-topup { padding-top: 8px; }
.account-popup-topup-row { display: flex; gap: 8px; }
.account-popup-topup-input {
    flex: 1; padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--input-bg);
    color: var(--text); font-size: 14px; outline: none;
}
.account-popup-topup-input:focus { border-color: var(--primary); }
.account-popup-topup-input::placeholder { color: var(--text-3); }
.account-popup-topup-btn {
    padding: 8px 16px; border-radius: 8px; border: none;
    background: var(--gradient); color: #020617; font-weight: 600; font-size: 13px;
    cursor: pointer; transition: opacity 0.2s; white-space: nowrap;
}
.account-popup-topup-btn:hover { opacity: 0.85; }
.account-popup-topup-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.account-popup-footer {
    padding: 8px 20px 12px; border-top: 1px solid var(--glass-border);
    display: flex; justify-content: space-between;
}
.account-popup-action {
    padding: 8px 0; font-size: 13px; color: var(--text-2); text-decoration: none;
    background: none; border: none; cursor: pointer; transition: color 0.2s;
}
.account-popup-action:hover { color: var(--text); }
.account-popup-logout { color: var(--error); }
.account-popup-logout:hover { color: #ff6b6b; }

/* --- Pricing needs topup (btn adjust) --- */
.pricing-action-btn.pricing-needs-topup {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(192, 132, 252, 0.08)) !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
    color: var(--primary) !important;
    font-weight: 600;
}

/* --- Sponsor block --- */
.sp-block { margin-bottom: 14px; cursor: pointer; }
.sp-block-shell { cursor: pointer; }
.sp-block-shell {
    display: flex; align-items: flex-start; gap: 6px;
    padding: 10px 10px 10px 12px;
    border-radius: 12px;
    border: 1.5px solid rgba(168, 85, 247, 0.22);
    background: rgba(168, 85, 247, 0.05);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sp-block-shell:hover {
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.1);
}
.sp-block.sp-on .sp-block-shell {
    border-color: rgba(168, 85, 247, 0.75);
    background: rgba(168, 85, 247, 0.14);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}
.sp-block-inner {
    flex: 1; min-width: 0;
    display: block; cursor: pointer;
    user-select: none;
}
.sp-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sp-crown { flex-shrink: 0; line-height: 0; width: 18px; height: 18px; }
.sp-title { font-size: 12px; font-weight: 700; color: var(--text); flex: 1; }
.sp-sw {
    width: 36px; height: 20px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12); position: relative;
    display: inline-block; transition: background 0.22s;
}
.sp-sw::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.65); transition: transform 0.22s ease, background 0.22s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.sp-block.sp-on .sp-sw { background: linear-gradient(135deg, #a855f7, #c084fc); }
.sp-block.sp-on .sp-sw::after { transform: translateX(16px); background: #fff; }

.sp-sub { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 22px; }
.sp-gift {
    font-size: 12px; font-weight: 600; padding: 2px 8px;
    border-radius: 20px; background: rgba(168, 85, 247, 0.15); color: #c084fc;
}
.sp-price {
    font-size: 12px; font-weight: 800; margin-left: auto;
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; white-space: nowrap;
}
.sp-info-btn {
    width: 22px; height: 22px; border-radius: 50%; border: none;
    background: rgba(168, 85, 247, 0.15); color: #a855f7;
    font-size: 11px; font-weight: 800; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.2s; line-height: 1;
    position: relative; z-index: 2;
    margin-top: 1px;
}
.sp-info-btn:hover { background: rgba(168, 85, 247, 0.35); }

/* Sponsor info modal */
.sponsor-info-list {
    list-style: none; display: flex; flex-direction: column; gap: 12px;
}
.sponsor-info-list li { display: flex; align-items: flex-start; gap: 12px; }
.sponsor-info-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.sponsor-info-list li div { display: flex; flex-direction: column; gap: 2px; }
.sponsor-info-list strong { font-size: 14px; font-weight: 700; color: var(--text); }
.sponsor-info-list span { font-size: 12px; color: var(--text-3); }

/* Sponsor icon */
.sp-icon {
    width: 18px; height: 18px;
    min-width: 18px; min-height: 18px;
    max-width: 18px; max-height: 18px;
    display: inline-block; vertical-align: middle;
    object-fit: contain; flex-shrink: 0;
    position: relative; top: -1px;
}
.sp-icon--lg {
    width: 32px; height: 32px;
    min-width: 32px; min-height: 32px;
    max-width: 32px; max-height: 32px;
    top: 0;
}

.modal-sponsor-badge {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 6px; padding: 4px 12px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px; font-size: 13px;
    font-weight: 600; color: #c084fc;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .apps-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 700px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .hero-layout { grid-template-columns: 1fr; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-metrics { justify-content: center; }
    .hero-visual { order: -1; margin-bottom: 20px; }
    .character-wrap { width: 300px; height: 400px; }
    .char-img { width: 260px; }
    .char-ring-1 { width: 200px; height: 200px; }
    .char-ring-2 { width: 280px; height: 280px; }
    .char-ring-3 { width: 360px; height: 360px; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
    .p-card-pop { transform: none; }
    .p-card-pop:hover { transform: translateY(-5px); }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
    .nav {
        position: fixed; top: 0; right: 0; width: 280px; height: 100vh;
        background: var(--bg-2); border-left: 1px solid var(--glass-border);
        flex-direction: column; align-items: flex-start; padding: 80px 28px 40px;
        gap: 0; transform: translateX(100%); transition: transform 0.35s ease;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2); z-index: 205;
    }
    .nav.open { transform: translateX(0); }
    .nav-link, .nav-login, .nav-account-btn {
        font-size: 16px; width: 100%; padding: 14px 0;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-link::after { display: none; }
    .nav-login, .nav-account-btn { border: none !important; padding: 14px 0; text-align: left; }

    .nav-actions {
        flex-direction: column; width: 100%; gap: 12px; margin-top: 16px;
        padding-top: 16px; border-top: 1px solid var(--glass-border);
    }
    .nav-login, .nav-account-btn {
        width: 100%; justify-content: center; text-align: center;
        box-sizing: border-box; padding: 12px 18px !important;
    }
    .theme-toggle { align-self: center; }
    .burger { display: flex; }
    .hero { padding-top: 90px; min-height: auto; }
    .features-grid { grid-template-columns: 1fr; }
    .apps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding-top: 80px; padding-bottom: 40px; }
    .hero-title { font-size: clamp(32px, 8vw, 40px); }
    .hero-desc { font-size: 15px; }
    .hero-metrics { gap: 12px; }
    .metric { padding: 0 12px; }
    .metric-val { font-size: 24px; }
    .metric-sep { height: 28px; }
    .character-wrap { width: 260px; height: 340px; }
    .char-img { width: 200px; }
    .char-ring-1 { width: 170px; height: 170px; }
    .char-ring-2 { width: 240px; height: 240px; }
    .char-ring-3 { width: 310px; height: 310px; }
    .f-card { padding: 24px 20px; }
    .f-icon { width: 48px; height: 48px; }
    .f-icon i.bi { font-size: 22px; }
    .f-card h3 { font-size: 16px; }
    .p-val { font-size: 38px; }
    .apps-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .a-card { padding: 20px 14px; }
    .a-icon img { width: 38px; height: 38px; }
    .a-card h3 { font-size: 13px; }
    .section-title { font-size: clamp(24px, 6vw, 32px); }
    .section-desc { font-size: 15px; }
    .modal-content { padding: 28px 20px; }
    .btn-lg { padding: 14px 28px; font-size: 15px; }
    .floating-tag { font-size: 11px; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.1s !important;
    }
    .grid-bg { display: none; }
}

@media print {
    .grid-bg, .header, .modal { display: none; }
    body { background: #fff; color: #000; }
}
