/* ========================================
   CSS Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    
    --bg-dark: #0a0a0f;
    --bg-darker: #05050a;
    --bg-card: #121218;
    --bg-hover: #1a1a24;
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --border: #27272a;
    --border-light: #3f3f46;
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, 
        #0a0a0f 0%, 
        #0f0f18 25%, 
        #14141f 50%, 
        #1a1a2e 75%,
        #1f1f3a 100%
    );
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* ========================================
   Floating Notes Background
   ======================================== */
.floating-notes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.note {
    position: absolute;
    font-size: 2rem;
    color: rgba(139, 92, 246, 0.25);
    animation: float linear infinite;
    opacity: 0;
}

.note-1 { left: 10%; animation-duration: 25s; animation-delay: 0s; }
.note-2 { left: 20%; animation-duration: 30s; animation-delay: 2s; font-size: 2.5rem; }
.note-3 { left: 30%; animation-duration: 28s; animation-delay: 4s; font-size: 3rem; color: rgba(99, 102, 241, 0.25); }
.note-4 { left: 45%; animation-duration: 32s; animation-delay: 1s; }
.note-5 { left: 55%; animation-duration: 27s; animation-delay: 3s; font-size: 2.5rem; }
.note-6 { left: 65%; animation-duration: 29s; animation-delay: 5s; font-size: 3rem; color: rgba(236, 72, 153, 0.25); }
.note-7 { left: 75%; animation-duration: 31s; animation-delay: 2s; }
.note-8 { left: 85%; animation-duration: 26s; animation-delay: 4s; font-size: 2.5rem; }
.note-9 { left: 90%; animation-duration: 33s; animation-delay: 1s; font-size: 3rem; }
.note-10 { left: 95%; animation-duration: 28s; animation-delay: 3s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ========================================
   Header
   ======================================== */
.header {
    background-color: #000000;
    border-bottom: 1.2px solid rgba(255, 255, 255, 0.11);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 
                0 2px 8px rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    position: relative;
}

.logo h1 {
    color: #ffffff;
}

/* Floating notes near logo */
.logo-note {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
    animation: logoFloat 3s ease-in-out infinite;
    pointer-events: none;
}

.logo-note-1 {
    left: -30px;
    top: -10px;
    color: var(--primary);
    animation-delay: 0s;
}

.logo-note-2 {
    right: -35px;
    top: -15px;
    color: var(--secondary);
    animation-delay: 1s;
    font-size: 1.4rem;
}

.logo-note-3 {
    right: -40px;
    bottom: -10px;
    color: var(--accent);
    animation-delay: 2s;
    font-size: 1.6rem;
}

@keyframes logoFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-15px) scale(1.2);
    }
}

.logo-icon {
    width: 38px;
    height: 38px;
    color: #ffffff;
}

.nav {
    display: flex;
    gap: var(--spacing-xl);
}

.nav-link {
    color: #888888;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.nav-link:hover {
    color: #aaaaaa;
}

.nav-link.active {
    color: #888888;
    background-color: rgba(99, 102, 241, 0.1);
}

/* Language Selector */
.language-selector {
    position: relative;
    margin-left: var(--spacing-md);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(30, 30, 46, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    color: #888888;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(99, 102, 241, 0.5);
    color: #aaaaaa;
}

.lang-btn svg {
    transition: transform var(--transition-fast);
}

.lang-btn.active svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: rgba(30, 30, 46, 0.98);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #888888;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-option:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #aaaaaa;
}

.lang-option.active {
    background: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

/* ========================================
   Main Content
   ======================================== */
.main {
    padding: var(--spacing-2xl) 0;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl) 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Studio Section
   ======================================== */
.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

@media (max-width: 1100px) {
    .studio-grid {
        grid-template-columns: 1fr;
    }
}

/* Track Card */
.track-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    transition: border-color var(--transition-base);
}

.track-card:hover {
    border-color: var(--border-light);
}

.track-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.track-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: #ffffff;
}

.track-title {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    color: #b0b0b0;
}

.track-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-dark);
    border-radius: var(--radius-md);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.status-indicator.uploading {
    background-color: var(--warning);
    animation: pulse 2s infinite;
}

