/* SoundCheck - Modern Dark Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --error: #f56565;
    --bg-dark: #1a202c;
    --bg-darker: #0f1419;
    --bg-light: #2d3748;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border: #4a5568;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    padding: 40px 0;
}

.logo h1 {
    font-size: 3em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2em;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--border);
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-area h2 {
    margin-bottom: 10px;
}

.file-info {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 10px;
}

.file-name {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    text-align: center;
    color: var(--primary);
    font-weight: bold;
}

/* Mode Selection */
.mode-selection {
    margin-top: 30px;
}

.mode-selection h3 {
    text-align: center;
    margin-bottom: 20px;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-primary);
    font-size: 1em;
}

.mode-btn:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.mode-btn.active {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.2);
}

.mode-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.mode-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.mode-desc {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* Parameters Section */
.parameters-section {
    margin: 30px 0;
    padding: 30px;
    background: var(--bg-dark);
    border-radius: 15px;
    border: 2px solid var(--border);
}

.parameters-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
}

.parameter {
    margin-bottom: 25px;
}

.parameter label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.param-name {
    color: var(--text-primary);
}

.param-value {
    color: var(--primary);
    font-weight: bold;
}

.parameter input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--bg-darker);
    outline: none;
    -webkit-appearance: none;
}

.parameter input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    transition: all 0.3s ease;
}

.parameter input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.8);
}

.parameter input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.parameter input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.8);
}

.param-hint {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 5px;
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    min-width: 200px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
    min-width: auto;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

/* Progress */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--bg-dark);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.progress-text {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
}

.status-message {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 20px;
}

.warning {
    text-align: center;
    color: #f6ad55;
    margin-top: 20px;
    padding: 15px;
    background: rgba(246, 173, 85, 0.1);
    border-radius: 10px;
}

/* Audio Comparison */
.audio-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.audio-player {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.audio-player h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.audio-player audio {
    width: 100%;
    border-radius: 10px;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.result-actions .btn {
    margin: 0;
}

/* Reprocess Section */
.reprocess-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.reprocess-section h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary);
}

.reprocess-hint {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.reprocess-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.reprocess-buttons .btn {
    margin: 0;
}

/* Error */
.error-message {
    background: rgba(245, 101, 101, 0.2);
    border: 2px solid var(--error);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    color: var(--error);
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2em;
    }

    .section {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .mode-buttons {
        grid-template-columns: 1fr;
    }

    .audio-comparison {
        grid-template-columns: 1fr;
    }
}
