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

        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3));
            color: var(--text-color);
            overflow-x: hidden;
            min-height: 100vh;
        }

        .dj-container {
            display: grid;
            grid-template-rows: auto 1fr;
            height: 100vh;
            gap: 10px;
            padding: 10px;
        }

        .header {
            background: var(--header-bg);
            padding: 15px;
            border-radius: 10px;
            backdrop-filter: blur(10px);
            text-align: center;
        }

        .header h1 {
            font-size: 2rem;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr 200px 1fr;
            gap: 15px;
            min-height: 0;
        }

        .deck {
            background: var(--deck-bg);
            border-radius: 15px;
            padding: 20px;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .deck-header {
            text-align: center;
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--highlight-color);
        }

        .track-info {
            background: rgba(0,0,0,0.3);
            padding: 15px;
            border-radius: 10px;
            min-height: 80px;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .album-art {
            width: 50px;
            height: 50px;
            background: #333;
            border-radius: 5px;
            object-fit: cover;
        }

        .track-details {
            flex: 1;
        }

        .track-title {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .track-artist {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .file-input-wrapper {
            position: relative;
            overflow: hidden;
            display: inline-block;
            width: 100%;
        }

        .file-input {
            display: none;
        }

        .file-button {
            background: linear-gradient(45deg, #ff6b6b, #ff8e53);
            border: none;
            color: white;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 0.9rem;
            width: 100%;
            transition: transform 0.2s;
        }

        .file-button:hover {
            transform: scale(1.05);
        }

        .controls {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .control-btn {
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            padding: 10px 15px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.9rem;
        }

        .control-btn:hover {
            background: rgba(255,255,255,0.2);
            transform: scale(1.05);
        }

        .control-btn.active {
            background: var(--highlight-color);
            box-shadow: 0 0 15px var(--highlight-color);
        }

        .controls-vu-container {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .controls-vu-container .controls {
            flex: 1;
        }

        .controls-vu-container .vu-meter-stereo {
            flex: 0 0 100px; /* Don't grow, don't shrink, base width 100px */
            height: 60px;
        }

        .progress-container {
            background: rgba(0,0,0,0.3);
            height: 40px;
            border-radius: 20px;
            position: relative;
            cursor: pointer;
            overflow: hidden;
        }

        .seek-tooltip {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.8rem;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 0.2s;
            pointer-events: none;
            z-index: 10;
        }

        .progress-container:hover .seek-tooltip {
            opacity: 1;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--highlight-color), var(--secondary-highlight));
            border-radius: 20px;
            transition: width 0.1s;
            width: 0%;
        }

        .time-display {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 0.8rem;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
        }

        .waveform {
            height: 60px;
            background: rgba(0,0,0,0.3); /* Keep this dark for contrast */
            border-radius: 10px;
            position: relative;
            overflow: hidden;
        }

        .waveform-canvas {
            width: 100%;
            height: 100%;
        }

        .slider-container {
            display: flex;
            flex-direction: column;
            gap: 5px;
            align-items: center;
        }

        .slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(255,255,255,0.2);
            outline: none;
            cursor: pointer;
        }

        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--highlight-color);
            cursor: pointer;
            box-shadow: 0 0 10px var(--highlight-color);
        }

        .deck-volume-controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: center;
            width: 100%;
        }

        .deck-volume-sliders {
            display: flex;
            gap: 40px;
            justify-content: center;
            align-items: center;
            width: 100%;
        }

        .slider-container.vertical {
            height: 150px;
            justify-content: center;
        }

        .slider-container.vertical .slider {
            transform: rotate(270deg);
            width: 100px;
        }
        .slider-container.vertical > label {
            margin-top: 15px;
        }

        .mixer {
            background: var(--deck-bg);
            border-radius: 15px;
            padding: 20px;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
        }

        .crossfader-container {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .crossfader {
            width: 150px;
            height: 6px;
            transform: rotate(0deg);
        }


        .vu-meter-stereo {
            width: 100%;
            height: 100px;
            background: rgba(0,0,0,0.3);
            border-radius: 10px;
            padding: 10px;
            display: flex;
            gap: 10px;
            justify-content: center;
            align-items: center;
        }

        .vu-channel {
            flex: 1;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }

        .vu-bar-stereo {
            width: 80%;
            flex: 1;
            background: #222;
            border-radius: 5px;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(0,0,0,0.5);
        }

        .vu-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 0%;
            background-color: green;
            transition: height 0.05s ease-out, background-color 0.05s;
        }

        .vu-bar.yellow {
            background-color: yellow;
        }

        .vu-bar.red {
            background-color: red;
        }

        .vu-label {
            font-size: 0.8rem;
            font-weight: bold;
        }

        .spectrum {
            height: 80px;
            background: rgba(0,0,0,0.3);
            border-radius: 10px;
            margin: 10px;
            padding: 10px;
        }

        .spectrum-canvas {
            width: 100%;
            height: 100%;
        }

        .effects-panel {
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
            padding: 15px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            gap: 10px;
        }

        .effect-control {
            text-align: center;
        }

        .effect-knob {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: conic-gradient(var(--highlight-color) 0deg, rgba(255,255,255,0.2) 0deg);
            margin: 0 auto 5px;
            position: relative;
            cursor: pointer;
        }

        .effect-knob::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: 20px;
            background: white;
            border-radius: 1px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            z-index: 1000;
            backdrop-filter: blur(5px);
        }

        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(20, 20, 20, 0.95);
            border-radius: 15px;
            padding: 30px;
            max-width: 500px;
            width: 90%;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.1);
        }


        .playlist-item {
            padding: 8px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.2s;
            margin-bottom: 5px;
        }

        .playlist-item:hover {
            background: rgba(255,255,255,0.1);
        }

        .playlist-item.playing {
            background: color-mix(in srgb, var(--highlight-color) 30%, transparent);
        }

        .playlist-item.dragging {
            opacity: 0.5;
            background: #4ecdc4;
        }

        .playlist-item.drag-over-top {
            border-top: 2px solid #4ecdc4;
        }

        .playlist-item.drag-over-bottom {
            border-bottom: 2px solid #4ecdc4;
        }

        .playlist-controls {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .playlist-container {
            position: fixed;
            top: 0;
            right: 0;
            width: 300px;
            height: 100%;
            background: rgba(10, 10, 20, 0.9);
            backdrop-filter: blur(10px);
            border-left: 1px solid rgba(255,255,255,0.1);
            transform: translateX(0);
            transition: transform 0.4s ease-in-out;
            z-index: 900;
            display: flex;
            flex-direction: column;
        }

        .playlist-container.collapsed {
            transform: translateX(100%);
        }

        .playlist {
            padding: 20px;
            height: 100%;
            overflow-y: auto;
            flex: 1;
        }

        .playlist h3 {
            position: relative;
        }

        #closePlaylistBtn {
            position: absolute;
            top: -10px;
            right: -10px;
            padding: 5px 10px;
        }

        .bpm-display {
            text-align: center;
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--secondary-highlight);
        }

        .sync-controls {
            display: flex;
            gap: 10px;
            justify-content: center;
        }

        @media (max-width: 768px) {
            .main-content {
                grid-template-columns: 1fr;
                grid-template-rows: 1fr auto 1fr;
            }

            .mixer {
                order: 2;
            }

            .crossfader {
                transform: none;
                width: 200px;
            }

            .header h1 {
                font-size: 1.5rem;
            }
        }

        .drop-zone {
            border: 2px dashed rgba(78, 205, 196, 0.5);
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s;
        }

        .drop-zone.drag-over {
            border-color: var(--highlight-color);
            background: color-mix(in srgb, var(--highlight-color) 10%, transparent);
        }

        /* --- THEMES --- */
        /* Dark is the default, so we only need to define variables */
        body {
            --bg-gradient-1: #1a1a2e;
            --bg-gradient-2: #16213e;
            --bg-gradient-3: #0f3460;
            --deck-bg: rgba(0,0,0,0.4);
            --header-bg: rgba(0,0,0,0.3);
            --highlight-color: #4ecdc4;
            --secondary-highlight: #ff6b6b;
            --text-color: #fff;
            --text-muted: #aaa;
        }

        /* Neon Theme */
        body.theme-neon {
            --bg-gradient-1: #000000;
            --bg-gradient-2: #0d0221;
            --bg-gradient-3: #0d0221;
            --deck-bg: rgba(25, 0, 51, 0.5);
            --header-bg: rgba(25, 0, 51, 0.3);
            --highlight-color: #00f7ff;
            --secondary-highlight: #ff00ff;
            --text-color: #fff;
            --text-muted: #ccc;
        }

        body.theme-neon .header h1 {
            background: linear-gradient(45deg, #ff00ff, #00f7ff, #f3ea5f);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 0 10px var(--highlight-color);
        }

        body.theme-neon .deck-header, body.theme-neon .slider::-webkit-slider-thumb, body.theme-neon .control-btn.active {
            color: #000;
            background: var(--highlight-color);
            box-shadow: 0 0 15px var(--highlight-color);
        }

        body.theme-neon .progress-bar {
            background: linear-gradient(90deg, var(--highlight-color), var(--secondary-highlight));
        }

        body.theme-neon .bpm-display {
            color: var(--secondary-highlight);
            text-shadow: 0 0 10px var(--secondary-highlight);
        }

        /* Classic Theme */
        body.theme-classic {
            --bg-gradient-1: #4a4a4a;
            --bg-gradient-2: #3a3a3a;
            --bg-gradient-3: #2a2a2a;
            --deck-bg: rgba(0,0,0,0.2);
            --header-bg: rgba(0,0,0,0.1);
            --highlight-color: #f7b733;
            --secondary-highlight: #df405a;
            --text-color: #ddd;
            --text-muted: #bbb;
        }

        body.theme-classic .header h1 {
            background: none;
            -webkit-text-fill-color: var(--highlight-color);
        }

        body.theme-classic .deck {
            backdrop-filter: none;
        }

        body.theme-classic .deck-header {
            color: var(--highlight-color);
        }

        body.theme-classic .slider::-webkit-slider-thumb {
            background: var(--highlight-color);
            box-shadow: none;
        }

        body.theme-classic .control-btn.active {
            background: var(--highlight-color);
            box-shadow: none;
        }

        body.theme-classic .progress-bar {
            background: var(--highlight-color);
        }

        body.theme-classic .bpm-display {
            color: var(--secondary-highlight);
        }
