@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --bg: #0a0a0f;
    --bg-card: #13131a;
    --bg-input: #1a1a25;
    --text: #f0f0f5;
    --text-muted: #7a7a8a;
    --border: #252535;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
    --gradient-hover: linear-gradient(135deg, #7c3aed, #db2777);
    --glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --glow-hover: 0 0 30px rgba(139, 92, 246, 0.5);
}

[data-theme="light"] {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #8b5cf6;
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --bg-input: #f1f3f9;
    --text: #1a1a2e;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --gradient: linear-gradient(135deg, #7c3aed, #db2777);
    --gradient-hover: linear-gradient(135deg, #6d28d9, #be185d);
    --glow: 0 4px 20px rgba(124, 58, 237, 0.15);
    --glow-hover: 0 8px 30px rgba(124, 58, 237, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 8s ease-in-out infinite alternate;
}

[data-theme="light"] body::before {
    background: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(219, 39, 119, 0.06) 0%, transparent 50%);
}

@keyframes bgPulse { 0% { opacity: 0.5; } 100% { opacity: 1; } }

.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 3rem; max-width: 1400px; margin: 0 auto; background: transparent; backdrop-filter: blur(0px); border-bottom: 1px solid transparent; position: sticky; top: 0; z-index: 100; animation: slideDown 0.5s ease; transition: background 0.3s ease, border-color 0.3s ease; }
[data-theme="light"] .navbar { background: transparent; }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.nav-brand { font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
.nav-brand a { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-decoration: none; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; justify-content: center; flex: 1; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: all 0.3s ease; position: relative; padding: 0.3rem 0; font-size: 0.95rem; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gradient); transition: width 0.3s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { flex-shrink: 0; display: flex; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); font-size: 1.5rem; padding: 0.3rem 0.7rem; border-radius: 8px; cursor: pointer; }
.mobile-nav { display: none; flex-direction: column; background: rgba(19, 19, 26, 0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 0.5rem 2rem; }
[data-theme="light"] .mobile-nav { background: rgba(255, 255, 255, 0.95); }
.mobile-nav.show { display: flex; }
.mobile-nav a { color: var(--text-muted); text-decoration: none; padding: 0.8rem 0; border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--primary); padding-left: 10px; }
.mobile-nav-footer { padding: 0.8rem 0; border-top: 1px solid var(--border); }
.mobile-nav-footer .theme-toggle { width: 100%; height: 44px; justify-content: center; gap: 0.5rem; }

/* Theme Toggle */
.theme-toggle { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; font-size: 1.2rem; }
.theme-toggle:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); transform: scale(1.05); }
[data-theme="light"] .theme-toggle:hover { background: rgba(124, 58, 237, 0.1); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Hero */
.hero { text-align: center; padding: 7rem 2rem 5rem; position: relative; }
.hero::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 500px; height: 500px; background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%); pointer-events: none; }
[data-theme="light"] .hero::before { background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%); }
.hero h1 { font-size: 4.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1rem; letter-spacing: -2px; animation: heroText 1s ease; line-height: 1.1; }
@keyframes heroText { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.tagline { font-size: 1.6rem; color: var(--text-muted); font-weight: 300; animation: heroText 1s ease 0.2s both; }
.subtitle { font-size: 1.15rem; color: var(--text-muted); margin-top: 1rem; animation: heroText 1s ease 0.4s both; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.2); border-radius: 999px; font-size: 0.85rem; color: var(--primary-light); margin-bottom: 1.5rem; animation: heroText 1s ease 0.1s both; }
[data-theme="light"] .hero-badge { background: rgba(124, 58, 237, 0.08); border-color: rgba(124, 58, 237, 0.15); color: var(--primary); }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; padding: 0 2rem 5rem; max-width: 1200px; margin: 0 auto; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; text-align: center; 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; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.08)); opacity: 0; transition: opacity 0.4s ease; }
[data-theme="light"] .feature-card::before { background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(219, 39, 119, 0.04)); }
.feature-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--primary); box-shadow: var(--glow-hover); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { width: 70px; height: 70px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: center; background: var(--gradient); border-radius: 18px; font-size: 2rem; color: #fff; animation: iconFloat 3s ease-in-out infinite; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
[data-theme="light"] .feature-icon { box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2); }
@keyframes iconFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 0.8rem; font-weight: 700; position: relative; z-index: 1; }
.feature-card p { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; position: relative; z-index: 1; font-size: 0.95rem; }
.feature-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.8rem; background: var(--gradient); color: #fff; text-decoration: none; border-radius: 12px; font-weight: 600; transition: all 0.3s ease; position: relative; z-index: 1; overflow: hidden; font-size: 0.95rem; }
.feature-btn::before { content: ''; 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 ease; }
.feature-btn:hover::before { left: 100%; }
.feature-btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }

