:root {
    --bg-light: #0f0f1a;
    --bg-alt: #1a1a2e;
    --bg-card: rgba(20, 20, 40, 0.6);
    --cyan: #00d4ff;
    --purple: #b829dd;
    --pink: #ff2e7d;
    --gold: #ffd700;
    --green: #00e676;
    --orange: #ff9800;
    --red: #ff4444;
    --glass-bg: rgba(20, 20, 40, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f5;
    --text-muted: #8892a0;
    --text-dim: #5a6270;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-purple: 0 0 20px rgba(184, 41, 221, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* --- Grain Overlay --- */
.grain-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9998; opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Particles Canvas --- */
#particles-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
}

/* --- Animated Background --- */
.background-blobs {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2; overflow: hidden; filter: blur(120px);
}
.blob {
    position: absolute; border-radius: 50%; opacity: 0.1;
    animation: float 20s infinite ease-in-out alternate;
}
.blob.cyan { width: 600px; height: 600px; background: var(--cyan); top: -15%; right: -10%; animation-duration: 25s; }
.blob.purple { width: 700px; height: 700px; background: var(--purple); bottom: -25%; left: -15%; animation-delay: -5s; animation-duration: 30s; }
.blob.pink { width: 500px; height: 500px; background: var(--pink); top: 40%; left: 60%; animation-delay: -10s; animation-duration: 22s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(100px, 80px) scale(1.15) rotate(5deg); }
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Toast Notifications --- */
#toast-container {
    position: fixed; top: 80px; right: 20px;
    z-index: 10001; display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    padding: 1rem 1.2rem; min-width: 280px; max-width: 380px;
    box-shadow: var(--shadow); pointer-events: auto;
    display: flex; align-items: center; gap: 12px;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: top right;
}
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 1.2rem; }
.toast-success .toast-icon { color: var(--green); }
.toast-error .toast-icon { color: var(--red); }
.toast-info .toast-icon { color: var(--cyan); }
.toast-warning .toast-icon { color: var(--orange); }
.toast-content { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.toast-msg { font-size: 0.8rem; color: var(--text-muted); }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* --- Navigation --- */
.main-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem 2rem; background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s;
}
.main-nav.scrolled { background: rgba(15, 15, 26, 0.95); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-eq { height: 24px; }
.nav-eq span { width: 3px; }
.nav-logo-text { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 2rem; }
.nav-link {
    color: var(--text-muted); text-decoration: none; font-weight: 500;
    font-size: 0.9rem; transition: all 0.2s; position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--cyan); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
    height: 2px; background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 1px;
}
.nav-actions { display: flex; align-items: center; gap: 0.8rem; }
.nav-icon-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    color: var(--text-muted); width: 36px; height: 36px; border-radius: 8px;
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.nav-icon-btn:hover { background: rgba(0,212,255,0.1); border-color: var(--cyan); color: var(--cyan); }
.nav-mobile-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.2rem; cursor: pointer; }

/* Mobile Menu */
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: var(--bg-alt); z-index: 10002; padding: 4rem 2rem;
    display: flex; flex-direction: column; gap: 1.5rem;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 1px solid var(--glass-border);
}
.mobile-menu.open { right: 0; }
.mobile-menu-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer;
}
.mobile-nav-link {
    color: var(--text-main); text-decoration: none; font-size: 1.1rem; font-weight: 600;
    padding: 0.5rem 0; border-bottom: 1px solid var(--glass-border);
    transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--cyan); }

