/* mobile.css - MATCHING DESKTOP AESTHETIC */

/* --- GLOBAL FIXES --- */
html {
    height: 100%;
    overflow-x: hidden;
}

body {
    overflow-x: hidden; 
    background: #000000;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Dynamic color blur background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 40%, var(--bg-color-1, rgba(255, 0, 0, 0.15)) 0%, transparent 50%),
                radial-gradient(circle at 80% 60%, var(--bg-color-2, rgba(0, 100, 255, 0.12)) 0%, transparent 50%),
                radial-gradient(circle at 20% 70%, var(--bg-color-3, rgba(255, 100, 0, 0.1)) 0%, transparent 50%);
    filter: blur(80px);
    opacity: 0;
    transition: opacity 1s ease;
}

body.colors-loaded::before {
    opacity: 1;
}

*, *:before, *:after {
    box-sizing: border-box; 
}

/* --- HIDE NL LOGO ON MOBILE --- */
.nl-logo {
    display: none !important;
}

/* --- TOP NAV - MOBILE FRIENDLY --- */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Nav groups stacked vertically on mobile */
.nav-group-left, 
.nav-group-right {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Clean minimalist nav links */
.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-link:hover,
.nav-link:active {
    color: #ffffff !important;
    background: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.nav-link.active {
    color: #ffffff !important;
}

.auth-link.logged-in {
    color: #FF4500 !important;
}

/* Search bar full width on mobile */
.nav-search-container {
    width: 100% !important;
    max-width: none !important;
    order: 3;
}

.nav-link.search-input {
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 0.9em !important;
    text-align: center !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: none !important;
    color: #ffffff !important;
    border-radius: 25px !important;
    transition: all 0.3s ease !important;
}

.nav-link.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.nav-link.search-input:focus {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    outline: none !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1) !important;
}

#global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    padding: 10px;
    margin-top: 8px;
    border-radius: 12px;
}

/* --- MAIN CONTENT --- */
.main-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    padding-top: 140px !important;
    padding-bottom: 160px !important;
}

/* --- MASTER PLAYER - PERFECTLY CENTERED --- */
#master-player-container {
    width: 100% !important;
    max-width: 500px !important;
    min-height: auto !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 25px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.master-player-bg {
    display: none !important;
}

/* --- ALBUM ART - CENTERED & ADAPTIVE FOR MOBILE --- */
.master-player-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.master-pfp {
    width: min(85vw, 360px) !important;
    height: min(85vw, 360px) !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.1) !important;
    object-fit: cover !important;
    display: block !important;
}

/* --- TRACK INFO - CENTERED ON MOBILE --- */
.now-playing-info {
    text-align: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
}

#master-title {
    font-size: clamp(1.6em, 5.5vw, 2.2em) !important;
    margin: 0 !important;
    padding: 0 15px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    text-align: center !important;
    color: #ffffff !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
    letter-spacing: -1px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}

/* Artist name + buy button row */
.now-playing-info > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Clean minimalist buttons matching desktop */
.artist-link,
.buy-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    font-size: 0.85em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.artist-link:hover,
.artist-link:active,
.buy-button:hover,
.buy-button:active {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

/* Hide stream count on mobile */
.stream-text {
    display: none !important;
}

/* --- HIDE OLD DESKTOP CONTROLS --- */
.master-bottom-row,
.master-controls,
.master-time-skip-controls,
.master-progress-container,
.master-volume-container,
.time-skip-btn,
.player-icon-btn,
#master-time-display {
    display: none !important;
}

