/*--------------------------------------------------------------
#                       MUSIC-STYLES.CSS
--------------------------------------------------------------*/

@import url('/src/css/components/base.css');

.music-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stats Section */
.stats-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    align-items: center;
}

.stats-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    text-align: center;
}

.stats-number {
    font-size: 2rem;
    color: var(----main-color);
    font-weight: bold;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.stats-label {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-top: 0.5rem;
    white-space: nowrap;
    opacity: 0.8;
}

/* Artist Sections */
.artist-section {
    margin-bottom: 3rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(----main-color);
    padding: 1.5rem;
    border-radius: 4px;
}

.artist-header {
    border-bottom: 2px solid var(----main-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.artist-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.artist-name {
    color: var(----main-color);
    font-size: 1.8rem;
    margin: 0;
}

.song-count {
    color: var(--text-color);
    font-size: 1.4rem;
    opacity: 0.8;
}

/* Scrollbar styling */
.song-list {
    list-style: none;
    padding: 0;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hide webkit scrollbar by default */
.song-list::-webkit-scrollbar {
    display: none;
}

/* Only apply max-height and scrolling if there are more than 10 items */
.song-list:has(li:nth-child(11)) {
    max-height: 600px;
    overflow-y: auto !important;
    padding-right: 10px;
    /* Firefox */
    scrollbar-width: thin !important;
    scrollbar-color: var(--main-color, #409CFF) #222 !important;
}



/* Additional class we can add with JavaScript */
.scrollable-list {
    max-height: 600px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    /* Use main color for Firefox scrollbar */
    scrollbar-color: var(--main-color, #409CFF) #222 !important;
}

.scrollable-list::-webkit-scrollbar {
    width: 8px !important;
    display: block !important;
    background: #222 !important;
    border-radius: 4px !important;
}

.scrollable-list::-webkit-scrollbar-thumb {
    background: var(--main-color, #409CFF) !important;
    border-radius: 4px !important;
}

.song-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.song-item:last-child {
    border-bottom: none;
}

.song-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0; /* Enables text truncation */
}

.song-item-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.song-number {
    color: var(----main-color);
    font-size: 1.2rem;
    min-width: 30px;
}

.song-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.song-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.favorite-badge {
    background: rgba(28, 200, 89, 0.15);
    color: #1CC859;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(28, 200, 89, 0.3);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;  /* Prevent the badge from shrinking */
}

.favorite-badge i {
    font-size: 1.2rem;
    color: #1CC859;
}

.song-duration {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 1.2rem;
    min-width: 45px;
    text-align: right;
}

.song-link {
    color: #1DB954;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.song-link:hover {
    color: #1DB954;
    background: rgba(29, 185, 84, 0.1);
}

.song-link i {
    font-size: 1.5rem;
    text-shadow: none;
}

.obsessed-badge {
    background: rgba(255, 69, 58, 0.15);
    color: #FF7B72;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 69, 58, 0.3);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.nostalgic-badge {
    background: rgba(142, 142, 229, 0.15);
    color: #8E8EE5;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(142, 142, 229, 0.3);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.album-badge {
    background: rgba(65, 176, 219, 0.15);
    color: #41B0DB;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(65, 176, 219, 0.3);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 0.5rem;
}

/* Mobile adjustments for scrollable lists */
@media (max-width: 768px) {
    .song-list:has(li:nth-child(11)),
    .scrollable-list {
        max-height: 400px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .song-list:has(li:nth-child(11))::-webkit-scrollbar,
    .scrollable-list::-webkit-scrollbar {
        width: 6px !important;
    }

    .stats-container {
        padding: 1rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .stats-box {
        min-width: auto;
        flex: 1;
        padding: 0.5rem;
    }

    .stats-number {
        font-size: 1.5rem;
    }

    .stats-label {
        font-size: 0.8rem;
    }

    .song-info {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .song-info::-webkit-scrollbar {
        display: none;
    }

    .song-title {
        overflow: visible;
        flex-shrink: 0;
        padding-right: 4px;
    }

    .song-item {
        padding: 0.8rem;
    }

    .song-item-left {
        gap: 0.8rem;
    }

    .song-number {
        font-size: 1rem;
        min-width: 25px;
    }

    .song-thumbnail {
        width: 32px;
        height: 32px;
    }

    .favorite-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .song-duration {
        font-size: 0.9rem;
    }

    .song-link {
        padding: 0.4rem;
    }

    .obsessed-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .nostalgic-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .album-badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .song-list:has(li:nth-child(11)),
    .scrollable-list {
        max-height: 350px !important;
    }

    .stats-container {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .stats-number {
        font-size: 1.2rem;
    }

    .stats-label {
        font-size: 1.2rem;
    }

    .favorite-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .song-item {
        padding: 0.6rem;
    }

    .song-item-left {
        gap: 0.6rem;
    }

    .song-info {
        font-size: 0.9rem;
    }

    .obsessed-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .nostalgic-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .album-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

.popular-songs-trigger {
    cursor: pointer;
    color: var(----main-color);
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.popular-songs-trigger i {
    font-size: 1.2rem;
}

.popular-songs-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.popular-songs-trigger:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1.2rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}


.youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden; /* Prevent scrolling */
}

.youtube-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Add this class to be applied to body when modal is open */
.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    width: 90%;
    max-width: 1200px;
}

.video-container {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative; /* Added for absolute positioning of controls */
}

.video-js {
    width: 100%;
    height: 100%;
}

/* Video.js customization */
.video-js .vjs-tech {
    background-color: #000;
}

.video-js .vjs-poster {
    background-color: #000;
}

.video-js .vjs-big-play-button {
    background-color: rgba(0, 0, 0, 0.45);
    border-color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.video-js:hover .vjs-big-play-button {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Navigation buttons */
.nav-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-btn i {
    font-size: 1.2rem;
}

.close-btn {
    position: absolute;
    top: 10px;  /* Position close to the video */
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Improved responsive adjustments */
@media (max-width: 768px) {
    .youtube-modal {
        background: black; /* Full black background on mobile */
    }
    
    .modal-content {
        padding: 0;
        gap: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .video-container {
        width: 100%;
        height: auto;
        max-height: 80vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .close-btn {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

@media (max-width: 480px) {
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .prev-btn {
        left: 8px;
    }
    
    .next-btn {
        right: 8px;
    }
    
    .close-btn {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
    }
    
    .nav-btn i, .close-btn i {
        font-size: 1rem;
    }
}

/* Improved filter menu organization */
.filter-menu {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(----main-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-section:hover {
    background: rgba(255, 255, 255, 0.03);
}

.filter-section label.section-title {
    color: var(----main-color);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.filter-section label {
    color: var(--text-color);
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
}

#artist-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#artist-select:hover, #artist-select:focus {
    border-color: var(----main-color);
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

#artist-select option {
    background: #1a1a1a;
    padding: 4px;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.tag-filter-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tag-filter-item input {
    cursor: pointer;
    --main-color: var(----main-color);
}

.filter-badge {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.tag-filter-item:hover .filter-badge {
    opacity: 1;
}

@media (max-width: 768px) {
    .filter-menu {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .filter-section {
        padding: 0.4rem;
    }
    
    .filter-section label.section-title {
        font-size: 0.95rem;
    }
    
    .view-mode-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* View mode controls */
.view-mode-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.view-mode-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-mode-btn i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.view-mode-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(----main-color);
}

.view-mode-btn.active {
    background: var(----main-color);
    border-color: var(----main-color);
    font-weight: 500;
}

.view-mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-menu {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .filter-section {
        padding: 0.4rem;
    }
    
    .filter-section label.section-title {
        font-size: 1.2rem;
    }
    
    .view-mode-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Simple Spotify footer - adding only new styles */
.spotify-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.spotify-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: #121212;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    border: 1px solid #333;
    font-size: 1.2rem;
    font-weight: 500;
    transition: box-shadow, 0.3s ease;
}

.spotify-link:hover {
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.3);
    background: #121212; /* Explicitly set the same background on hover */
    color: white; /* Explicitly set the same text color on hover */
    border-color: #333; /* Explicitly set the same border color on hover */
}

.spotify-link i {
    color: #1DB954;
    font-size: 1.5rem;
}

.spotify-link:hover i {
    color: #1DB954; /* Explicitly set the same icon color on hover */
}

.welcome-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h2 {
    color: var(--main-color);
    margin: 0 0 15px 0;
    font-size: 32px;
    font-family: 'Terminus', monospace;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(114, 182, 255, 0.3);
}

.welcome-content p {
    color: #fff;
    margin: 0 0 25px 0;
    line-height: 1.6;
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.last-updated {
    color: var(--main-color);
    font-size: 14px;
    opacity: 0.7;
    font-family: 'Terminus', monospace;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .welcome-section {
        padding: 35px;
    }

    .welcome-content h2 {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .welcome-content p {
        font-size: 0.9em;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .last-updated {
        white-space: nowrap;
        font-size: 0.8em;
    }
}

/* Go Up Button */
.go-up-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(----main-color);
    border-radius: 50%;
    color: var(----main-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.go-up-btn.visible {
    opacity: 1;
    visibility: visible;
}

.go-up-btn i {
    font-size: 1.2rem;
}

@media (max-width: 580px) {
    .go-up-btn {
        width: 30px;
        height: 30px;
        bottom: 15px;
        right: 4px;
    }
    
    .go-up-btn i {
        font-size: 1rem;
    }
}


@media (max-width: 1200px) {
    .go-up-btn {
        width: 30px;
        height: 30px;
        bottom: 15px;
        right: 4px;
    }
    
    .go-up-btn i {
        font-size: 1rem;
    }
}