/* --- Swarm Status Bar --- */
.swarm-status-bar {
    position: fixed; top: 60px; left: 0; right: 0;
    background: rgba(15, 15, 26, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.4rem 2rem; display: flex; justify-content: space-between;
    align-items: center; z-index: 999; font-size: 0.75rem;
    transition: transform 0.3s;
}
.swarm-indicator { display: flex; align-items: center; gap: 8px; }
.pulse-dot {
    width: 8px; height: 8px; background: var(--green);
    border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.swarm-metrics { color: var(--text-muted); display: flex; gap: 1rem; }

/* --- Hero Section --- */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; gap: 4rem; padding: 8rem 2rem 4rem;
    max-width: 1300px; margin: 0 auto; position: relative;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(0, 212, 255, 0.1); border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.8rem;
    color: var(--cyan); font-weight: 600; margin-bottom: 1.5rem;
}
.hero-badge-dot {
    width: 6px; height: 6px; background: var(--cyan);
    border-radius: 50%; animation: pulse 2s infinite;
}
.hero-title {
    font-size: 3.5rem; font-weight: 800; line-height: 1.1;
    letter-spacing: -1.5px; margin-bottom: 1.2rem;
}
.hero-subtitle {
    color: var(--text-muted); font-size: 1.1rem;
    line-height: 1.7; margin-bottom: 2rem; max-width: 500px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-ghost {
    background: transparent; border: 2px solid var(--glass-border);
    color: var(--text-main); padding: 1rem 2rem; border-radius: 12px;
    font-weight: 700; font-size: 1.1rem; cursor: pointer;
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); box-shadow: var(--glow-purple); }
.hero-stats { display: flex; gap: 2.5rem; }
.hero-stat { text-align: center; }
.hero-stat-num {
    display: block; font-size: 2rem; font-weight: 800;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.hero-visual {
    position: relative; width: 400px; height: 400px;
    display: flex; align-items: center; justify-content: center;
}
.hero-visual-ring {
    position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,0.05);
    animation: ringPulse 4s infinite ease-in-out;
}
.ring-1 { width: 300px; height: 300px; animation-delay: 0s; }
.ring-2 { width: 220px; height: 220px; animation-delay: -1.3s; border-color: rgba(0,212,255,0.1); }
.ring-3 { width: 140px; height: 140px; animation-delay: -2.6s; border-color: rgba(184,41,221,0.15); }
@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}
.hero-visual-center {
    width: 100px; height: 100px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: white; box-shadow: 0 0 40px rgba(0,212,255,0.3);
    animation: centerFloat 6s infinite ease-in-out;
}
@keyframes centerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.hero-agent-float {
    position: absolute; font-size: 1.5rem;
    animation: agentFloat 5s infinite ease-in-out;
    animation-delay: var(--delay);
    filter: drop-shadow(0 0 10px rgba(0,212,255,0.3));
}
.hero-agent-float:nth-child(5) { top: 10%; left: 20%; }
.hero-agent-float:nth-child(6) { top: 15%; right: 15%; }
.hero-agent-float:nth-child(7) { bottom: 20%; left: 10%; }
.hero-agent-float:nth-child(8) { bottom: 15%; right: 20%; }
.hero-agent-float:nth-child(9) { top: 50%; right: 5%; }
@keyframes agentFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* --- Section Headers --- */
.section-header { text-align: center; margin-bottom: 3rem; padding-top: 2rem; }
.section-tag {
    display: inline-block; background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2); color: var(--cyan);
    padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.75rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem;
}
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.8rem; }
.section-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* --- Features Section --- */
.features { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.feature-card {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 2rem; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transform: scaleX(0); transition: transform 0.4s; transform-origin: left;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
    transform: translateY(-8px); border-color: rgba(0,212,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), var(--glow-cyan);
}
.feature-icon {
    width: 50px; height: 50px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(184,41,221,0.15));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: var(--cyan); margin-bottom: 1.2rem;
    border: 1px solid rgba(0,212,255,0.1);
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* --- How It Works --- */
.how-it-works { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
.steps-container {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; flex-wrap: wrap;
}
.step-card {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 2rem; text-align: center; flex: 1; min-width: 220px; max-width: 260px;
    position: relative; transition: all 0.3s;
}
.step-card:hover { transform: translateY(-5px); border-color: var(--cyan); }
.step-number {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: white; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; box-shadow: var(--glow-cyan);
}
.step-icon {
    font-size: 2rem; color: var(--cyan); margin: 1rem 0 0.8rem;
    filter: drop-shadow(0 0 10px rgba(0,212,255,0.3));
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.step-arrow {
    color: var(--text-dim); font-size: 1.2rem;
    animation: arrowBounce 1.5s infinite;
}
@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* --- App Section --- */
.app-section { max-width: 1100px; margin: 0 auto; padding: 4rem 1rem; }

/* --- Glass Panels --- */
.glass-panel {
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem;
}
.panel-header h2 { font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel-header h2 i { color: var(--cyan); }

/* --- Mode Selection --- */
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.mode-card {
    background: rgba(255,255,255,0.03); border: 2px solid var(--glass-border);
    border-radius: var(--radius); padding: 2rem; text-align: center;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
}
.mode-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(184,41,221,0.05));
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.mode-card:hover::after { opacity: 1; }
.mode-card:hover {
    transform: translateY(-6px); border-color: var(--cyan);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2), var(--glow-cyan);
}
.mode-icon {
    font-size: 2.5rem; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.mode-card h3 { color: var(--text-main); margin-bottom: 0.5rem; font-size: 1.2rem; font-weight: 700; }
.mode-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.mode-tags { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.tag {
    background: rgba(0, 212, 255, 0.1); color: var(--cyan);
    padding: 0.25rem 0.7rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
}

/* --- Input Area --- */
.input-container { display: flex; flex-direction: column; gap: 1.2rem; }
.upload-area {
    border: 2px dashed rgba(255,255,255,0.15); border-radius: var(--radius);
    padding: 2.5rem; text-align: center; cursor: pointer;
    transition: all 0.3s ease; background: rgba(255,255,255,0.02);
    position: relative; overflow: hidden;
}
.upload-area::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(0,212,255,0.05), transparent 70%);
    opacity: 0; transition: opacity 0.3s;
}
.upload-area:hover::before { opacity: 1; }
.upload-area:hover { border-color: var(--cyan); background: rgba(0, 212, 255, 0.03); transform: scale(1.01); }
.upload-area.has-file { border-color: var(--purple); border-style: solid; background: rgba(184, 41, 221, 0.05); }
.upload-area.dragover { border-color: var(--cyan); background: rgba(0, 212, 255, 0.08); transform: scale(1.01); }
.upload-icon { font-size: 2.2rem; margin-bottom: 0.5rem; display: block; color: var(--cyan); }
.file-name { display: block; margin-top: 8px; color: var(--purple); font-weight: 600; font-size: 0.9rem; }
.file-hint { display: block; margin-top: 4px; color: var(--text-muted); font-size: 0.75rem; }

.divider { text-align: center; position: relative; color: var(--text-muted); font-weight: 600; font-size: 0.85rem; }
.divider::before, .divider::after {
    content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--glass-border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

/* Record Button */
.record-btn-area {
    border: 2px solid rgba(255, 68, 68, 0.3); border-radius: var(--radius); padding: 1.2rem;
    text-align: center; cursor: pointer; transition: all 0.3s ease;
    background: rgba(255, 68, 68, 0.05);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.record-btn-area:hover { border-color: #ff4444; background: rgba(255, 68, 68, 0.1); }
.record-btn-area.recording { border-color: #ff4444; background: #ff4444; color: white; animation: pulseRecord 1.5s infinite; }
.record-icon { color: #ff4444; font-size: 1.2rem; transition: all 0.3s; }
.record-btn-area.recording .record-icon { color: white; }
.record-hint { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.record-btn-area.recording .record-hint { color: rgba(255,255,255,0.7); }
@keyframes pulseRecord {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

.back-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--text-muted); padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.back-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }

/* Angle Selector */
.angle-selector { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.angle-selector label { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.angle-buttons { display: flex; gap: 0.5rem; }
.angle-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    color: var(--text-muted); padding: 0.4rem 1rem; border-radius: 8px;
    cursor: pointer; font-size: 0.85rem; font-weight: 600;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.angle-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.angle-btn.active { background: rgba(0, 212, 255, 0.15); border-color: var(--cyan); color: var(--cyan); }

/* Buttons */
.btn-primary {
    position: relative; overflow: hidden;
    background: linear-gradient(45deg, var(--cyan), var(--purple));
    color: #fff; border: none; padding: 1.1rem; border-radius: 12px;
    font-weight: 800; font-size: 1.05rem; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 212, 255, 0.35); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; background: #333; box-shadow: none; color: #666; }
.btn-shine {
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-primary:hover .btn-shine { left: 100%; }

/* Swarm Activity in Loader */
.swarm-activity {
    display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.agent-node {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 0.5rem 1rem;
    font-size: 0.8rem; color: var(--text-muted);
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 6px;
}
.agent-node.active {
    border-color: var(--cyan); background: rgba(0, 212, 255, 0.1);
    color: var(--cyan); box-shadow: var(--glow-cyan);
    animation: agentPulse 1.5s infinite;
}
.agent-node.complete {
    border-color: var(--green); background: rgba(0, 230, 118, 0.1);
    color: var(--green);
}
@keyframes agentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Loader Visualizer */
.music-visualizer { display: flex; justify-content: center; align-items: flex-end; gap: 5px; height: 50px; margin: 1rem 0; }
.music-visualizer .bar { width: 6px; background: linear-gradient(to top, var(--cyan), var(--purple)); border-radius: 3px; animation: visualize 0.8s infinite alternate ease-in-out; }
.music-visualizer .bar:nth-child(1) { height: 15px; animation-delay: 0.0s; }
.music-visualizer .bar:nth-child(2) { height: 35px; animation-delay: 0.15s; }
.music-visualizer .bar:nth-child(3) { height: 25px; animation-delay: 0.3s; }
.music-visualizer .bar:nth-child(4) { height: 45px; animation-delay: 0.1s; }
.music-visualizer .bar:nth-child(5) { height: 20px; animation-delay: 0.4s; }
.music-visualizer .bar:nth-child(6) { height: 40px; animation-delay: 0.25s; }
@keyframes visualize { 0% { height: 8px; opacity: 0.5; } 100% { height: 100%; opacity: 1; } }
.processing-text { color: var(--cyan); font-weight: 700; text-align: center; font-size: 1.1rem; }
.processing-sub { color: var(--text-muted); text-align: center; font-size: 0.85rem; margin-top: 0.3rem; }

/* Analysis Grid */
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.analysis-card {
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 1rem; text-align: center; transition: all 0.3s;
}
.analysis-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.analysis-card .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.3rem; }
.analysis-card .value { font-size: 1.3rem; font-weight: 700; color: var(--cyan); }
.analysis-card .sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Themes Grid */
.token-badge {
    background: linear-gradient(45deg, var(--purple), var(--pink));
    color: white; padding: 0.3rem 0.8rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700;
}
.recommendation-banner {
    background: linear-gradient(90deg, rgba(0,212,255,0.1), rgba(184,41,221,0.1));
    border: 1px solid rgba(0,212,255,0.2); border-radius: 12px;
    padding: 1rem 1.5rem; margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 1rem; transition: all 0.3s;
}
.recommendation-banner:hover { border-color: var(--cyan); }
.recommendation-banner .rec-icon { font-size: 1.5rem; }
.recommendation-banner .rec-text { font-size: 0.9rem; color: var(--text-muted); }
.recommendation-banner .rec-text strong { color: var(--cyan); }

.themes-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.theme-card {
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    border-top: 4px solid var(--cyan); border-radius: 14px; padding: 1.5rem;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
}
.theme-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,212,255,0.03), rgba(184,41,221,0.03));
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.theme-card:hover::before { opacity: 1; }
.theme-card:hover { transform: translateY(-6px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.theme-card h3 { color: var(--cyan); margin-bottom: 0.4rem; font-size: 1rem; font-weight: 700; }
.theme-card .producer { color: var(--text-main); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.8rem; }
.theme-card p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.6rem; line-height: 1.4; }
.theme-card strong { color: var(--text-main); }
.theme-card .meta-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0; }
.theme-card .meta-tag { background: rgba(0,212,255,0.1); color: var(--cyan); padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.theme-btn {
    background: transparent; border: 2px solid var(--cyan); color: var(--cyan);
    padding: 0.75rem; border-radius: 10px; cursor: pointer; font-weight: 700; width: 100%;
    margin-top: 0.8rem; transition: all 0.3s; font-size: 0.9rem; display: inline-flex;
    align-items: center; justify-content: center; gap: 6px;
}
.theme-btn:hover { background: var(--cyan); color: var(--bg-light); box-shadow: var(--glow-cyan); }
.theme-btn:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--text-muted); color: var(--text-muted); }

/* Progress Section */
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.progress-header h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.job-id { font-family: 'Courier New', monospace; color: var(--text-muted); font-size: 0.75rem; background: rgba(255,255,255,0.05); padding: 0.2rem 0.6rem; border-radius: 4px; }
.progress-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; margin-bottom: 1.5rem; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--purple)); border-radius: 3px; transition: width 0.5s ease; }
.progress-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 1.5rem; }
.stage {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    font-size: 0.8rem; color: var(--text-muted); transition: all 0.3s;
}
.stage.active { border-color: var(--cyan); background: rgba(0,212,255,0.08); color: var(--cyan); }
.stage.complete { border-color: var(--green); background: rgba(0,230,118,0.08); color: var(--green); }
.stage.failed { border-color: #ff4444; background: rgba(255,68,68,0.08); color: #ff4444; }
.progress-status { text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* Audio Player */
.quality-badge {
    background: rgba(0, 230, 118, 0.15); color: var(--green);
    padding: 0.25rem 0.7rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
}
.waveform-canvas {
    height: 120px; width: 100%; background: rgba(0,0,0,0.2);
    border-radius: 12px; margin-bottom: 1.5rem; display: block;
}
.player-controls { display: flex; gap: 1rem; }
.play-btn, .download-btn {
    padding: 1rem; border-radius: 10px; font-weight: 800; cursor: pointer;
    border: none; flex: 1; transition: all 0.2s; text-align: center;
    text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.play-btn { background: linear-gradient(45deg, var(--cyan), var(--purple)); color: white; }
.play-btn:hover { transform: translateY(-2px); box-shadow: var(--glow-cyan); }
.download-btn { background: rgba(255,255,255,0.05); color: var(--text-main); border: 2px solid var(--glass-border); }
.download-btn:hover { border-color: var(--purple); color: var(--purple); }
.track-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; }
.meta-item { text-align: center; }
.meta-item .meta-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.meta-item .meta-value { font-size: 1rem; font-weight: 700; color: var(--cyan); }
.success-text { color: var(--green); font-weight: 700; text-align: center; margin-top: 1rem; font-size: 1.1rem; }

/* FAQ Section */
.faq { max-width: 800px; margin: 0 auto; padding: 4rem 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    overflow: hidden; transition: all 0.3s;
}
.faq-item:hover { border-color: rgba(0,212,255,0.15); }
.faq-question {
    width: 100%; padding: 1.2rem 1.5rem; background: none; border: none;
    color: var(--text-main); font-size: 1rem; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; text-align: left; transition: color 0.2s;
}
.faq-question:hover { color: var(--cyan); }
.faq-question i { transition: transform 0.3s; color: var(--text-muted); }
.faq-item.open .faq-question i { transform: rotate(180deg); color: var(--cyan); }
.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}
.faq-item.open .faq-answer {
    max-height: 300px; padding: 0 1.5rem 1.2rem;
}
.faq-answer p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* Footer */
.main-footer {
    background: rgba(10, 10, 20, 0.8); border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem 2rem; margin-top: 2rem;
}
.footer-grid {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
.footer-brand { max-width: 300px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; }
.footer-eq { height: 24px; }
.footer-brand > p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.2rem; }
.footer-social { display: flex; gap: 0.8rem; }
.social-link {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); text-decoration: none; transition: all 0.2s;
}
.social-link:hover { background: rgba(0,212,255,0.1); border-color: var(--cyan); color: var(--cyan); }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links h4 { color: var(--text-main); font-size: 0.95rem; margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom {
    max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap; gap: 0.5rem;
}
.footer-credit i { color: var(--pink); }

/* Modals */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px); z-index: 10003;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay:not(.hidden) { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--bg-alt); border: 1px solid var(--glass-border);
    border-radius: var(--radius); width: 100%; max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.95); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay:not(.hidden) .modal { transform: translateY(0) scale(1); }
.modal-sm { max-width: 360px; }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--glass-border);
}
.modal-header h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.modal-header h3 i { color: var(--cyan); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; transition: color 0.2s; }
.modal-close:hover { color: var(--text-main); }
.modal-body { padding: 1.5rem; }

