/* ==========================================
   VidiCrafter Website – CapCut Style Design
   v3.0 · Clean & Modern Edition
   ========================================== */

/* --- Shared Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- CSS Variables (Light Theme) --- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-tertiary: #f0f1f5;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --color-primary: #0066FF;
    --color-primary-light: #2B7FFF;
    --color-primary-soft: #5599FF;
    --color-primary-glow: rgba(0, 102, 255, 0.1);
    --color-primary-bg: rgba(0, 102, 255, 0.06);
    --color-accent: #FF6154;
    --color-accent-light: #FF8A80;
    --color-cyan: #00C4CC;
    --color-green: #00C853;
    --color-purple: #7C3AED;

    --text-primary: #1a1a2e;
    --text-secondary: #5a5a72;
    --text-muted: #9a9ab0;

    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-card: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 102, 255, 0.2);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 100px;

    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --transition-fast: 0.2s ease;
    --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 16px 48px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* --- Dark Theme (Brand Spec) --- */
[data-theme="dark"] {
    --bg-primary: #0a1628;
    --bg-secondary: #0e1b30;
    --bg-tertiary: #151e33;
    --bg-card: #1e293b;
    --bg-card-hover: #243447;
    --bg-glass: rgba(10, 22, 40, 0.9);

    --color-primary: #00d9ff;
    --color-primary-light: #22d3ee;
    --color-primary-soft: #67e8f9;
    --color-primary-glow: rgba(0, 217, 255, 0.15);
    --color-primary-bg: rgba(0, 217, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-subtle: rgba(51, 65, 85, 0.6);
    --border-card: #334155;
    --border-hover: rgba(0, 217, 255, 0.35);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 16px 48px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mockup-window {
    border-color: #334155;
}

[data-theme="dark"] .nav.scrolled {
    background: rgba(10, 22, 40, 0.92);
    border-bottom-color: #334155;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mobile-menu {
    background: rgba(10, 22, 40, 0.98);
}

[data-theme="dark"] .nav-cta {
    background: #00d9ff;
    color: #0a1628;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.25);
}

[data-theme="dark"] .nav-cta:hover {
    background: #22d3ee;
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.35);
}

[data-theme="dark"] .btn-primary {
    background: #00d9ff;
    color: #0a1628;
    box-shadow: 0 4px 14px rgba(0, 217, 255, 0.25);
}

[data-theme="dark"] .btn-primary:hover {
    background: #22d3ee;
    box-shadow: 0 8px 28px rgba(0, 217, 255, 0.35);
}

[data-theme="dark"] .btn-ghost {
    background: rgba(30, 41, 59, 0.5);
    border-color: #334155;
    color: #ffffff;
}

[data-theme="dark"] .btn-ghost:hover {
    background: #1e293b;
    border-color: rgba(0, 217, 255, 0.3);
}

[data-theme="dark"] .text-gradient {
    background: linear-gradient(135deg, #00d9ff, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .section-tag {
    background: rgba(0, 217, 255, 0.08);
    border-color: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
}

[data-theme="dark"] .footer-links-group a:hover {
    color: #00d9ff;
}

[data-theme="dark"] .footer-social a:hover {
    color: #00d9ff;
}

[data-theme="dark"] .feature-tag,
[data-theme="dark"] .tech-tags span {
    background: rgba(30, 41, 59, 0.6);
    border-color: #334155;
}


[data-theme="dark"] .demo-section::before {
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

[data-theme="dark"] .demo-glow {
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 217, 255, 0.15), transparent 60%),
        radial-gradient(ellipse 60% 50% at 30% 50%, rgba(0, 196, 204, 0.1), transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 40%, rgba(124, 58, 237, 0.08), transparent 60%);
    opacity: 0.8;
}

[data-theme="dark"] .mockup-window {
    border-color: rgba(0, 217, 255, 0.12);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 24px 60px rgba(0, 0, 0, 0.25),
        0 50px 100px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(0, 217, 255, 0.06);
}

[data-theme="dark"] .platform-card:hover {
    box-shadow:
        var(--shadow-card-hover),
        0 0 30px rgba(0, 217, 255, 0.06);
}

[data-theme="dark"] .hero-bg::after {
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(0, 217, 255, 0.1), transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 30%, rgba(0, 196, 204, 0.08), transparent 60%),
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(124, 58, 237, 0.06), transparent 70%);
}

