/* ============================================
   Splitter - Audio Stem Separation App
   Modern Dark Theme with Glassmorphism
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    --success: #10b981;
    --error: #ef4444;
    --vocals: #f472b6;
    --drums: #f59e0b;
    --bass: #3b82f6;
    --music: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

/* Header */
header {
    margin-bottom: 3rem;
}

.logo {
    font-size: 4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.free-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    }
}

/* Upload Zone */
.upload-zone {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 2px dashed var(--border-glass);
    border-radius: 24px;
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.upload-icon {
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-formats {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Processing State */
.processing-state {
    padding: 4rem 2rem;
}

.spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: var(--accent-secondary);
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: #a855f7;
    animation-duration: 0.9s;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.processing-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.processing-message {
    color: var(--accent-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.processing-note {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Complete State */
.complete-state {
    padding: 3rem 2rem;
}

.success-icon {
    color: var(--success);
    margin-bottom: 1.5rem;
}

.complete-state h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.complete-filename {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.stems-info {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.stems-list {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.stem-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.stem-badge.vocals {
    background: rgba(244, 114, 182, 0.2);
    color: var(--vocals);
}

.stem-badge.drums {
    background: rgba(245, 158, 11, 0.2);
    color: var(--drums);
}

.stem-badge.bass {
    background: rgba(59, 130, 246, 0.2);
    color: var(--bass);
}

.stem-badge.music {
    background: rgba(16, 185, 129, 0.2);
    color: var(--music);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.new-file-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-file-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

/* Error State */
.error-state {
    padding: 4rem 2rem;
}

.error-icon {
    color: var(--error);
    margin-bottom: 1.5rem;
}

.error-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--error);
    margin-bottom: 2rem;
}

.retry-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .logo {
        font-size: 3rem;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .upload-zone {
        padding: 3rem 1.5rem;
    }

    .stems-list {
        gap: 0.5rem;
    }

    .stem-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}