/* --- BOTTOM PLAYER BAR - TRULY FIXED AT BOTTOM --- */
.bottom-player-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(10, 10, 10, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 15px 20px !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

/* Track info at top of player bar */
.bottom-track-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

.bottom-thumbnail {
    width: 45px !important;
    height: 45px !important;
    border-radius: 6px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.bottom-text {
    min-width: 0 !important;
    flex: 1 !important;
}

.bottom-track-title {
    font-size: 0.85em !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 3px !important;
}

.bottom-track-artist {
    font-size: 0.7em !important;
    color: rgba(255, 255, 255, 0.6) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Controls center section */
.bottom-controls-center {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
}

.bottom-controls-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 25px !important;
}

.bottom-control-btn {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 8px !important;
}

.bottom-control-btn:hover,
.bottom-control-btn:active {
    color: rgba(255, 255, 255, 0.7) !important;
    transform: scale(1.1) !important;
}

/* Large play/pause button */
.bottom-control-btn.bottom-play-btn {
    width: 45px !important;
    height: 45px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    color: #000000 !important;
}

.bottom-control-btn.bottom-play-btn:hover,
.bottom-control-btn.bottom-play-btn:active {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.08) !important;
}

/* Progress bar */
.bottom-progress-container {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.bottom-time-display {
    font-size: 0.7em !important;
    color: rgba(255, 255, 255, 0.6) !important;
    min-width: 35px !important;
    text-align: center !important;
}

.bottom-progress-bar {
    flex: 1 !important;
    height: 5px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
}

.bottom-progress-fill {
    height: 100% !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    width: 0% !important;
    min-width: 0 !important;
    transition: width 0.1s linear !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.9) !important;
    border-radius: 3px !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 2 !important;
    display: block !important;
    opacity: 1 !important;
}

/* Hide volume on mobile */
.bottom-volume {
    display: none !important;
}

/* --- RESPONSIVE BREAKPOINTS FOR ALL DEVICES --- */

/* Extra small devices (320px - 374px) */
@media (max-width: 374px) {
    .main-content {
        padding-top: 130px !important;
        padding-bottom: 150px !important;
    }
    
    #master-player-container {
        padding: 0 15px !important;
        gap: 20px !important;
    }
    
    .master-pfp {
        width: min(80vw, 280px) !important;
        height: min(80vw, 280px) !important;
    }
    
    #master-title {
        font-size: clamp(1.4em, 5vw, 1.8em) !important;
    }
    
    .artist-link,
    .buy-button {
        font-size: 0.75em !important;
        padding: 8px 16px !important;
    }
}

/* Small devices - iPhone SE (375px - 389px) */
@media (min-width: 375px) and (max-width: 389px) {
    .main-content {
        padding-top: 135px !important;
        padding-bottom: 155px !important;
    }
    
    #master-player-container {
        gap: 22px !important;
    }
    
    .master-pfp {
        width: min(82vw, 300px) !important;
        height: min(82vw, 300px) !important;
    }
}

/* Medium-small devices - iPhone 12/13 mini (390px - 413px) */
@media (min-width: 390px) and (max-width: 413px) {
    .main-content {
        padding-top: 140px !important;
        padding-bottom: 160px !important;
    }
    
    #master-player-container {
        gap: 23px !important;
    }
    
    .master-pfp {
        width: min(83vw, 320px) !important;
        height: min(83vw, 320px) !important;
    }
}

/* Medium devices - iPhone 12 Pro/14 Pro (414px - 429px) */
@media (min-width: 414px) and (max-width: 429px) {
    .main-content {
        padding-top: 140px !important;
        padding-bottom: 160px !important;
    }
    
    .master-pfp {
        width: min(84vw, 340px) !important;
        height: min(84vw, 340px) !important;
    }
}

/* Large devices - iPhone 14 Pro Max (430px+) */
@media (min-width: 430px) and (max-width: 767px) {
    .main-content {
        padding-top: 145px !important;
        padding-bottom: 165px !important;
    }
    
    .master-pfp {
        width: min(85vw, 360px) !important;
        height: min(85vw, 360px) !important;
    }
    
    #master-title {
        font-size: clamp(1.7em, 5.5vw, 2.3em) !important;
    }
}

/* Tablet and larger (768px+) - Override mobile styles */
@media (min-width: 768px) {
    .main-content {
        padding: 140px 60px 200px !important;
    }
    
    .master-pfp {
        width: 400px !important;
        height: 400px !important;
    }
    
    #master-title {
        font-size: 4em !important;
    }
}

/* --- ARTIST PAGE MOBILE --- */
@media (max-width: 768px) {
    .artist-page-body .main-content {
        display: none !important;
    }
    
    .artist-page-body .nl-logo {
        display: none !important;
    }
    
    .artist-page-body .nav-bar {
        display: none !important;
    }
    
    .artist-top-nav {
        padding: 0 20px !important;
    }
    
    #artist-hero {
        height: 40vh !important;
        min-height: 350px !important;
        padding: 0 25px 30px !important;
    }
    
    #artist-name {
        font-size: 3em !important;
        letter-spacing: -1.5px !important;
    }
    
    .artist-actions-bar {
        padding: 25px !important;
    }
    
    .play-all-btn {
        width: 55px !important;
        height: 55px !important;
    }
    
    .share-btn {
        padding: 10px 24px !important;
        font-size: 0.8em !important;
    }
    
    .artist-tracks-container {
        padding: 30px 25px 100px !important;
    }
    
    .tracks-header {
        grid-template-columns: 35px 1fr 70px !important;
        font-size: 0.7em !important;
        padding: 10px 12px !important;
    }
    
    .track-col-artist,
    .track-col-actions {
        display: none !important;
    }
    
    .track-row {
        grid-template-columns: 35px 1fr 70px !important;
        padding: 10px 12px !important;
    }
    
    .track-thumbnail {
        width: 40px !important;
        height: 40px !important;
    }
    
    .track-title {
        font-size: 0.95em !important;
    }
}