[data-theme="dark"] .hero-glow-1 {
    background: radial-gradient(ellipse, rgba(0, 217, 255, 0.15), rgba(124, 58, 237, 0.06) 50%, transparent 70%);
    opacity: 0.7;
    filter: blur(90px);
}

[data-theme="dark"] .feature-card:hover {
    box-shadow: var(--shadow-card-hover), 0 0 30px rgba(0, 217, 255, 0.05);
}

[data-theme="dark"] .feature-card::before {
    background: linear-gradient(90deg, transparent, #00d9ff, transparent);
}

[data-theme="dark"] .tech-num-suffix {
    color: #00d9ff;
}

[data-theme="dark"] .tech-layer-badge {
    background: rgba(0, 217, 255, 0.08);
    border-color: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
}

[data-theme="dark"] .cta-glow-1 {
    background: radial-gradient(circle, rgba(0, 217, 255, 0.06), transparent 70%);
}

[data-theme="dark"] .cta-glow-2 {
    background: radial-gradient(circle, rgba(0, 217, 255, 0.03), transparent 70%);
}

[data-theme="dark"] .mobile-link.cta {
    background: #00d9ff;
    color: #0a1628;
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-card);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 0;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================
   NAVIGATION
   ================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
    letter-spacing: 0.01em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    transition: var(--transition-med);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 20px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.03em;
}

.lang-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.nav-cta {
    padding: 8px 24px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-pill);
    font-size: 0.84rem;
    font-weight: 600;
    transition: var(--transition-med);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

.nav-cta:hover {
    background: var(--color-primary-light);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
    border-radius: 1px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    flex-direction: column;
    gap: 4px;
    z-index: 999;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.mobile-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mobile-link.cta {
    background: var(--color-primary);
    color: white;
    text-align: center;
    font-weight: 600;
    margin-top: 8px;
    border-radius: var(--radius-pill);
    padding: 12px 24px;
    font-size: 0.9rem;
}

.mobile-toggles {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
    padding: 16px 16px 8px;
    border-top: 1px solid var(--border-subtle);
}

.mobile-theme-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.mobile-theme-toggle:hover {
    border-color: var(--border-hover);
    background: var(--bg-tertiary, var(--bg-secondary));
}

.mobile-theme-toggle .toggle-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-lang-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-lang-toggle:hover {
    border-color: var(--border-hover);
    background: var(--bg-tertiary, var(--bg-secondary));
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 140px 24px 60px;
    background: var(--bg-primary);
}

.hero .demo-perspective {
    position: relative;
    z-index: 1;
    margin-bottom: 48px;
    width: 100%;
    max-width: 1100px;
    perspective: none;
    padding-bottom: 0;
}

.hero .demo-perspective .mockup-window {
    transform: none;
    animation: none;
}

.hero .demo-perspective:hover .mockup-window {
    transform: none;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-play-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.video-play-btn:hover svg circle {
    fill: rgba(0, 0, 0, 0.6);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Dramatic gradient background with animated mesh */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(0, 102, 255, 0.08), transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 30%, rgba(0, 196, 204, 0.06), transparent 60%),
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(124, 58, 237, 0.04), transparent 70%);
    animation: heroMeshDrift 12s ease-in-out infinite alternate;
}

@keyframes heroMeshDrift {
    0% { opacity: 0.7; transform: scale(1) rotate(0deg); }
    100% { opacity: 1; transform: scale(1.05) rotate(1deg); }
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
}

.hero-glow-1 {
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(0, 102, 255, 0.15), rgba(124, 58, 237, 0.05) 50%, transparent 70%);
    top: -80px;
    left: calc(50% - 400px);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 780px;
}

.hero-badge {
    display: none;
}

.hero-badge-dot {
    display: none;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.2rem, 7vw, 5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-title-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-med);
    border: none;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 102, 255, 0.35);
}

.btn-ghost {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.05rem;
}

/* --- Entry Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.15s; }
.animate-in:nth-child(2) { animation-delay: 0.3s; }
.animate-in:nth-child(3) { animation-delay: 0.45s; }
.animate-in:nth-child(4) { animation-delay: 0.6s; }
.animate-in:nth-child(5) { animation-delay: 0.75s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   TEXT GRADIENT
   ================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   SECTION HEADERS
   ================================ */
