:root {
    --bg-color: #030303;
    --text-color: #cccccc;
    --border-color: #555555;
    --accent-color: #ffffff;
    --radius: 0.25rem;
    --font-family: 'Geist Sans', system-ui, -apple-system, sans-serif;
}

#player-window {
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 100;
    overflow: hidden;
    text-transform: uppercase;
    width: min(40rem, 95vw, 95dvh);
    height: min(40rem, 95vw, 95dvh);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

#visualizer-container {
    height: 240px;
    position: relative;
}

#timebase-control {
    position: absolute;
    left: 15px;
    top: 15px;
    display: flex;
    align-items: center;
    z-index: 100;
}

#timebase-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 20px;
    background: transparent;
    cursor: pointer;
}

/* Track */
#timebase-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

#timebase-slider::-moz-range-track {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

/* Thumb */
#timebase-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
    margin-top: -5.5px; /* Centers thumb on 1px track */
    border: 1px dashed #555;
    box-shadow: 0 0 8px rgba(204, 204, 250, 0.2);
}

#timebase-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    border: 1px dashed #ccccfa;
    box-shadow: 0 0 8px rgba(204, 204, 250, 0.2);
}

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

#track-info {
    position: absolute;
    bottom: 10px;
    left: 15px;
    pointer-events: none;
}

#current-title {
    font-weight: 300;
    font-size: 1.2em;
  padding: 8px 12px;
  backdrop-filter: blur(32px);
  border-radius: 999px;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    margin-bottom: 2px;
}

#controls {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.ctrl-btn {
    background: none;
    border: 1px dashed #555;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ctrl-btn.primary {
    background: #ccccfa;
    color: #030030;
    width: 48px;
    height: 48px;
  outline: 1px solid #ccccfa;
  outline-offset: 5px;
    border: none;
}

.ctrl-btn:hover {
    background: #222;
    border-color: #888;
}

.ctrl-btn.primary:hover {
    background: #e0e0ff;
}

.ctrl-btn:active {
    background: #333;
}

#progress-container {
    height: 12px;
    background: #111;
    border-radius: 0;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin: 0;
    width: 100%;
}

#progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #ccccfa;
}

#track-list-container {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 15px 15px 15px;
    display: flex;
    flex-direction: column;
    scroll-snap-type: y proximity;
    -webkit-overflow-scrolling: touch;
}

#track-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.track-item {
    flex: 0 0 auto;
    width: 100%;
    min-height: 3.5rem;
    border-radius: 6px;
    border: 1px dashed #222;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #080808;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.track-card-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 0 15px;
    width: 100%;
}

.track-index {
    font-size: 0.7em;
    opacity: 0.4;
    font-weight: 700;
}

.track-item:hover {
    background: #111;
    border-color: #444;
    transform: translateY(-2px);
}

.track-item.active {
    background: #111;
  border: 1px solid #888;
    border-color: var(--border-color);
}

.track-item .track-meta {
    flex: 1;
}

.track-item .track-name {
    color: var(--accent-color);
    font-size: 0.9em;
}

.track-item .track-duration {
    font-size: 0.75em;
    opacity: 0.5;
}

/* Scrollbar styling */
#track-list-container::-webkit-scrollbar {
    width: 4px;
}
#track-list-container::-webkit-scrollbar-track {
    background: transparent;
}
#track-list-container::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}
#track-list-container:hover::-webkit-scrollbar-thumb {
    background: #333;
}

/* Responsive adjustments for very small screens */
@media (max-width: 400px) {
    #visualizer-container {
        height: 140px;
    }
    #controls {
        padding: 10px;
        gap: 8px;
    }
    .ctrl-btn {
        width: 32px;
        height: 32px;
    }
}