:root {
    --bg: #0f131a;
    --bg-soft: #151b23;
    --text: #e7edf7;
    --muted: #98a8be;
    --accent: #3c82ff;
    --accent-dark: #2f6ad1;
    --card: #1a212c;
    --error: #ff5e6a;
    --shadow-dark: #0a0d12;
    --shadow-light: #253041;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(
        circle at 20% 10%,
        #19212d 0%,
        var(--bg) 45%,
        #0a0d12 100%
    );
    color: var(--text);
}

.container {
    max-width: 980px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1.15rem;
    box-shadow:
        10px 10px 20px var(--shadow-dark),
        -8px -8px 18px rgba(52, 68, 89, 0.45),
        inset 1px 1px 0 rgba(255, 255, 255, 0.04);
}

h1,
h2 {
    margin-top: 0;
}

.subtitle {
    margin-top: 0;
    color: var(--muted);
}

.label {
    display: block;
    margin: 0.8rem 0 0.35rem;
    font-weight: 600;
}

input[type="file"],
select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--text);
    box-shadow:
        inset 4px 4px 10px #10151d,
        inset -4px -4px 10px #202937;
}

button {
    margin-top: 1rem;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        8px 8px 14px #0d1118,
        -6px -6px 12px rgba(72, 96, 125, 0.25);
    transition:
        background 0.2s ease,
        transform 0.12s ease;
}

button:hover:enabled {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status {
    min-height: 1.5rem;
    margin-top: 0.75rem;
    color: var(--muted);
}

.status.error {
    color: var(--error);
}

.result {
    min-height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.8rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #121821;
    box-shadow:
        inset 5px 5px 12px #0b0f15,
        inset -4px -4px 10px rgba(49, 63, 83, 0.35);
}

.player-wrap {
    margin-top: 0.9rem;
}

.player-wrap audio {
    width: 100%;
    border-radius: 10px;
    background: var(--bg-soft);
    box-shadow:
        inset 3px 3px 8px #0f141b,
        inset -3px -3px 8px #222c3a;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.actions button {
    margin-top: 0;
}

@media (max-width: 700px) {
    .actions {
        grid-template-columns: 1fr;
    }
}