/* Stats Bar */
.stats-bar { display: flex; justify-content: center; gap: 3rem; padding: 3rem 2rem; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }

/* Highlights */
.highlights { padding: 5rem 2rem; text-align: center; }
.highlights h2 { font-size: 2.2rem; margin-bottom: 3rem; font-weight: 700; }
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.highlight-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem 1.5rem; transition: all 0.3s ease; position: relative; overflow: hidden; }
.highlight-item::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--gradient); transform: scaleX(0); transition: transform 0.3s ease; }
.highlight-item:hover { transform: translateY(-5px); border-color: var(--primary); }
.highlight-item:hover::after { transform: scaleX(1); }
.highlight-item strong { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 1rem; font-weight: 600; }
.highlight-item p { color: var(--text-muted); font-size: 0.9rem; }

/* How It Works */
.how-it-works { padding: 5rem 2rem; text-align: center; }
.how-it-works h2 { font-size: 2.2rem; margin-bottom: 3rem; font-weight: 700; }
.steps { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; max-width: 1000px; margin: 0 auto; position: relative; }
.steps::before { content: ''; position: absolute; top: 40px; left: 15%; right: 15%; height: 2px; background: var(--border); z-index: 0; }
.step { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem; flex: 1; min-width: 250px; transition: all 0.3s ease; position: relative; z-index: 1; }
.step:hover { transform: translateY(-5px); border-color: var(--primary); }
.step-num { width: 56px; height: 56px; background: var(--gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 1.5rem; color: #fff; font-size: 1.3rem; box-shadow: var(--glow); }
.step h4 { margin-bottom: 0.8rem; font-size: 1.15rem; font-weight: 600; }
.step p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* CTA Section */
.cta-section { padding: 5rem 2rem; text-align: center; }
.cta-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 4rem 3rem; max-width: 700px; margin: 0 auto; position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(236, 72, 153, 0.05)); pointer-events: none; }
[data-theme="light"] .cta-box::before { background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(219, 39, 119, 0.03)); }
.cta-box h2 { font-size: 2rem; margin-bottom: 1rem; font-weight: 700; position: relative; z-index: 1; }
.cta-box p { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; position: relative; z-index: 1; }
.cta-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 1rem 2.5rem; background: var(--gradient); color: #fff; text-decoration: none; border-radius: 14px; font-weight: 600; font-size: 1.1rem; transition: all 0.3s ease; position: relative; z-index: 1; box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3); }
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4); }

/* Page Header */
.page-header { text-align: center; padding: 4rem 2rem 2rem; animation: heroText 0.8s ease; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 0.8rem; font-weight: 700; }
.page-header p { color: var(--text-muted); font-size: 1.1rem; }

/* Tool Section */
.tool-section { padding: 0 2rem 2rem; max-width: 750px; margin: 0 auto; }
.tool-section h2 { font-size: 1.5rem; margin-bottom: 1.2rem; font-weight: 600; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; transition: all 0.3s ease; }
.tool-card:hover { border-color: rgba(139, 92, 246, 0.3); }

label { display: block; font-weight: 600; margin-bottom: 0.6rem; color: var(--text); font-size: 0.95rem; }
textarea, select, input[type="text"] { width: 100%; padding: 1rem 1.2rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 1rem; font-family: inherit; resize: vertical; margin-bottom: 1rem; transition: all 0.3s ease; }
textarea:focus, select:focus, input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a8a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* Controls Row */
.controls-row { display: flex; gap: 1.2rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.control-group { flex: 1; min-width: 150px; }
.control-group label { font-size: 0.9rem; }

/* Toggle */
.toggle-group { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.3rem; }
.toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 400; cursor: pointer; }
.toggle input { accent-color: var(--primary); }

