/* ============================================================================ */
/* MEDIA PLAYERS - YouTube & Spotify */
/* ============================================================================ */

/* Artist Details Section Padding */
.details-section-top {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ============================================================================ */
/* UNIFIED MEDIA PLAYER WRAPPER - Spotify & YouTube */
/* ============================================================================ */

/* Main Media Player Wrapper */
.media-player-wrapper {
    display: flex;
    height: 620px;
    /* box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(143, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
}

/* Vertical Title - Left Side */
.media-vertical-title {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.95rem;
    letter-spacing: 0.25rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0 0.5rem;
    /* background: linear-gradient(
        to bottom,
        #8f0000 0%,
        #5a0000 50%,
        #2a2a2a 100%
    ); */
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
    border-left: 1px solid #2a2a2a;
    border-radius: 0 8px 8px 0;
    /* border-right: none; */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.no-top-left-radius {
    border-radius: 0 !important;
}

/* Media Content Block */
.media-player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-left: none;
    position: relative;
}

/* Red accent bar on the left of content */
/* .media-player-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8f0000 0%, transparent 100%);
    border-radius: 0;
    z-index: 1;
} */

/* ============================================================================ */
/* SPOTIFY PLAYER */
/* ============================================================================ */

#iSpotiPlayer {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    display: block;
}

/* Force iframe border-radius to 0 with !important */
.media-player-content iframe,
.media-player-content #iSpotiPlayer {
    border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Visual fix: Hide Spotify's internal top-left rounded corner */
/* .media-player-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: #1f1f1f; 
    z-index: 100;
    pointer-events: none;
} */

/* ============================================================================ */
/* YOUTUBE PLAYER & PLAYLIST */
/* ============================================================================ */

/* YouTube Player Container */
#youtube-player-container {
    width: 100%;
    position: relative;
    background: #000000;
    border-bottom: 2px solid #2a2a2a;
}

#youtube-player-iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* YouTube Playlist Container */
#youtube-playlist-container {
    height: 335px;
    width: 100%;
    background: linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
    padding: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar Custom Styling */
#youtube-playlist-container::-webkit-scrollbar {
    width: 8px;
}

#youtube-playlist-container::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 4px;
}

#youtube-playlist-container::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
    transition: background 0.3s ease;
}

#youtube-playlist-container::-webkit-scrollbar-thumb:hover {
    background: #8f0000;
}

/* ============================================================================ */
/* PLAYLIST ITEMS */
/* ============================================================================ */

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 80px;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(25, 25, 25, 0.5);
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Subtle gradient overlay on hover */
.playlist-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(143, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.playlist-item:hover::before {
    opacity: 1;
}

/* Active State */
.playlist-item.active {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border-color: #8f0000;
    box-shadow:
        0 0 0 1px rgba(143, 0, 0, 0.3),
        0 2px 8px rgba(143, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Left border accent for active item */
.playlist-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8f0000 0%, #b00000 100%);
    border-radius: 8px 0 0 8px;
}

/* Hover State */
.playlist-item:hover {
    background: linear-gradient(135deg, #3a1a1a 0%, #2a0f0f 100%);
    border-color: rgba(143, 0, 0, 0.5);
    transform: translateX(4px);
    box-shadow:
        -4px 0 12px rgba(143, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hover effect on active item */
.playlist-item.active:hover {
    border-color: #a00000;
    box-shadow:
        0 0 0 1px rgba(143, 0, 0, 0.5),
        0 4px 12px rgba(143, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Thumbnail Styling */
.playlist-item img {
    width: 120px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.playlist-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(143, 0, 0, 0.3);
}

/* Text Content */
.playlist-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.playlist-item-text .fw-bold {
    font-size: 0.9rem;
    line-height: 1.3;
    color: #f5f5f5;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.playlist-item:hover .playlist-item-text .fw-bold {
    color: #ffffff;
}

.playlist-item.active .playlist-item-text .fw-bold {
    color: #ffffff;
}

/* ============================================================================ */
/* RESPONSIVE ADJUSTMENTS */
/* ============================================================================ */

@media (max-width: 1400px) {
    #youtube-player-iframe {
        height: 350px;
    }
}

@media (max-width: 1200px) {
    #youtube-player-iframe {
        height: 320px;
    }

    #youtube-playlist-container {
        height: 300px;
    }

    .playlist-item img {
        width: 100px;
        height: 56px;
    }

    .playlist-item {
        height: 72px;
    }
}

@media (max-width: 992px) {
    .media-player-wrapper{
        height: 550px;
    }
    #youtube-player-iframe {
        height: 280px;
    }

    #youtube-playlist-container {
        height: 280px;
    }

    .media-vertical-title {
        font-size: 0.9rem;
        letter-spacing: 0.2rem;
        padding: 0.8rem 0.4rem;
    }
}

@media (max-width: 768px) {
    #youtube-player-iframe {
        height: 240px;
    }

    #youtube-playlist-container {
        height: 240px;
    }

    .media-vertical-title {
        font-size: 0.85rem;
        letter-spacing: 0.15rem;
        padding: 0.6rem 0.3rem;
    }

    .playlist-item {
        height: 64px;
        gap: 8px;
        padding: 6px;
    }

    .playlist-item img {
        width: 80px;
        height: 48px;
    }

    .playlist-item-text .fw-bold {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }
}

@media (max-width: 576px) {
    .media-player-wrapper {
        flex-direction: column;
    }

    .media-vertical-title {
        writing-mode: horizontal-tb;
        padding: 0.5rem 1rem;
        transform: none !important;
        border-radius: 8px 8px 0 0;
        border-bottom: none;
        border-right: 1px solid #2a2a2a;
    }

    .media-player-content::before {
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, transparent 0%, #8f0000 50%, transparent 100%);
    }
}
