.s4-player-wrapper {
    width: 100%;
    font-family: 'DM Sans', sans-serif;
}

.s4-player-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Main Player Section */
.s4-player-main {
    display: flex;
    align-items: center;
    gap: 24px;
}

.s4-info-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevent flex overflow */
}

.s4-text-info {
    margin-bottom: 16px;
}

.s4-main-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s4-main-artist {
    margin: 4px 0 0 0;
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s4-controls-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s4-control-btn {
    /* width: 32px; */
    /* height: 32px; */
    padding: 6px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.s4-control-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
    display: block;
}

.s4-control-btn svg * {
    fill: currentColor;
}

.s4-control-btn:hover {
    color: #7978ff;
    background-color: rgba(121, 120, 255, 0.1);
}

.s4-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: #7978ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(121, 120, 255, 0.3);
}

.s4-play-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.s4-play-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
}

.s4-progress-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #888;
    font-variant-numeric: tabular-nums;
    margin-left: 8px;
}

.s4-progress-bar {
    position: relative;
    flex-grow: 1;
    height: 6px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.s4-player-progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #eee;
    border-radius: 3px;
}

.s4-player-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #7978ff;
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
}

.s4-player-thumb {
    position: absolute;
    left: 0%;
    width: 12px;
    height: 12px;
    background-color: #7978ff;
    border-radius: 50%;
    transform: translateX(-50%) scale(0);
    transition: transform 0.1s;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(121, 120, 255, 0.2);
}

.s4-progress-bar:hover .s4-player-thumb {
    transform: translateX(-50%) scale(1);
}

.s4-seek-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 3;
}

/* Playlist Section */
.s4-playlist {
    display: flex;
    flex-direction: column;
    max-height: 310px; /* Approx 4 items (73px each) + padding */
    overflow-y: auto;
    padding-right: 4px; /* Space for scrollbar */
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

/* Custom Scrollbar */
.s4-playlist::-webkit-scrollbar {
    width: 6px;
}

.s4-playlist::-webkit-scrollbar-track {
    background: #fdf2f8;
    border-radius: 3px;
}

.s4-playlist::-webkit-scrollbar-thumb {
    background: #db2777;
    border-radius: 3px;
}

.s4-playlist::-webkit-scrollbar-thumb:hover {
    background: #be185d;
}

/* Scrollbar styling removed as it is no longer needed */

.s4-playlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.s4-playlist-item:last-child {
    border-bottom: none;
}

.s4-playlist-item:hover {
    background-color: #f9f9f9;
}

.s4-playlist-item.active {
    background-color: #fdf2f8; /* Light pink background */
    border-color: transparent;
}

.s4-playlist-item.active .s4-playlist-title {
    color: #db2777; /* Pink text */
}

.s4-playlist-item.active .s4-playlist-icon {
    color: #db2777;
}

.s4-playlist-icon {
    width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.s4-playlist-info {
    flex-grow: 1;
    min-width: 0;
}

.s4-playlist-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s4-playlist-artist {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .s4-player-main {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .s4-controls-container {
        width: 100%;
    }
    
    .s4-info-wrapper {
        width: 100%;
    }
}
