:root {
    --bg: #f4f7fb;
    --bg-accent: #e9eefb;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --surface-dark: rgba(10, 18, 33, 0.84);
    --border-soft: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.3);
    --text-main: #0f172a;
    --text-muted: #475569;
    --brand-1: #2563eb;
    --brand-2: #7c3aed;
    --brand-3: #06b6d4;
    --success: #059669;
    --warning: #d97706;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.18);
    --radius-xl: 24px;
    --radius-lg: 18px;
}

body.app-theme-body,
body.landing-theme-body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.16), transparent 28%),
        linear-gradient(180deg, #eef4ff 0%, #f8fafc 28%, #f8fafc 100%);
    color: var(--text-main);
}

.soft-grid {
    position: relative;
}

.soft-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(255,255,255,0.85), transparent 90%);
    pointer-events: none;
}

.glass-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.82));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-shell {
    background: transparent;
}

.sidebar-panel {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92)),
        radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 40%);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.03);
}

.surface-panel,
.modal-surface,
.hero-trial-shell,
.landing-panel,
.pricing-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.surface-panel {
    border-radius: var(--radius-xl);
}

.modal-surface {
    border-radius: 28px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-strong);
}

.welcome-shell {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.88), rgba(248,250,252,0.74)),
        linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.1));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow-soft);
}

.welcome-shell::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    top: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(59,130,246,0.18), transparent 70%);
    pointer-events: none;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-1);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.quick-prompts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.quick-prompt-card {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148,163,184,0.14);
    color: var(--text-muted);
    font-size: 0.92rem;
    text-align: left;
}

.feature-pills,
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.feature-pills {
    justify-content: center;
    margin-top: 1.25rem;
}

.feature-pill,
.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    line-height: 1.2;
}

.feature-pill {
    background: rgba(255,255,255,0.78);
    color: var(--text-muted);
}

.suggestion-chip {
    background: rgba(255,255,255,0.92);
    color: var(--text-main);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.suggestion-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.input-helper-copy {
    margin-top: 0.8rem;
    padding: 0 0.3rem;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

.modern-input-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.modern-input-shell:focus-within {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.16);
}

.message-surface {
    border: 1px solid rgba(148,163,184,0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.chat-bubble-user.message-surface {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.chat-bubble-assistant.message-surface {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.96));
}

.sidebar-cta,
.btn-gradient,
.btn-dark,
.btn-light {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}

.sidebar-cta:hover,
.btn-gradient:hover,
.btn-dark:hover,
.btn-light:hover {
    transform: translateY(-1px);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.28);
}

.btn-dark {
    background: linear-gradient(135deg, #111827, #1f2937);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.18);
}

.btn-light {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.2);
}

.info-strip {
    background: linear-gradient(90deg, rgba(37,99,235,0.08), rgba(124,58,237,0.08));
    border: 1px solid rgba(59,130,246,0.12);
    border-radius: 18px;
}

.trial-banner {
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.08));
    border: 1px solid rgba(37,99,235,0.14);
    border-radius: 18px;
}

.section-shell {
    position: relative;
}

.landing-nav-shell {
    background: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.landing-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(96,165,250,0.28), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(167,139,250,0.26), transparent 26%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #111827 100%);
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(255,255,255,0.65), transparent 95%);
}

.hero-trial-shell {
    position: relative;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
}

.landing-card,
.stat-tile,
.compare-card,
.pricing-card {
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow-soft);
    border-radius: 24px;
}

.pricing-card-featured {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(239,246,255,0.96));
    border-color: rgba(59,130,246,0.28);
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.18);
}

.section-muted {
    background: linear-gradient(180deg, rgba(241,245,249,0.72), rgba(248,250,252,0.9));
}

.section-bright {
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(248,250,252,0.92));
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.92);
    font-size: 0.9rem;
}

.footer-shell {
    background: linear-gradient(180deg, #0f172a, #020617);
}

/* Trust badges in hero */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Scroll-triggered entrance animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children for card grids */
.fade-in-up:nth-child(2) { transition-delay: 0.08s; }
.fade-in-up:nth-child(3) { transition-delay: 0.16s; }
.fade-in-up:nth-child(4) { transition-delay: 0.24s; }
.fade-in-up:nth-child(5) { transition-delay: 0.32s; }

@media (max-width: 1023px) {
    .sidebar-panel {
        border-right: none;
        box-shadow: 0 20px 60px rgba(2, 6, 23, 0.55);
    }
}

@media (max-width: 640px) {
    .welcome-shell {
        padding: 1.35rem;
        border-radius: 24px;
    }

    .quick-prompts {
        grid-template-columns: 1fr;
    }

    .suggestion-chips {
        gap: 0.45rem;
    }

    .suggestion-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .hero-trial-shell,
    .modal-surface,
    .surface-panel,
    .landing-card,
    .pricing-card {
        border-radius: 22px;
    }

    /* Fix tiny pricing text on mobile */
    .pricing-card li {
        font-size: 0.9375rem;
    }
}