.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--color-primary-bg);
    border: 1px solid rgba(0, 102, 255, 0.1);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    line-height: 1.15;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ================================
   FEATURES (Tab Showcase)
   ================================ */
.features {
    padding: 120px 0;
    position: relative;
    background: var(--bg-secondary);
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.features-showcase {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    align-items: start;
}

.features-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-tab {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-med);
    position: relative;
}

.feature-tab:hover {
    background: var(--bg-card);
}

.feature-tab.active {
    background: var(--bg-card);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
}

.feature-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    background: var(--color-primary);
    border-radius: 0 3px 3px 0;
}

.feature-tab-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.feature-tab-content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feature-tab-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    display: none;
}

.feature-tab.active .feature-tab-content p {
    display: block;
}

.feature-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.03em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.feature-tab:not(.active) .feature-tag {
    display: none;
}

.features-preview {
    position: sticky;
    top: 100px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 400px;
}

.feature-preview-img {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.4s ease;
}

.feature-preview-img.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--bg-card);
    border: 2px dashed var(--border-card);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
    gap: 12px;
}

.preview-placeholder span {
    font-size: 3rem;
}

.preview-placeholder p {
    font-size: 0.9rem;
    font-weight: 500;
}

.features-cta {
    text-align: center;
    margin-top: 48px;
}

/* ================================
   STATS BAR
   ================================ */
.stats-bar {
    padding: 60px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 24px 16px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}


/* ================================
   TECH ARCHITECTURE
   ================================ */
.tech {
    padding: 120px 0;
    position: relative;
    background: var(--bg-primary);
}

.tech::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.tech-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 48px;
}

.tech-split.reverse {
    direction: rtl;
}

.tech-split.reverse > * {
    direction: ltr;
}

.tech-split-text h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tech-split-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.tech-layer-badge {
    display: inline-block;
    padding: 3px 12px;
    background: var(--color-primary-bg);
    border: 1px solid rgba(0, 102, 255, 0.1);
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.badge-rust {
    background: rgba(255, 120, 50, 0.08);
    border-color: rgba(255, 120, 50, 0.12);
    color: #E65100;
}

.badge-ai {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.12);
    color: #7C3AED;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    padding: 3px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.02em;
}

/* ================================
   PLATFORMS (3 Large Cards)
   ================================ */
.platforms {
    padding: 120px 0;
    background: var(--bg-secondary);
    position: relative;
}

.platforms::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.platform-card {
    padding: 40px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-med);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.platform-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        var(--shadow-card-hover),
        0 0 30px rgba(0, 102, 255, 0.05);
    border-color: var(--border-hover);
}

