/* SonikSplit - Matching SonikStation Design System */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* SonikStation Color Palette */
    --primary-color: #0d69f2;
    --primary-dark: #0b68f4;
    --primary-light: #3e87f4;
    --secondary-color: #1e4ed8;
    --accent-color: #3d87f5;
    --success-color: #10b981;
    --danger-color: #ef4444;
    
    /* Dark Theme Colors */
    --bg-dark: #020408;
    --bg-medium: #0f273e;
    --bg-light: #1a3a5c;
    --bg-card: rgba(15, 39, 62, 0.5);
    
    /* Text Colors */
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Border Colors */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(13, 105, 242, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0d69f2 0%, #1e4ed8 100%);
    --gradient-bg: linear-gradient(180deg, rgba(15, 39, 62, 0.5) 0%, rgba(11, 63, 142, 0.75) 120%);
    --gradient-text: radial-gradient(80% 125% at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(82, 105, 137, 0.9) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(13, 105, 242, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(30, 78, 216, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(61, 135, 245, 0.05) 0%, transparent 50%);
}

/* Grid Pattern Background (subtle) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header with SonikStation branding */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logo {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 20px rgba(13, 105, 242, 0.3);
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.powered-by {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(13, 105, 242, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.powered-by strong {
    color: var(--primary-color);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Upload Section */
.upload-section {
    width: 100%;
    max-width: 600px;
    animation: fadeIn 1s ease;
}

/* Model Selection - SonikStation style */
.model-selection {
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.model-selection h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-primary);
}

.model-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.model-option {
    background: var(--gradient-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.model-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 105, 242, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-option:hover:not(.disabled) {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 105, 242, 0.2);
}

.model-option:hover:not(.disabled)::before {
    opacity: 1;
}

.model-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(13, 105, 242, 0.15) 0%, rgba(30, 78, 216, 0.1) 100%);
    box-shadow: 0 0 20px rgba(13, 105, 242, 0.2);
}

.model-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.model-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.coming-soon {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.model-option p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.model-stems {
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.model-stems strong {
    color: var(--text-primary);
}

.stems-list {
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* Upload Area - SonikStation style */
.upload-area {
    background: var(--gradient-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(13, 105, 242, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(13, 105, 242, 0.15);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(13, 105, 242, 0.1);
    box-shadow: 0 0 30px rgba(13, 105, 242, 0.3);
}

.upload-icon {
    width: 4rem;
    height: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-types {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Processing Section */
.processing-section {
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.5s ease;
}

.processing-card {
    background: var(--gradient-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.file-icon {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

.file-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

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

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(13, 105, 242, 0.5);
}

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

/* Results Section */
.results-section {
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.results-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stems-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stem-card {
    background: var(--gradient-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(13, 105, 242, 0.2);
    border-color: var(--border-hover);
}

.stem-card:hover::before {
    transform: scaleX(1);
}

.stem-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stem-icon svg {
    width: 100%;
    height: 100%;
}

/* Stem colors matching SonikStation theme */
.stem-icon.vocals {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.stem-icon.drums {
    background: rgba(13, 105, 242, 0.2);
    color: var(--primary-color);
}

.stem-icon.bass {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.stem-icon.other {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.stem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stem-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.stem-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.play-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.play-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(13, 105, 242, 0.4);
}

.play-btn.playing {
    background: var(--primary-color);
    border-color: var(--primary-color);
    animation: pulse 2s infinite;
}

.download-btn {
    flex: 1;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(13, 105, 242, 0.3);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 105, 242, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(13, 105, 242, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.btn-secondary svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(13, 105, 242, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(13, 105, 242, 0);
    }
}

/* Audio Visualizers */
/* Audio Visualizations */
.audio-spectrum {
    width: 100%;
    height: 120px;
    background: var(--bg-dark);
    border-radius: 0.5rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-color);
    display: none;
    position: relative;
    overflow: hidden;
}

.audio-spectrum.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Spectrum Canvas */
.spectrum-canvas {
    width: 100%;
    height: 100%;
    border-radius: 0.25rem;
    position: absolute;
    top: 0;
    left: 0;
}

.spectrum-info {
    position: absolute;
    top: 2px;
    left: 2px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.6rem;
    height: 0.8rem;
    display: flex;
    align-items: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    z-index: 10;
}

/* Waveform Seeker */
.waveform-seeker {
    width: 100%;
    height: 80px;
    background: var(--bg-dark);
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    display: none;
    position: relative;
    cursor: pointer;
}

.waveform-seeker.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.waveform-seeker:hover {
    border-color: var(--primary-color);
}

.waveform-canvas {
    width: calc(100% - 1rem);
    height: calc(100% - 1.5rem);
    border-radius: 0.25rem;
    background: var(--bg-light);
    position: absolute;
    top: 1.5rem;
    left: 0.5rem;
}

.seek-indicator {
    position: absolute;
    top: 1.5rem;
    left: 0.5rem;
    width: 2px;
    height: calc(100% - 1.5rem);
    background: var(--primary-color);
    opacity: 0.9;
    pointer-events: none;
    transition: left 0.1s ease;
    z-index: 10;
}

.waveform-time {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 1.5rem;
    align-items: center;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

/* Stem card specific spectrum */
.stem-card {
    position: relative;
}

.stem-card .audio-spectrum {
    margin-top: 0.5rem;
}

/* Spectrum bars animation */
@keyframes spectrumPulse {
    0%, 100% { transform: scaleY(0.1); }
    50% { transform: scaleY(1); }
}

.spectrum-bar {
    animation: spectrumPulse 0.5s ease-in-out infinite;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-bg);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    z-index: 1000;
    border-left: 4px solid var(--primary-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stems-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .model-options {
        grid-template-columns: 1fr;
    }
    
    .model-option {
        padding: 1rem;
    }
}
