/* Universal Audio Tools - Light Theme */

/* Upload Section */

/* Dark mode overrides */
[data-theme="dark"] {
    --tool-bg: #0f172a;
    --tool-border: #334155;
    --tool-border-hover: #475569;
    --tool-text: #f8fafc;
    --tool-text-secondary: #94a3b8;
    --tool-input-bg: #1e293b;
    --tool-input-border: #334155;
    --tool-button-bg: #1e293b;
    --tool-button-hover: #334155;
    --tool-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --tool-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --background-color: #0f172a;
    --text-color: #f8fafc;
    --status-info: rgba(96, 165, 250, 0.2);
    --status-success: rgba(34, 197, 94, 0.2);
    --status-error: rgba(248, 113, 113, 0.2);
    --bg-color: #0f172a;
}

/* Dark mode element overrides */
[data-theme="dark"] .tool-card {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .tool-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--input-bg, #1e293b);
    color: var(--text-primary, #f8fafc);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .tab-btn.active {
    color: white;
}

[data-theme="dark"] label {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] p {
    color: var(--text-secondary, #cbd5e1);
}
.upload-section {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.upload-header {
    margin-bottom: 1.5rem;
}

.upload-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.file-info, .file-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.upload-area.dragover {
    border-color: var(--primary-hover);
    background: var(--bg-tertiary);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

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

.upload-formats, .upload-note {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.add-more-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-add-more, .btn-clear-all {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: var(--bg-primary);
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-clear-all {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-add-more:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.btn-clear-all:hover {
    background: #e74c3c;
    color: var(--bg-primary);
}

/* Main Sections */
.speed-section, .tracklist-section, .merge-section, .analysis-section, .effects-section, .silence-section, .noise-section {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.speed-header, .tracklist-header, .merge-header, .analysis-header, .effects-header, .silence-header, .noise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.speed-header h3, .tracklist-header h3, .merge-header h3, .analysis-header h3, .effects-header h3, .silence-header h3, .noise-header h3 {
    color: var(--text-primary);
    margin: 0;
}

/* Controls */
.audio-controls, .merge-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-play, .btn-stop, .btn-play-modified, .btn-play-all, .btn-export, .btn-snapshot, .btn-preview {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: var(--bg-primary);
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-play:hover, .btn-stop:hover, .btn-play-modified:hover, .btn-play-all:hover, .btn-export:hover, .btn-snapshot:hover, .btn-preview:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.btn-export {
    border-color: var(--success-color);
    color: var(--success-color);
}

.btn-export:hover {
    background: var(--success-color);
}

/* Speed Controls */
.speed-controls, .effects-controls, .silence-controls, .noise-controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.control-group, .option-group {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.control-title, .option-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: block;
}

.speed-slider-container, .pitch-slider-container, .slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.speed-slider-container input, .pitch-slider-container input, .slider-container input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.speed-slider-container input::-webkit-slider-thumb, .pitch-slider-container input::-webkit-slider-thumb, .slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.speed-display, .pitch-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.speed-value, .pitch-value, .slider-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    min-width: 80px;
    text-align: center;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.speed-presets, .pitch-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.preset-btn:hover, .preset-btn.active {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
}

.control-help, .setting-help {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Mode Selection */
.mode-selection {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.radio-option input[type="radio"] {
    margin-right: 0.5rem;
}

.radio-label {
    color: var(--text-primary);
    font-weight: 500;
}

.radio-option small {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 1.5rem;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.checkbox-option input[type="checkbox"] {
    margin-right: 0.5rem;
}

.checkbox-label {
    color: var(--text-primary);
    font-weight: 500;
}

.checkbox-option small {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 1.5rem;
}

/* Info Cards and Stats */
.preview-info, .merge-stats, .modification-stats, .processed-stats {
    margin-top: 2rem;
}

.info-cards, .track-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.info-card, .stat-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.info-label, .stat-item span:first-child {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.info-value, .stat-item span:last-child {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: bold;
}

/* Track List */
.tracks-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.track-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.track-name {
    color: var(--text-primary);
    font-weight: 500;
}

.track-duration {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.track-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-track-play, .btn-track-remove {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-track-remove {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-track-play:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
}

.btn-track-remove:hover {
    background: #e74c3c;
    color: var(--bg-primary);
}

/* Waveform */
.waveform-container {
    background: var(--text-primary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
}

#waveformCanvas {
    width: 100%;
    border-radius: 4px;
    background: #34495e;
}

.waveform-info {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--bg-tertiary);
    font-size: 0.9rem;
}

/* Export Section */
.export-section {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.export-header h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

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

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.setting-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.export-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-process, .btn-download {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-process {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--bg-primary);
}

.btn-process:hover {
    background: linear-gradient(135deg, var(--primary-hover), #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-download {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: var(--bg-primary);
}

.btn-download:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.processed-audio-player {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.processed-audio-player h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.processed-audio-player audio {
    width: 100%;
    margin-bottom: 1rem;
}

/* Progress Indicators */
.progress-container {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .speed-header, .tracklist-header, .merge-header, .analysis-header, .effects-header, .silence-header, .noise-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .speed-display, .pitch-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-actions {
        flex-direction: column;
    }
    
    .btn-process, .btn-download {
        justify-content: center;
    }
    
    .track-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .track-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .upload-section, .speed-section, .tracklist-section, .merge-section, .export-section, .analysis-section, .effects-section, .silence-section, .noise-section {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .control-group, .option-group, .mode-selection {
        padding: 1rem;
    }
    
    .speed-presets, .pitch-presets {
        justify-content: center;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
}

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

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }


/* Tool Hero Meta Pills */
.tool-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.meta-pill {
    background: rgba(236, 72, 153, 0.12);
    color: #831843;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: 1px solid rgba(236, 72, 153, 0.25);
}

/* Features Section */
.features-section {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    padding: 4rem 0;
    margin: 3rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: var(--bg-primary);
    border: 1px solid #f9a8d4;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ec4899, #f472b6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.15);
    border-color: #ec4899;
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.feature-item:hover .feature-icon {
    filter: grayscale(0);
}

.feature-item h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.feature-item:hover h4 {
    color: #ec4899;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}



