* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0b0c1a, #1a1b2f);
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(30, 32, 58, 0.8);
    backdrop-filter: blur(10px);
    padding: 40px 50px;
    border-radius: 30px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.08);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
    background: linear-gradient(90deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    text-align: center;
    color: #aaa;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #ccc;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    background: #1e2040;
    border: 1px solid #3a3c5a;
    border-radius: 12px;
    color: #eee;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #3a3c5a;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f7971e;
    margin-top: -6px;
    cursor: pointer;
}

input[type="range"]:focus {
    outline: none;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #f7971e;
}

.checkbox label {
    margin-bottom: 0;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #f7971e, #ffd200);
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0b0c1a;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(247, 151, 30, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#status {
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    color: #ffd200;
}

#result {
    margin-top: 20px;
    text-align: center;
}

/* Плеер и волна */
#waveform-container {
    background: #1a1b2f;
    border-radius: 16px;
    padding: 15px 10px;
    margin: 10px 0;
    border: 1px solid #3a3c5a;
}

#waveform {
    width: 100%;
    height: 100px;
    cursor: pointer;
}

.wave-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.wave-controls button {
    background: rgba(247, 151, 30, 0.2);
    border: 1px solid #f7971e;
    color: #f7971e;
    padding: 5px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    width: auto;
}
.wave-controls button:hover {
    background: rgba(247, 151, 30, 0.4);
}

#currentTime, #duration {
    font-family: monospace;
    font-size: 1rem;
    color: #ccc;
}

.region-info {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #aaa;
    justify-content: center;
}

.region-info strong {
    color: #ffd200;
}

#resetRegionBtn {
    background: rgba(255, 50, 50, 0.2) !important;
    border-color: #ff4444 !important;
    color: #ff4444 !important;
}
#resetRegionBtn:hover {
    background: rgba(255, 50, 50, 0.4) !important;
}

.preview-container img {
    display: block;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #3a3c5a;
    max-width: 200px;
}

@media (max-width: 600px) {
    .container {
        padding: 25px 20px;
    }
    h1 {
        font-size: 1.6rem;
    }
}