.status-indicator.ready {
    background-color: var(--success);
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    stroke-width: 2;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: #b0b0b0;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Track Player */
.track-player {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Waveform */
.waveform-container {
    position: relative;
    width: 100%;
    height: 120px;
    background-color: var(--bg-dark);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    overflow: visible;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.selection-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: rgba(251, 191, 36, 0.25);
    border-left: 2px solid #fbbf24;
    border-right: 2px solid #fbbf24;
    pointer-events: none;
    transition: all 0.1s ease;
}

.time-markers {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: var(--bg-dark);
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.time-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.time-separator {
    color: var(--text-muted);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
}

.icon-volume {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    stroke-width: 2;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Selection Controls */
.selection-controls {
    margin-bottom: var(--spacing-lg);
}

.selection-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--bg-dark);
    border-radius: var(--radius-md);
}

.selection-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.selection-range {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.time-input {
    width: 80px;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

.time-input:focus {
    outline: none;
    border-color: var(--primary);
}

.range-separator {
    color: var(--text-muted);
}

.time-unit {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.selection-duration {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
}

.pattern-slider {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    -webkit-appearance: none;
}

.pattern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.pattern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.pattern-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Track Actions */
.track-actions {
    display: flex;
    gap: var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1rem;
}

.btn-icon-svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Status Message Section
   ======================================== */
.status-message-section {
    margin-top: var(--spacing-2xl);
    animation: fadeIn 0.5s ease;
}

.status-message-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
    border: 1px solid var(--border);
    opacity: 0.7;
}

.status-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-muted);
    opacity: 0.5;
}

.status-message-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.status-message-text {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   Generate Section
   ======================================== */
.generate-section {
    animation: fadeIn 0.5s ease;
}

.generate-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid var(--primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    text-align: center;
}

.generate-header {
    margin-bottom: var(--spacing-xl);
}

.generate-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.generate-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ========================================
   Loading Section
   ======================================== */
.loading-section {
    animation: fadeIn 0.5s ease;
}

.loading-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    text-align: center;
}

.loading-spinner {
    margin-bottom: var(--spacing-xl);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.loading-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.loading-progress {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-dark);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   Result Section
   ======================================== */
.result-section {
    animation: fadeIn 0.5s ease;
}

.result-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
}

.result-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.result-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(135deg, var(--success) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon svg {
    width: 32px;
    height: 32px;
    color: white;
    stroke-width: 2.5;
}

.result-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.result-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.result-player {
    margin-bottom: var(--spacing-xl);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-right {
    display: flex;
    gap: var(--spacing-xl);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--text-primary);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .studio-grid {
        grid-template-columns: 1fr;
    }
    
    .track-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}

/* ========================================
   Chatbot Styles
   ======================================== */

.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(138, 43, 226, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.chatbot-trigger:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 32px rgba(138, 43, 226, 0.6);
}

.chatbot-trigger .note-icon {
    width: 40px;
    height: 40px;
    color: white;
}

.chatbot-window {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 400px;
    max-width: calc(100vw - 60px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: rgba(10, 10, 15, 0.98);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.chatbot-window.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(186, 85, 211, 0.2));
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.note-icon-small {
    width: 35px;
    height: 35px;
    color: var(--primary-color);
}

.chatbot-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.chatbot-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.chatbot-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.5);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.bot-message .message-content {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(186, 85, 211, 0.15));
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: white;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    border-top: 1px solid rgba(138, 43, 226, 0.3);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 20px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chatbot-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.5);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-send-btn svg {
    width: 20px;
    height: 20px;
}

.chat-typing {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile responsive chatbot */
@media (max-width: 768px) {
    .chatbot-trigger {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-trigger .note-icon {
        width: 32px;
        height: 32px;
    }
    
    .chatbot-window {
        bottom: 90px;
        right: 20px;
        width: calc(100vw - 40px);
        height: 500px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1a1d29 0%, #1e2130 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.3);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #2d1b4e 0%, #3d2560 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.modal-close {
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 2.5rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    background: #1a1d29;
}

.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid #1a1d29;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7d8ff5 0%, #8b5cb8 100%);
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h3 {
    color: #8b9aff;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 1rem;
}

.about-section h4 {
    color: #a8b5ff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-section p {
    color: #b8c1ec;
    line-height: 1.9;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.about-section ul {
    color: #b8c1ec;
    line-height: 1.9;
    padding-left: 2rem;
}

.about-section li {
    margin-bottom: 0.8rem;
}

.about-section strong {
    color: #c8d1ff;
    font-weight: 600;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: #667eea;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.step-content p {
    margin: 0;
    color: #b8c1ec;
}

.interface-step {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(37, 41, 56, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.interface-image-container {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.interface-image {
    width: 100%;
    height: auto;
    display: block;
}

.interface-description {
    margin-top: 1.5rem;
}

.interface-description p {
    margin-bottom: 1.2rem;
    padding-left: 1rem;
    border-left: 3px solid rgba(102, 126, 234, 0.5);
    color: #b8c1ec;
}

.ui-guide {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ui-item {
    background: rgba(37, 41, 56, 0.5);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ui-item strong {
    color: #8b9aff;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.5rem;
}

.ui-item p {
    margin: 0;
    color: #b8c1ec;
    font-size: 0.95rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tip-card {
    background: rgba(37, 41, 56, 0.6);
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: left;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.tip-card strong {
    color: #8b9aff;
    font-size: 1.15rem;
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.tip-card p {
    margin: 0;
    color: #b8c1ec;
    font-size: 0.95rem;
    line-height: 1.7;
}

.modal-footer {
    background: rgba(37, 41, 56, 0.8);
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(102, 126, 234, 0.3);
}

.modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-width: 100%;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .about-section h3 {
        font-size: 1.4rem;
    }

    .about-section h4 {
        font-size: 1.1rem;
    }

    .interface-step {
        padding: 1.5rem;
    }

    .interface-description p {
        padding-left: 0.5rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* Examples Modal Styles */
.example-container {
    margin-top: 2rem;
}

.example-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.example-output {
    margin-bottom: 1.5rem;
}

.example-track {
    background: rgba(20, 24, 36, 0.4);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.example-track:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(20, 24, 36, 0.6);
}

.example-track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.example-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b9aff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.output-label {
    color: #00d4aa;
}

.example-duration {
    font-size: 0.85rem;
    color: #b8c1ec;
    opacity: 0.7;
}

.example-waveform {
    width: 100%;
    height: 80px;
    background: rgba(10, 12, 20, 0.6);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: block;
}

.example-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.example-controls .btn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.example-controls .btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.example-controls .btn-icon:active {
    transform: scale(0.95);
}

.example-controls .btn-icon svg {
    width: 16px;
    height: 16px;
}

.example-controls .time-display {
    font-size: 0.85rem;
    color: #b8c1ec;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.example-controls .time-separator {
    opacity: 0.5;
}

.example-controls .volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.example-controls .icon-volume {
    width: 20px;
    height: 20px;
    color: #8b9aff;
}

.example-controls .volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(139, 154, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.example-controls .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8b9aff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-controls .volume-slider::-webkit-slider-thumb:hover {
    background: #a5b8ff;
    transform: scale(1.2);
}

.example-controls .volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8b9aff;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.example-controls .volume-slider::-moz-range-thumb:hover {
    background: #a5b8ff;
    transform: scale(1.2);
}

.example-description {
    color: #b8c1ec;
    line-height: 1.6;
    font-size: 0.95rem;
    padding: 1rem;
    background: rgba(139, 154, 255, 0.05);
    border-left: 3px solid #667eea;
    border-radius: 4px;
}

.modal-close-examples {
    color: #b8c1ec;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-examples:hover,
.modal-close-examples:focus {
    color: #ffffff;
    text-decoration: none;
}

/* Examples Modal Mobile Styles */
@media (max-width: 768px) {
    .example-inputs {
        grid-template-columns: 1fr;
    }
    
    .example-waveform {
        height: 60px;
    }
    
    .example-controls .volume-control {
        display: none;
    }
    
    /* Mobile header optimization - make very compact */
    .header-content {
        padding: 0.5rem 0;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1rem;
        gap: 0.3rem;
        flex-shrink: 0;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
    }
    
    .nav {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.75rem;
        flex-wrap: nowrap;
    }
    
    .nav-link {
        padding: 0.3rem 0.5rem;
        white-space: nowrap;
    }
    
    .language-selector {
        margin-left: 0;
    }
    
    .lang-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-width: 45px;
    }
    
    /* Chatbot positioning for mobile - bottom center like typical chat apps */
    .chatbot-trigger {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-trigger .note-icon {
        width: 26px;
        height: 26px;
    }
    
    .chatbot-window {
        bottom: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 65vh;
        max-height: 450px;
    }
}

/* ========================================
   Search Mode Buttons
   ======================================== */
.search-mode-btn {
    transition: all 0.2s ease;
}

.search-mode-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.search-mode-btn.active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}