input[type="range"] { width: 100%; margin-top: 0.5rem; height: 6px; border-radius: 3px; background: var(--bg-input); outline: none; -webkit-appearance: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gradient); cursor: pointer; box-shadow: var(--glow); transition: transform 0.2s ease; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Buttons */
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; margin-bottom: 0.5rem; }
.btn { padding: 0.9rem 1.8rem; border: none; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-family: inherit; position: relative; overflow: hidden; }
.btn::before { content: ''; 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 ease; }
.btn:hover::before { left: 100%; }
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); }
.btn-secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; transform: translateY(-2px); }

/* Record Button */
.record-area { text-align: center; margin-bottom: 2rem; }
.btn-record { width: 140px; height: 140px; border-radius: 50%; border: 3px solid var(--border); background: var(--bg-input); color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-family: inherit; position: relative; margin: 0 auto; }
.btn-record::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; transition: all 0.3s ease; }
.btn-record:hover { border-color: var(--primary); transform: scale(1.05); }
.btn-record:hover::before { opacity: 1; width: 120%; height: 120%; }
.btn-record.recording { border-color: var(--danger); background: rgba(239, 68, 68, 0.15); animation: recordPulse 1.5s infinite; }
@keyframes recordPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 50% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); } }
.record-icon { font-size: 3rem; transition: transform 0.3s ease; }
.btn-record:hover .record-icon { transform: scale(1.1); }
.recording-status { color: var(--danger); font-weight: 700; margin-top: 1rem; font-size: 1rem; }
.recording-status.blink { animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Streaming Output */
.streaming-output { background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1rem; min-height: 60px; }
.streaming-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.streaming-text { font-size: 1.1rem; line-height: 1.8; color: var(--primary-light); min-height: 1.5em; }

/* Output Area */
.output-area { margin-bottom: 1.2rem; }

/* Status */
.status { margin-top: 1.5rem; padding: 0.8rem 1.2rem; border-radius: 10px; font-size: 0.95rem; display: none; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.status.info { display: block; background: rgba(139, 92, 246, 0.15); color: var(--primary-light); border: 1px solid rgba(139, 92, 246, 0.3); }
.status.success { display: block; background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status.error { display: block; background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
[data-theme="light"] .status.info { background: rgba(124, 58, 237, 0.08); color: var(--primary); border-color: rgba(124, 58, 237, 0.2); }
[data-theme="light"] .status.success { background: rgba(5, 150, 105, 0.08); color: var(--success); border-color: rgba(5, 150, 105, 0.2); }
[data-theme="light"] .status.error { background: rgba(220, 38, 38, 0.08); color: var(--danger); border-color: rgba(220, 38, 38, 0.2); }

/* Feedback */
.feedback-area { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.2rem; padding: 0.8rem 1.2rem; background: var(--bg-input); border-radius: 12px; font-size: 0.95rem; }
.feedback-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; font-size: 1.1rem; }
.feedback-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(139, 92, 246, 0.1); }
.feedback-thanks { color: var(--success); font-weight: 500; }

/* Sample Grid */
.sample-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.sample-btn { padding: 0.9rem 1.2rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; color: var(--text); cursor: pointer; font-size: 0.95rem; font-family: inherit; transition: all 0.3s ease; text-align: left; }
.sample-btn:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); transform: translateY(-2px); }

/* Audio Player */
.audio-player-wrap { margin-top: 1.2rem; }
.audio-player-wrap audio { width: 100%; border-radius: 12px; }

/* Upload Area */
.upload-area { border: 2px dashed var(--border); border-radius: 16px; padding: 3rem 2rem; text-align: center; transition: all 0.3s ease; cursor: pointer; }
.upload-area:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.05); }
.upload-area.dragover { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); transform: scale(1.02); }
.upload-area p { color: var(--text-muted); margin-bottom: 1rem; font-size: 1.05rem; }
.upload-hint { font-size: 0.85rem; margin-top: 0.5rem !important; color: var(--text-muted); }
#audio-player { width: 100%; margin-top: 1.2rem; border-radius: 12px; filter: invert(100%) hue-rotate(180deg); }