.platform-card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.platform-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.platform-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.platform-card .btn-sm {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.platform-highlights {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

.platform-highlight {
    text-align: center;
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-highlight span {
    font-size: 1.5rem;
}

.platform-highlight p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ================================
   TESTIMONIALS (Horizontal Scroll)
   ================================ */
.testimonials {
    padding: 120px 0 80px;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.testimonials-track-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

.testimonials-track {
    display: flex;
    gap: 24px;
    animation: scrollTestimonials 30s linear infinite;
    width: max-content;
    padding: 0 24px;
}

.testimonials-track:hover {
    animation-play-state: paused;
}

@keyframes scrollTestimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.testimonial-card {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    transition: var(--transition-med);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    min-width: 340px;
    max-width: 380px;
    flex-shrink: 0;
}

.testimonial-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
}

.testimonial-stars {
    color: #FBBF24;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.testimonial-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.75;
    flex: 1;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.testimonial-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.avatar-1 { background: linear-gradient(135deg, #0066FF, #2B7FFF); }
.avatar-2 { background: linear-gradient(135deg, #7C3AED, #EC4899); }
.avatar-3 { background: linear-gradient(135deg, #FF9800, #FF5722); }

.testimonial-info h4 {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.testimonial-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ================================
   CTA / DOWNLOAD
   ================================ */
.cta {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.cta-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.06), transparent 70%);
    top: -150px;
    left: -80px;
}

.cta-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 196, 204, 0.04), transparent 70%);
    bottom: -150px;
    right: -80px;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 18px;
}

.cta-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cta-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.hero-trust {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    padding: 60px 0 36px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-logo-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 50%;
}

.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-group h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.footer-links-group a {
    font-size: 0.84rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-links-group a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 28px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 18px;
}

.footer-social a {
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: flex;
}

.footer-social a:hover {
    color: var(--color-primary);
}

/* ================================
   DEMO SECTION
   ================================ */
.demo-section {
    position: relative;
    padding: 0 24px 120px;
    margin-top: -20px;
    overflow: visible;
    background: var(--bg-primary);
}

/* Subtle dot pattern */
.demo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

/* Dramatic ambient glow behind mockup */
.demo-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 102, 255, 0.12), transparent 60%),
        radial-gradient(ellipse 60% 50% at 30% 50%, rgba(0, 196, 204, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 40%, rgba(124, 58, 237, 0.06), transparent 60%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    animation: demoGlowPulse 8s ease-in-out infinite alternate;
}

@keyframes demoGlowPulse {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* Perspective Wrapper */
.demo-perspective {
    position: relative;
    z-index: 1;
    max-width: 1020px;
    margin: 0 auto;
    perspective: 1200px;
    padding-bottom: 80px;
}

/* Deep layered shadow below mockup */
.demo-perspective::before {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 100px;
    background: radial-gradient(ellipse, rgba(0, 102, 255, 0.12), rgba(0, 0, 0, 0.06) 40%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.demo-perspective::after {
    display: none;
}

.demo-perspective .mockup-window {
    transform: rotateX(8deg) rotateY(0deg);
    transform-origin: center bottom;
    animation: mockupFloat 8s ease-in-out infinite;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s ease;
    position: relative;
    z-index: 2;
}

.demo-perspective:hover .mockup-window {
    transform: rotateX(2deg) rotateY(0deg) translateY(-12px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 40px 100px rgba(0, 0, 0, 0.08),
        0 0 60px rgba(0, 102, 255, 0.06);
}

@keyframes mockupFloat {
    0%, 100% {
        transform: rotateX(8deg) translateY(0);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.06),
            0 16px 40px rgba(0, 0, 0, 0.1),
            0 30px 80px rgba(0, 0, 0, 0.08);
    }
    50% {
        transform: rotateX(5deg) translateY(-10px);
        box-shadow:
            0 8px 20px rgba(0, 0, 0, 0.08),
            0 24px 60px rgba(0, 0, 0, 0.12),
            0 50px 120px rgba(0, 0, 0, 0.1),
            0 0 40px rgba(0, 102, 255, 0.04);
    }
}

/* ================================
   MOCKUP WINDOW
   ================================ */
.hero-mockup {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    margin-top: -20px;
}

.mockup-window {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 24px 60px rgba(0, 0, 0, 0.14),
        0 50px 100px rgba(0, 0, 0, 0.1);
}

/* Glass reflection highlight — sweeping shine */
.mockup-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 5;
    animation: glassShine 6s ease-in-out infinite;
}

@keyframes glassShine {
    0%, 100% { transform: translateX(-30%); }
    50% { transform: translateX(30%); }
}

/* Top edge light reflection */
.mockup-window::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    z-index: 6;
    pointer-events: none;
}

/* ================================
   RESPONSIVE
   ================================ */

/* --- Global overflow protection --- */
html, body {
    overflow-x: hidden;
}

/* ---- Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
    .features-showcase {
        grid-template-columns: 1fr;
    }

    .features-preview {
        position: static;
        min-height: 280px;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tech-split.reverse {
        direction: ltr;
    }

    .features,
    .tech,
    .platforms,
    .testimonials,
    .cta {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .demo-perspective {
        max-width: 100%;
    }

    .hero-glow-1 {
        width: 600px;
        left: calc(50% - 300px);
    }
}

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {
    /* Nav */
    .nav-links {
        display: none;
    }

    .nav-right {
        display: flex;
        gap: 10px;
    }

    .nav-right .nav-cta {
        display: none;
    }

    .nav-right .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .nav-right .lang-toggle {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .mobile-toggles {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-content {
        padding: 0 16px;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 0.88rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 0.92rem;
    }

    /* Demo / Mockup */
    .demo-section {
        padding: 0 16px 60px;
    }

    .demo-perspective {
        max-width: 100%;
        perspective: 800px;
        padding-bottom: 40px;
    }

    .demo-perspective .mockup-window {
        transform: rotateX(4deg);
    }

    /* Inside hero: no perspective, centered flat */
    .hero .demo-perspective {
        perspective: none;
        padding-bottom: 0;
        margin: 0 auto 32px;
    }

    .hero .demo-perspective .mockup-window {
        transform: none;
    }

    .demo-glow {
        width: 100%;
        height: 300px;
    }

    .hero-mockup {
        padding: 0 8px;
    }

    /* Features */
    .features-showcase {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .features-preview {
        position: static;
        min-height: 220px;
    }

    .feature-tab {
        padding: 14px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-suffix {
        font-size: 1.1rem;
    }

    .stat-item {
        padding: 16px 8px;
    }

    /* Tech */
    .tech-split {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tech-split.reverse {
        direction: ltr;
    }

    /* Platforms */
    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .platform-card {
        padding: 28px 20px;
    }

    .platform-highlights {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    /* Testimonials */
    .testimonials {
        padding: 60px 0;
    }

    .testimonial-card {
        min-width: 280px;
        max-width: 320px;
        padding: 24px 20px;
    }

    /* CTA */
    .cta {
        padding: 60px 0;
    }

    .cta-meta {
        flex-direction: column;
        gap: 8px;
    }

    /* Sections padding */
    .features,
    .tech,
    .platforms {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-desc {
        font-size: 0.95rem;
        padding: 0 16px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer {
        padding: 40px 0 28px;
    }

    /* Container padding */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ---- Small mobile (≤ 480px) ---- */
@media (max-width: 480px) {
    /* Hero */
    .hero-title {
        font-size: 1.65rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-actions .btn {
        width: auto;
        padding: 10px 24px;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 0.88rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-suffix {
        font-size: 0.9rem;
    }

    /* Demo */
    .demo-perspective .mockup-window {
        transform: none;
        animation: none;
    }

    .demo-perspective:hover .mockup-window {
        transform: none;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* CTA */
    .cta-title {
        font-size: 1.6rem;
    }

    .cta-desc {
        font-size: 0.92rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Testimonials */
    .testimonial-card {
        min-width: 260px;
        max-width: 290px;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem;
    }
}

/* ============ Coming Soon Modal ============ */
.cs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.cs-modal-overlay.active {
    opacity: 1;
}

.cs-modal {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 48px 40px 36px;
    text-align: center;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 16px 56px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.cs-modal-overlay.active .cs-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.cs-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.cs-modal-close:hover {
    background: var(--border-card);
    color: var(--text-primary);
}

.cs-modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: csFloat 3s ease-in-out infinite;
}

@keyframes csFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.cs-modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cs-modal-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.cs-modal-desc strong {
    color: var(--color-primary);
    font-weight: 700;
    -webkit-text-fill-color: var(--color-primary);
}

.cs-modal-notify {
    margin-bottom: 20px;
}

.cs-modal-input-wrap {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 4px;
    transition: border-color 0.3s ease;
}

.cs-modal-input-wrap:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.08);
}

.cs-modal-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-body);
    min-width: 0;
}

.cs-modal-input::placeholder {
    color: var(--text-muted);
}

.cs-modal-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), #4f46e5);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    white-space: nowrap;
}

.cs-modal-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.cs-modal-btn:disabled {
    cursor: default;
}

.cs-modal-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.cs-modal-meta span {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.cs-modal-dot {
    color: var(--border-card) !important;
}

@keyframes csShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Dark mode enhancements for modal */
[data-theme="dark"] .cs-modal {
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        0 16px 56px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(0, 102, 255, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

[data-theme="dark"] .cs-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}

/* Responsive modal */
@media (max-width: 480px) {
    .cs-modal {
        padding: 36px 24px 28px;
        border-radius: 16px;
    }

    .cs-modal-icon {
        font-size: 2.5rem;
    }

    .cs-modal-title {
        font-size: 1.35rem;
    }

    .cs-modal-input-wrap {
        flex-direction: column;
    }

    .cs-modal-btn {
        width: 100%;
    }
}