:root {
    --bg-color: #0f1115;
    --card-bg: #1a1d23;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent: #646cff;
    --accent-hover: #535bf2;
    --border: #2e323b;
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.05rem;
    margin-bottom: 0.5rem;
}

.badge {
    background-color: var(--accent);
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    font-weight: 600;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background-color: rgba(100, 108, 255, 0.05);
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.drop-zone .label {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.drop-zone .sub-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.drop-zone.has-file {
    border-style: solid;
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.05);
}

/* Controls */
.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -6px;
    cursor: pointer;
    transition: background 0.2s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-hover);
}

.value-display {
    font-size: 0.9rem;
    color: var(--accent);
    font-family: monospace;
}

/* Actions */
.action-section {
    text-align: center;
    margin-bottom: 2rem;
}

.primary-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    max-width: 300px;
}

.primary-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

.primary-btn:disabled {
    background-color: var(--border);
    cursor: not-allowed;
    color: var(--text-secondary);
}

select {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

select:focus {
    border-color: var(--accent);
}

.secondary-btn {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: var(--accent);
    color: white;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    margin: 1rem auto 0;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent);
    transition: width 0.1s linear;
}

.status-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 1.5rem;
}

/* Results */
.hidden {
    display: none;
}

.result-player {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.result-player:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

audio {
    width: 100%;
    margin-bottom: 0.5rem;
    filter: invert(1) hue-rotate(180deg);
    /* Dark mode audio player hack */
}

.spectrogram {
    width: 100%;
    height: 150px;
    background-color: #000;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 4rem;
}