/* Chat Page */
.chat-controls { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.chat-area { min-height: 400px; max-height: 60vh; overflow-y: auto; padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-input); }
.chat-empty { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.chat-empty i { font-size: 4rem; margin-bottom: 1rem; display: block; opacity: 0.3; }
.chat-hint { font-size: 0.9rem; margin-top: 0.5rem; opacity: 0.7; }
.chat-msg { display: flex; gap: 0.8rem; margin-bottom: 1rem; animation: fadeIn 0.3s ease; }
.chat-msg.chat-user { flex-direction: row-reverse; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.chat-user .chat-avatar { background: var(--gradient); border: none; }
.chat-content { max-width: 70%; padding: 0.8rem 1.2rem; border-radius: 16px; font-size: 0.95rem; line-height: 1.6; }
.chat-user .chat-content { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-assistant .chat-content { background: var(--bg-card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-meta { font-size: 0.75rem; opacity: 0.7; margin-top: 0.4rem; }
.chat-input-area { text-align: center; margin-bottom: 1rem; }
.chat-text-input { display: flex; gap: 0.8rem; }
.chat-text-input input { margin-bottom: 0; flex: 1; }
.chat-text-input .btn { padding: 0.9rem 1.5rem; margin-bottom: 0; }

.typing-dots { display: flex; gap: 4px; padding: 0.5rem 0; }
.typing-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); animation: typingBounce 1.4s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

/* Analytics Page */
.analytics-section { padding: 0 2rem 2rem; max-width: 1200px; margin: 0 auto; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.3rem; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.chart-card.full-width { grid-column: 1 / -1; }
.chart-card h3 { font-size: 1.1rem; margin-bottom: 1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.chart-area { min-height: 150px; }
.chart-area .empty { color: var(--text-muted); text-align: center; padding: 2rem; }

.bar-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.bar-label { min-width: 80px; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; }
.bar-track { flex: 1; height: 24px; background: var(--bg-input); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; min-width: 2px; }
.bar-value { min-width: 40px; text-align: right; font-size: 0.85rem; font-weight: 600; }

.daily-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 10px; }
.daily-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.daily-bar { width: 100%; background: var(--gradient); border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.5s ease; }
.daily-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; writing-mode: vertical-lr; transform: rotate(180deg); }

/* Data Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { text-align: left; padding: 0.8rem; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.data-table td { padding: 0.8rem; border-bottom: 1px solid var(--border); }
.type-badge { padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.type-badge.stt { background: rgba(139, 92, 246, 0.2); color: var(--primary-light); }
.type-badge.tts { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.type-badge.chat { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.type-badge.voice_chat { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.text-truncate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-delete { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); color: #ef4444; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; font-size: 1rem; font-weight: 700; line-height: 1; }
.btn-delete:hover { border-color: #ef4444; color: #fff; background: #ef4444; transform: scale(1.1); }

/* Footer */
footer { text-align: center; padding: 3rem 2rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 4rem; font-size: 0.95rem; }
footer p { opacity: 0.8; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: block; }
    .hero { padding: 5rem 1.5rem 3rem; }
    .hero h1 { font-size: 2.8rem; }
    .tagline { font-size: 1.2rem; }
    .features-grid { grid-template-columns: 1fr; padding: 0 1.5rem 3rem; }
    .steps { flex-direction: column; align-items: center; }
    .steps::before { display: none; }
    .step { width: 100%; max-width: 350px; }
    .controls-row { flex-direction: column; }
    .btn-group { justify-content: center; }
    .btn-record { width: 120px; height: 120px; }
    .record-icon { font-size: 2.5rem; }
    .page-header h1 { font-size: 2rem; }
    .chat-content { max-width: 85%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-bar { gap: 1.5rem; }
    .cta-box { padding: 2.5rem 1.5rem; }
    .highlights-grid { grid-template-columns: repeat(2, 1fr); }
}