.setting-group { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 0.5rem; }
.setting-group label { font-weight: 600; font-size: 0.9rem; }
.setting-options { display: flex; gap: 0.5rem; }
.setting-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    color: var(--text-muted); padding: 0.4rem 0.8rem; border-radius: 6px;
    cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 4px;
}
.setting-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.setting-btn.active { background: rgba(0, 212, 255, 0.15); border-color: var(--cyan); color: var(--cyan); }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: rgba(255,255,255,0.1); border-radius: 24px;
    transition: 0.3s; border: 1px solid var(--glass-border);
}
.toggle-slider::before {
    position: absolute; content: ''; height: 18px; width: 18px;
    left: 2px; bottom: 2px; background: var(--text-muted);
    border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(0, 212, 255, 0.2); border-color: var(--cyan); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--cyan); }

/* Shortcuts */
.shortcut-row { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--glass-border); }
.shortcut-row:last-child { border-bottom: none; }
.shortcut-row kbd {
    background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border);
    padding: 0.2rem 0.5rem; border-radius: 4px; font-family: 'Courier New', monospace;
    font-size: 0.8rem; color: var(--cyan); min-width: 30px; text-align: center;
}
.shortcut-row span { font-size: 0.85rem; color: var(--text-muted); }

/* Utilities */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s forwards; }
.slide-up { animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* Responsive */
@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 10rem; }
    .hero-visual { width: 300px; height: 300px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-mobile-toggle { display: flex; }
    .hero-title { font-size: 2.2rem; }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .mode-options { grid-template-columns: 1fr; }
    .progress-stages { grid-template-columns: repeat(2, 1fr); }
    .themes-container { grid-template-columns: 1fr; }
    .steps-container { flex-direction: column; }
    .step-arrow { transform: rotate(90deg); }
    .track-meta { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero-stats { justify-content: center; }
}
