@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;600&family=Dancing+Script:wght@700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #050505; color: #d4af37; font-family: 'Montserrat', sans-serif; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; letter-spacing: 2px; }

/* Navigation */
.nav-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 5%; 
    background: rgba(5, 5, 5, 0.95); 
    position: sticky; 
    top: 0; 
    width: 100%; 
    z-index: 100; 
    border-bottom: 1px solid #111;
}
.nav-bar ul { display: flex; list-style: none; gap: 2rem; }
.nav-bar a { color: #d4af37; text-decoration: none; font-size: 0.9rem; font-weight: 600; letter-spacing: 1px; transition: 0.3s; }
.nav-bar a:hover, .nav-bar a.active { color: #fff; text-shadow: 0 0 10px #d4af37; }

.logo { display: flex; align-items: center; gap: 15px; color: #d4af37; }
.logo span { font-family: 'Dancing Script', cursive; font-size: 2.2rem; }
.avatar { width: 50px; height: 50px; border-radius: 50%; border: 2px solid #d4af37; object-fit: cover; }

/* Full-Screen Hero */
.hero-full-width {
    width: 100%; height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('assets/jermaine-portrait.jpg');
    background-size: cover; background-position: center center;
    display: flex; align-items: center; padding-left: 5%;
}
.hero-content { max-width: 600px; color: #ffffff; }
.hero-content h1 { font-size: var(--h1-size); margin-bottom: 1rem; color: #d4af37; }

/* Buttons & Links */
.glow-link { transition: all 0.3s ease; cursor: pointer; }
.glow-link:hover { color: #fff !important; text-shadow: 0 0 10px #d4af37, 0 0 20px #d4af37, 0 0 30px #d4af37; }

.btn { display: inline-block; background: #d4af37; color: #000; padding: 1rem 2rem; text-decoration: none; font-weight: bold; margin-top: 2rem; }
.btn-sub { display: inline-block; padding: 0.8rem 1.5rem; border: 1px solid #d4af37; color: #d4af37; text-decoration: none; margin-top: 1rem; }

/* ==========================================================================
   JUKEBOX SPECIFIC STYLES (Modern Noir Vinyl Aesthetic)
   ========================================================================== */
.page-header-jukebox {
    text-align: center;
    padding: 5rem 5% 2rem 5%;
    background: linear-gradient(180deg, #111 0%, #050505 100%);
    border-bottom: 1px dashed #222;
}
.page-header-jukebox h1 {
    font-size: var(--h1-size);
    color: #fff;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}
.page-header-jukebox .tagline {
    font-size: 1rem;
    color: #888;
    letter-spacing: 3px;
    margin-top: 0.5rem;
    font-weight: bold;
}

.jukebox-container {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 4rem;
    max-width: 1200px;
    width: 90%;
    margin: 4rem auto;
    padding-bottom: 6rem;
}

/* PLAYER PANEL (Left Side) */
.player-panel {
    background: #000;
    border: 3px double #d4af37;
    padding: 2rem;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
}

.player-hud {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #888;
    border-bottom: 1px solid #222;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}
.status-indicator {
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc;
}

/* Vinyl Deck Visualizer */
.vinyl-deck {
    position: relative;
    width: 290px;
    height: 290px;
    margin: 1rem auto 2rem auto;
    background: #080808;
    border: 1px solid #222;
    box-shadow: inset 0 0 20px #000;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vinyl-container {
    width: 260px;
    height: 260px;
    position: relative;
}

/* Highly Detailed Custom Vinyl Record */
.vinyl {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, 
        #111 2%, 
        #000 6%, 
        #222 7%, 
        #0a0a0a 15%, 
        #1c1c1c 25%, 
        #111 35%, 
        #0a0a0a 45%, 
        #2d2d2d 55%, 
        #151515 65%, 
        #000 75%, 
        #222 85%, 
        #0d0d0d 95%, 
        #000 100%
    );
    border: 4px solid #1c1c1c;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,255,255,0.05);
    position: relative;
}

/* Grooves on vinyl */
.vinyl::after {
    content: "";
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.03);
    box-shadow: 
        0 0 0 10px rgba(255,255,255,0.01),
        0 0 0 20px rgba(255,255,255,0.01),
        0 0 0 30px rgba(255,255,255,0.015),
        0 0 0 45px rgba(255,255,255,0.01),
        0 0 0 60px rgba(255,255,255,0.015),
        0 0 0 80px rgba(255,255,255,0.01),
        0 0 0 100px rgba(255,255,255,0.01);
    pointer-events: none;
}

/* Vinyl rotation animation */
.vinyl.playing {
    animation: spinVinyl 2.8s linear infinite;
}
@keyframes spinVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Vinyl Center Label (Holds active cover art) */
.center-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 96px; height: 96px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 5px solid #000;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    transition: background-image 0.4s ease;
}
.spindle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 12px; height: 12px;
    background: #aaa;
    border-radius: 50%;
    border: 2px solid #555;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Needle / Tonearm */
.tonearm {
    position: absolute;
    top: -5px;
    right: 5px;
    z-index: 10;
    transform-origin: 55px 25px; /* Axis pivot point */
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transform: rotate(-32deg); /* Initial park state */
}
.tonearm.playing {
    transform: rotate(-2deg); /* Swept onto record playing state */
}

/* OSCILLOSCOPE SPECTRUM ANALYZER ANIMATION */
.oscilloscope {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0 10px;
}
.oscilloscope .bar {
    width: 100%;
    height: 2px;
    background: #d4af37;
    opacity: 0.15;
    transition: height 0.15s ease;
}
.oscilloscope.active .bar {
    opacity: 0.8;
    animation: pulseBar 0.5s ease infinite alternate;
}
.oscilloscope.active .bar:nth-child(2) { animation-delay: 0.1s; }
.oscilloscope.active .bar:nth-child(3) { animation-delay: 0.2s; }
.oscilloscope.active .bar:nth-child(4) { animation-delay: 0.15s; }
.oscilloscope.active .bar:nth-child(5) { animation-delay: 0.3s; }
.oscilloscope.active .bar:nth-child(6) { animation-delay: 0.05s; }
.oscilloscope.active .bar:nth-child(7) { animation-delay: 0.25s; }
.oscilloscope.active .bar:nth-child(8) { animation-delay: 0.12s; }
.oscilloscope.active .bar:nth-child(9) { animation-delay: 0.22s; }
.oscilloscope.active .bar:nth-child(10) { animation-delay: 0.08s; }
.oscilloscope.active .bar:nth-child(11) { animation-delay: 0.28s; }
.oscilloscope.active .bar:nth-child(12) { animation-delay: 0.18s; }
.oscilloscope.active .bar:nth-child(13) { animation-delay: 0.02s; }
.oscilloscope.active .bar:nth-child(14) { animation-delay: 0.33s; }
.oscilloscope.active .bar:nth-child(15) { animation-delay: 0.07s; }
.oscilloscope.active .bar:nth-child(16) { animation-delay: 0.21s; }

@keyframes pulseBar {
    0% { height: 2px; }
    100% { height: 35px; background: #fff; }
}

/* Now Playing Metadata Card */
.now-playing-info {
    text-align: center;
    margin-bottom: 2rem;
}
.now-playing-info h2 {
    font-size: var(--h2-size);
    color: #fff;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.now-playing-info h4 {
    font-size: 0.9rem;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.now-playing-info p {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
}

/* Playback Control Bar */
.custom-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.time-display {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #666;
    width: 35px;
    text-align: center;
}
.progress-bar-container {
    flex: 1;
    height: 4px;
    background: #151515;
    cursor: pointer;
    position: relative;
}
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: #d4af37;
    position: absolute;
    top: 0; left: 0;
    transition: width 0.1s linear;
    box-shadow: 0 0 5px #d4af37;
}

.buttons-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.control-btn {
    background: none;
    border: 1px solid #333;
    color: #d4af37;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s ease;
}
.control-btn:hover {
    border-color: #d4af37;
    color: #fff;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.play-pause-btn {
    width: 52px;
    height: 52px;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}
.play-pause-btn:hover {
    background: #d4af37;
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.volume-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.volume-slider {
    width: 80px;
    accent-color: #d4af37;
    background: #111;
    outline: none;
    height: 4px;
    cursor: pointer;
}

/* PLAYLIST PANEL (Right Side) */
.playlist-panel {
    display: flex;
    flex-direction: column;
}

.playlist-tabs {
    display: flex;
    border-bottom: 2px solid #222;
    margin-bottom: 2.5rem;
}
.tab-btn {
    background: none;
    border: none;
    color: #666;
    padding: 1rem 2rem;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}
.tab-btn:hover {
    color: #fff;
}
.tab-btn.active {
    color: #d4af37;
    border-bottom-color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

.playlist-group-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #151515;
    padding-bottom: 1rem;
}
.group-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #222;
}
.playlist-group-header h3 {
    font-size: 1.4rem;
    color: #fff;
}
.playlist-group-header p {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.2rem;
}

.tracklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #111;
    background: #090a0c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.track-item:hover {
    border-color: #d4af37;
    background: #111317;
}
.track-item.active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.track-num {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #555;
    width: 30px;
}
.track-item.active .track-num {
    color: #d4af37;
    font-weight: bold;
}

.track-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.track-name {
    color: #ccc;
    font-size: 1rem;
    font-weight: bold;
    transition: 0.2s;
}
.track-item:hover .track-name {
    color: #fff;
}
.track-item.active .track-name {
    color: #d4af37;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.track-genre {
    color: #555;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-duration {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #555;
}

.footer {
    border-top: 1px solid #111;
    padding: 2.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
    background: #000;
}

/* RESPONSIVE LAYOUTS */
@media (max-width: 900px) {
    .jukebox-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .player-panel {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    .page-header-jukebox h1 {
        font-size: 2.8rem;
    }
}

/* Bulletproof CSS Keyframe Page Transitions - Solves Flashing & Black screen bugs */
@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    animation: pageFadeIn 0.4s ease-out forwards;
}

body.fade-out {
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out !important;
    animation: none !important;
}

/* ==========================================================================
   UNIFIED FLUID TYPOGRAPHY SYSTEM (Release v41)
   ========================================================================== */
html {
    font-size: 16px; /* Desktop browser baseline */
}

:root {
    --h1-size: clamp(1.8rem, 4.5vw, 3rem);
    --h2-size: clamp(1.4rem, 3.5vw, 2.2rem);
    --h3-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

/* Standard Responsive Text Scaling */
@media (max-width: 850px) {
    html {
        font-size: 14px !important; /* Globally down-scales all REM dimensions by 12.5% */
    }
    body {
        line-height: 1.6 !important;
    }
}
@media (max-width: 450px) {
    html {
        font-size: 13.2px !important; /* Scale down by 17% for tiny devices */
    }
}

/* ==========================================================================
   PREMIUM MOBILE NAVIGATION RE-DESIGN - DARK GOLD THEME (Release v41)
   ========================================================================== */
@media (max-width: 850px) {
    .nav-bar {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1.2rem 4% !important;
        text-align: center !important;
        position: relative !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: rgba(5, 5, 5, 0.98) !important;
        border-bottom: 1px solid #111 !important;
    }
    .nav-bar ul {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.4rem !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    .nav-bar li {
        width: 100% !important;
        margin: 0 !important;
    }
    .nav-bar a {
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        padding: 0.65rem 0.2rem !important;
        text-align: center !important;
        border: 1px solid rgba(212, 175, 55, 0.15) !important;
        border-radius: 4px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        letter-spacing: 0.5px !important;
        transition: 0.2s ease !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        color: #d4af37 !important;
    }
    .nav-bar a.active {
        color: #fff !important;
        border-color: #d4af37 !important;
        background: rgba(212, 175, 55, 0.1) !important;
        text-shadow: 0 0 5px rgba(212, 175, 55, 0.5) !important;
    }
    .nav-bar a:hover {
        color: #fff !important;
        text-shadow: 0 0 10px #d4af37 !important;
    }
}

/* ==========================================================================
   JUKEBOX MOBILE DESIGN IMPROVEMENTS (Release v41)
   ========================================================================== */
@media (max-width: 950px) {
    .jukebox-container {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
        width: 92% !important;
        margin: 2rem auto !important;
    }
    .player-panel {
        max-width: 480px !important;
        margin: 0 auto !important;
        width: 100% !important;
        padding: 1.5rem !important;
    }
}

@media (max-width: 850px) {
    /* Touch target padding for play/pause and items */
    .control-btn {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    .play-pause-btn {
        width: 52px !important;
        height: 52px !important;
    }
    
    /* Album/EP header collapse */
    .playlist-group-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }
    .group-thumb {
        margin: 0 auto !important;
    }
    
    /* Equal distribution for Jukebox Playlist tabs */
    .playlist-tabs {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        justify-content: space-between !important;
        gap: 4px !important;
        margin-bottom: 1.5rem !important;
    }
    .tab-btn {
        padding: 0.8rem 0.2rem !important;
        font-size: 0.75rem !important;
        flex: 1 !important;
        text-align: center !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Vocal Playground Mixer - Collapses into 2 Columns */
    .vocal-playground-board {
        padding: 1.2rem 1rem !important;
    }
    .board-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1.2rem !important;
    }
    .board-selectors {
        width: 100% !important;
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    .board-selectors > div {
        width: 100% !important;
    }
    .board-selectors select {
        width: 100% !important;
    }
    .faders-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
    .channel-strip {
        padding: 1rem 0.5rem !important;
    }
    .fader-wrap {
        height: 130px !important;
    }
}

@media (max-width: 480px) {
    /* Shrunk Vinyl visualizer deck to sit perfectly on small viewports without overflow */
    .player-panel {
        padding: 1rem 0.8rem !important;
    }
    .vinyl-deck {
        width: 240px !important;
        height: 240px !important;
        margin: 0.5rem auto 1.5rem auto !important;
    }
    .vinyl-container {
        width: 210px !important;
        height: 210px !important;
    }
    .center-label {
        width: 76px !important;
        height: 76px !important;
    }
    .tonearm {
        transform: rotate(-38deg) scale(0.75) !important;
        right: -8px !important;
    }
    .tonearm.playing {
        transform: rotate(-4deg) scale(0.75) !important;
    }
    
    /* Mixing Board collapses to Single Column for vertical scrubbing on narrow screens */
    .faders-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .channel-strip {
        padding: 1.5rem 1rem !important;
    }
}