:root {
    --bg-color: #0a0a0a;
    --surface-color: #141414;
    --surface-light: #222;
    --primary-color: #a3ff00; /* Neon Lime Green */
    --primary-glow: rgba(163, 255, 0, 0.4);
    --danger-color: #ff4444;
    --text-color: #ffffff;
    --text-muted: #888899;
    --border-color: #333;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, rgba(163, 255, 0, 0.08) 0%, transparent 70%);
}

.app-container {
    width: 100%;
    max-width: 1150px;
    padding: 2.5rem;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(163, 255, 0, 0.1);
}

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

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.badge {
    font-size: 1rem;
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 800;
    box-shadow: 0 0 15px var(--primary-glow);
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-glow);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(163, 255, 0, 0.05);
    box-shadow: 0 0 40px rgba(163, 255, 0, 0.1) inset;
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    pointer-events: none;
}

.drop-content p {
    font-size: 1.2rem;
    font-weight: 600;
}

.drop-content svg {
    color: var(--primary-color);
    filter: drop-shadow(0 0 15px var(--primary-glow));
    transition: var(--transition);
}

.drop-zone:hover .drop-content svg {
    transform: translateY(-10px) scale(1.1);
}

.hidden {
    display: none !important;
}

.editor {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    position: relative;
    align-items: flex-start;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 600px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-small {
    padding: 0.4rem;
    border-radius: 8px;
    background: var(--surface-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: inline-flex;
    transition: var(--transition);
}

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

.file-list {
    list-style: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-right: 0.5rem;
}

.file-list::-webkit-scrollbar {
    width: 6px;
}
.file-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface-light);
    border: 1px solid transparent;
    position: relative;
}

.file-item:hover {
    border-color: rgba(163, 255, 0, 0.3);
}

.file-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(163, 255, 0, 0.1);
}

.file-item.done {
    opacity: 0.4;
    filter: grayscale(1);
}

.file-item span {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-delete:hover {
    color: var(--danger-color);
    background: rgba(255, 68, 68, 0.1);
}

/* Custom Checkbox */
.file-item input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.file-item input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.file-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 10px;
    border: solid var(--bg-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.main-editor {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.waveform-container {
    background: var(--surface-light);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.zoom-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.pro-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    background: transparent;
    height: 4px;
}

.pro-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
}

.pro-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.controls-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-color);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.time-display {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-color);
    letter-spacing: 1px;
}

.time-display span:last-child {
    color: var(--text-muted);
}

.precise-controls {
    display: flex;
    gap: 1rem;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-light);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.input-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.time-input {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    width: 80px;
    outline: none;
    font-variant-numeric: tabular-nums;
}

.pro-export-panel {
    background: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pro-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pro-col {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pro-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.pro-checkbox:hover {
    color: var(--text-color);
}

.pro-checkbox input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.gain-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

#gain-label {
    color: var(--primary-color);
}

.pro-select {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.pro-col > label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.export-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.filename-input {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    flex-grow: 1;
    outline: none;
    transition: var(--transition);
}

.filename-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(163, 255, 0, 0.15);
}

.filename-input::placeholder {
    color: var(--text-muted);
}

.format-toggle {
    display: flex;
    background: var(--surface-light);
    border-radius: 12px;
    overflow: hidden;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.format-toggle input {
    display: none;
}

.format-toggle label {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-muted);
}

.format-toggle input:checked + label {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-color);
    outline: none;
}

.btn-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    gap: 0.5rem;
    box-shadow: 0 0 20px var(--primary-glow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    box-shadow: 0 0 35px var(--primary-glow);
    transform: translateY(-3px);
}

.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px var(--primary-glow);
}

#loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1000px) {
    .editor {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        max-height: 250px;
    }
    .controls-panel, .export-actions, .pro-options {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .export-actions {
        align-items: stretch;
    }
}
