:root {
    --bg-primary: #0a0a0a;
    --bg-card: #161616;
    --accent: #d4af37;
    --danger: #ff4444;
    --text: #ffffff;
    --text-dim: #888888;
    --font-main: 'Inter', sans-serif;
}

/* Stylized Scrollbar */
.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: #050505;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background: radial-gradient(circle at center, #1a1508 0%, #0a0a0a 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-container {
    display: flex;
    background: var(--bg-card);
    border-radius: 24px;
    width: 1100px;
    height: 780px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.5);
    /* INTENSIFIED GOLDEN HALO */
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.3),
        0 0 80px rgba(212, 175, 55, 0.1),
        0 30px 60px rgba(0, 0, 0, 0.9);
}

.player-section {
    flex: 0 0 450px;
    padding: 30px;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: #121212;
}

.playlist-section {
    flex: 1;
    padding: 30px;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section-header {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--text-dim);
}

.playlist-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.album-meta-row {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--accent);
    text-transform: uppercase;
}

.player-main-content {
    text-align: center;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.text-info-container {
    width: 100%;
    max-width: 380px;
    margin-top: 20px;
    text-align: center;
}

#file-name {
    color: var(--accent);
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

#artist-name {
    color: var(--text-dim);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 1.2rem;
}

.badge-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.badge-format {
    display: inline-block;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 9px;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.hifi-font {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.progress-container, .volume-container {
    width: 100%;
    background: #000;
    height: 6px;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.volume-container {
    overflow: visible;
    cursor: grab;
    transform-origin: center;
    transition: transform 0.15s ease;
}

.volume-container:hover {
    transform: scaleY(1.5);
}

.volume-container:active {
    cursor: grabbing;
    transform: scaleY(1.8);
}

.volume-bar {
    transition: width 0.04s linear;
    border-radius: 10px;
}

.progress-bar, .volume-bar {
    height: 100%;
    background: var(--accent);
    position: absolute;
}

.main-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin: 15px 0;
}

.play-pause-btn {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    width: 140px;
    height: 44px;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.play-pause-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.nav-btn-alt {
    background: #1f1f1f;
    color: var(--text-dim);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #333;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btn-alt:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
}

.visualizer-container {
    width: 100%;
    height: 55px;
    margin: 10px 0;
    background: transparent;
}

#visualizer {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-controls {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.nav-btn {
    background: #1f1f1f;
    color: var(--text-dim);
    flex: 1;
    height: 40px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 800;
    border: 1px solid #333;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    overflow: hidden;
}

.nav-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
}

.vu-active, .shuffle-active, .mute-active, .rep-one, .rep-all, .ab-active {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background: rgba(212, 175, 55, 0.15) !important;
}

.playlist-items {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

.playlist-item {
    padding: 12px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-item.active {
    color: var(--accent);
    background: rgba(212, 175, 55, 0.05);
}

.upload-btn {
    background: var(--accent);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.clear-btn {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    margin-left: 8px;
}

/* ===================== EQ PANEL ===================== */
.app-container {
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.eq-open {
    width: 1460px;
}

.eq-section {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.35s;
    background: #0d0d0d;
    border-left: 1px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.eq-section.open {
    width: 360px;
    opacity: 1;
    padding: 30px 20px;
}

.eq-curve-canvas {
    width: 100%;
    height: 90px;
    background: #080808;
    border: 1px solid #222;
    border-radius: 8px;
    margin-bottom: 18px;
    display: block;
}

.eq-bands {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    width: 100%;
    justify-content: center;
    height: 160px;
    position: relative;
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.eq-gain-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.5px;
    height: 12px;
    line-height: 12px;
    min-width: 20px;
    text-align: center;
}

.eq-freq-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
}

/* Vertical slider */
.eq-slider {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 22px;
    height: 120px;
    cursor: pointer;
    accent-color: var(--accent);
    background: transparent;
}

.eq-slider::-webkit-slider-runnable-track {
    width: 4px;
    background: #222;
    border-radius: 4px;
}

.eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
    cursor: grab;
}

.eq-slider:active::-webkit-slider-thumb {
    cursor: grabbing;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
}

.eq-db-scale {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    height: 120px;
    justify-content: space-between;
    pointer-events: none;
}

.eq-db-scale span {
    font-size: 7px;
    color: #444;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.eq-presets {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #1a1a1a;
}

.eq-preset-btn {
    flex: 1;
    height: 28px;
    background: #1a1a1a;
    color: var(--text-dim);
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    margin-top: 10px;
}

.eq-preset-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.08);
}

.eq-preset-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.15);
}

/* Bass / Treble / Loudness */
.eq-bottom-controls {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #1a1a1a;
    padding-top: 16px;
    flex-shrink: 0;
}

.eq-knob-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 24px;
    /* hauteur fixe immuable */
}

.eq-knob-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    width: 50px;
    flex-shrink: 0;
    line-height: 24px;
}

.eq-knob-slider-wrap {
    flex: 1;
    height: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.eq-knob-slider {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: #222;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    border: none;
    margin: 0;
    padding: 0;
}

.eq-knob-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
    cursor: grab;
}

.eq-knob-slider:active::-webkit-slider-thumb {
    cursor: grabbing;
}

.eq-knob-slider::-moz-range-track {
    height: 4px;
    background: #222;
    border-radius: 4px;
}

.eq-knob-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
    cursor: grab;
}

.eq-knob-value {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent);
    width: 38px;
    flex-shrink: 0;
    text-align: right;
    letter-spacing: 0.5px;
    line-height: 24px;
}

.eq-loudness-group {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

.eq-loudness-group .nav-btn {
    flex: 1;
}

.loudness-active {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background: rgba(212, 175, 55, 0.15) !important;
}

.art-wrapper {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
    margin: 0 auto;
}

#album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}