body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    color: #eee;
    overflow: hidden; /* Prevent scrollbars if content is slightly larger */
}

.cd-player-container {
    background: #2a2a2a;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(255, 255, 255, 0.05);
    /* --- MODIFIED: Increased width --- */
    width: 700px; /* Original was 350px, so 350 * 2 = 700px */
    /* --- END MODIFICATION --- */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cd-player-display {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.current-track-info p {
    margin: 0 0 5px 0;
    color: #bbb;
    font-size: 0.9em;
}

#current-track-title {
    margin: 0;
    color: #4CAF50; /* Green for active display */
    font-size: 1.4em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.progress-bar-container {
    margin-top: 15px;
}

#progress-bar {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: #555;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    margin-bottom: 5px;
}

#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.7);
    border: 2px solid #eee;
}

#progress-bar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.7);
    border: 2px solid #eee;
}

.time-display {
    font-size: 0.85em;
    color: #aaa;
    display: flex;
    justify-content: space-between;
}

.cd-player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.control-btn {
    background: #333;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: #eee;
    font-size: 1.8em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, transform 0.1s, box-shadow 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.control-btn.play {
    width: 70px;
    height: 70px;
    font-size: 2.2em;
    background: #4CAF50;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.6);
}

.control-btn:hover {
    background: #444;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
}

.control-btn.play:hover {
    background: #5cb85c;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(76, 175, 80, 0.8);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: #bbb;
    font-size: 1.2em;
}

#volume-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #555;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff; /* Blue for volume */
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.7);
    border: 2px solid #eee;
}

#volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.7);
    border: 2px solid #eee;
}

.playlist-container {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.playlist-container h4 {
    margin-top: 0;
    color: #eee;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#playlist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px; /* Limit height for scrollability */
    overflow-y: auto;
    text-align: left;
}

#playlist::-webkit-scrollbar {
    width: 8px;
}

#playlist::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
}

#playlist::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
    border: 1px solid #444;
}


#playlist li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s, color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    color: #ccc;
}

#playlist li:last-child {
    border-bottom: none;
}

#playlist li:hover {
    background: #333;
    color: #eee;
}

#playlist li.active {
    background: #007bff; /* Blue highlight for active track */
    color: #fff;
    font-weight: bold;
    box-shadow: inset 0 0 8px rgba(0, 123, 255, 0.5);
    border-color: #007bff;
}

#playlist li.active .fas.fa-play {
    color: #fff;
}

#playlist li .fas.fa-play {
    color: transparent; /* Hide play icon by default */
    font-size: 0.8em;
}

#playlist li.active .fas.fa-play {
    color: #fff; /* Show play icon for active track */
}
