
:root {
    --bg-black: #050505;
    --gta-yellow: #e8c800;
    --text-white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg-black); 
    color: var(--text-white); 
    height: 100vh; 
    display: flex; 
    overflow: hidden;
}

/* Navigation */
nav { position: absolute; right: 50px; }
nav a { 
    color: var(--text-white); text-decoration: none; font-size: 0.8rem; 
    font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; 
    transition: opacity 0.3s; cursor: pointer;
}
nav a:hover, nav a.active { opacity: 1; color: var(--gta-yellow); }

/* Left Side Container */
.left-side { 
    width: 50%; 
    padding: 60px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    position: relative; 
    z-index: 2;
    background: var(--bg-black); /* Ensure background on desktop */
}

.logo { font-weight: 700; position: relative; letter-spacing: -1px;}
.logo img { width: 67px; height: auto; }
.logo span { 
    font-size: 15px; background: #fff; padding: 5px 17px; border-radius: 20px; 
    color: #000; position: absolute; top: 74px; left: -18px; 
}

.content-wrap {
    margin-top: auto; 
    margin-bottom: auto;
}

.track-info h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); text-transform: uppercase; line-height: 0.85; margin-bottom: 10px; letter-spacing: -2px; }
.track-info h1.long-title {
    font-size: 3rem;
}
.track-info h1.extra-long-title {
    font-size: 2.5rem;
}
.track-info h2 { font-size: 1.5rem; font-weight: 300; opacity: 0.8; color: var(--gta-yellow); margin-bottom: 15px; }
.track-info h2 span { font-style: normal; font-weight: 300; margin-right: 0; color: #fff; opacity: 0.5; text-transform: lowercase; }
.track-description { font-size: 1rem; line-height: 1.4; opacity: 0.8; max-width: 500px; margin-bottom: 30px; }
.track-album {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.8;
    color: #ffffff;
    margin-bottom: 15px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: none;
}

.player-controls { display: flex; align-items: center; gap: 30px; }
#play-btn { 
    background: var(--gta-yellow); border: none; width: 80px; height: 80px; flex-shrink: 0;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; 
}
#play-btn svg { width: 30px; fill: var(--bg-black); }
.timer { font-size: 3.5rem; font-weight: 400; opacity: 0.4; letter-spacing: -2px; }

.header-nav-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.station-selector {
    display: flex;
    gap: 10px;
}

.switch-btn, .drawer-link {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 12px !important;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
}

.switch-btn.active, .drawer-link.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.switch {
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

/* Rotate the icon slightly when active */
.switch.active {
    transform: rotate(90deg);
}

.station-links {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.5s ease, opacity 0.3s ease;
    white-space: nowrap;
}

.station-links.open {
    max-width: 300px; /* Adjust based on your text width */
    opacity: 1;
}

.drawer-link:hover {
    color: #ffcc00; /* Your accent yellow */
}

/* Footer Meta - Desktop Position */
.footer-meta { 
    position: fixed; bottom: 60px; left: 60px; z-index: 3;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0; 
    transition: opacity 0.5s ease-in-out; 
}
.footer-meta.visible {
    opacity: 1;
}
.footer-meta.hidden {
    display: none;
}

/* Right Side: Artwork */
.right-side { 
    width: 50%; 
    background-size: cover; 
    background-position: center; 
    background-color: #111; 
    position: relative; 
    transition: background-image 0.8s ease-in-out;
    z-index: 1;
}

/* Schedule Overlay */
#schedule-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gta-yellow); color: #000; padding: 80px 40px;
    display: none; flex-direction: column; overflow-y: auto; z-index: 10;
}
/* ... (Day picker and schedule item styles remain the same) ... */
.day-picker { display: flex; justify-content: space-between; margin-bottom: 40px; }
.day { text-align: center; cursor: pointer; opacity: 0.4; transition: 0.3s; }
.day.active { opacity: 1; font-weight: 900; }
.day span { display: block; font-size: 0.7rem; text-transform: uppercase; margin-bottom: 5px; }
.day b { font-size: 1.5rem; border: 2px solid transparent; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.day.active b { border-color: #000; }
.schedule-item { display: flex; gap: 30px; margin-bottom: 40px; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 20px; }
.sch-time { font-size: 1.5rem; font-weight: 900; min-width: 80px; color: #000; }
.sch-details h3 { font-size: 1.4rem; text-transform: uppercase; font-weight: 900; display: flex; flex-direction: column; }
.sch-details p { font-size: 1rem; margin-top: 5px; opacity: 0.8; line-height: 1.3; }
.live-label { 
    background: #000;
    color: var(--gta-yellow);
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 900;
    margin-left: 0;
    border-radius: 3px;
    display: inline-block;
    width: max-content; 
}
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-weight: 300;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    z-index: 101;
}

.close-btn:hover {
    opacity: 0.6;
} 

.sch-details p, #nav-radio, #track-description { 
    display: none;
}

.on-demand-btn {
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 20px;
    color: var(--gta-yellow);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: opacity 0.3s;
}
.on-demand-btn:hover { opacity: 0.7; }

.live-badge {
    display: none; /* Hidden by default */
    background: #a41935;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin-right: 10px;
    border-radius: 100px;
    vertical-align: middle;
    animation: live-pulse 2s infinite;
    padding: 0.5em 1em;
}

.book-bookmark {
    position: absolute;
    right: 30px;
    width: 130px;
    background: #ff3e3e; 
    padding: 20px 15px 45px 15px;
    z-index: 5;
    transition: top 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.3));
}

.book-bookmark:hover {
    top: -10px;
}

.book-bookmark::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 30px;
    background: #ff3e3e;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 0%, 0 80%);
}

.bookmark-label {
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%;
    text-align: center;
    margin: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    pointer-events: none; 
}

#book-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    margin-bottom: 5px;
    transition: opacity 0.3s ease 0.2s;
}

.book-bookmark:hover #book-links-list {
    opacity: 1;
    transition-delay: 0.1s;
}

.book-link-item {
    color: #fff;
    border: 1px solid #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 2px 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.book-link-item:hover {
    background: #000;
    color: #ffffff;
}

@keyframes live-pulse {
    0% { opacity: 1; box-shadow: 0 0 0px rgba(255, 62, 62, 0); }
    50% { opacity: 0.6; box-shadow: 0 0 10px rgba(255, 62, 62, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 0px rgba(255, 62, 62, 0); }
}

/* --- MOBILE RESPONSIVE STYLES --- */

@media (min-width: 769px) {
    .track-info {
            margin-bottom: 20%;
    }
    .close-btn img {
        filter: invert(1);
    }
}

@media (max-width: 932px) and (orientation: landscape) {
  .left-side {
        padding: 20px;
  }
  .logo span {
        border-radius: 0 20px 20px 0; 
  }
  .track-info h1 {
    font-size: 1.3rem;
    letter-spacing: -1px;
  }
  .track-info {
    margin-bottom: 10%;
  }
  .track-info h1.long-title {
    font-size: 1.2rem;
  }
  .track-info h2 {
    font-size: 1.2rem;
  }
  #play-btn {
    width: 70px;
    height: 70px;
  }
  nav {
    right: 30px;
    top: 20px;
  }
  .content-wrap {
    margin-bottom: 0;
   }
}

@media (max-width: 768px) {
    body { 
        flex-direction: column; 
        height: auto; 
        height: 100dvh; 
        in-height: 100vh;
        overflow-y: auto; 
    }
    
    nav { top: 25px; right: 20px; gap: 20px; }

    /* Artwork becomes the hero background */
    .right-side {
        position: absolute;
        bottom: 0; left: 0;
        width: 100%;
        height: 70vh; /* Takes up 70% of screen height */
        z-index: 0;
        background-color: var(--gta-yellow);
        background-blend-mode: multiply;
    }
    
    /* Gradient Overlay for readability */
    .right-side::after {
        content: '';
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: linear-gradient(to top, transparent 26%, var(--bg-black) 90%)
    }

    /* Content sits on top of artwork */
    .left-side {
        width: 100%;
        height: 70vh; /* Match artwork height */
        padding: 30px 20px;
        background: transparent; /* Make transparent */
        justify-content: space-between; /* Logo top, content bottom */
    }
    
    .content-wrap { margin-top: auto; } /* Ensure it's at the bottom */

    .track-info h1 { font-size: 2rem; }
    .track-info h2 { font-size: 1.2rem; margin-bottom: 30px; }
    .track-description { font-size: 0.9rem; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .player-controls { gap: 20px; }
    #play-btn { width: 70px; height: 70px; }
    .timer { font-size: 3rem; }

    /* Yellow footer bar at bottom */
    .footer-meta {
        position: absolute; /* Not fixed on mobile */
        bottom: 0; left: auto;
        width: 100%;
        padding: 0;
        background: transparent;
        color: var(--bg-black);
        z-index: 2;
    }
    .footer-meta.visible {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 40%, transparent 100%);
    }
    .footer-meta span { color: #ffffff !important; opacity: 1; }

    .up-next {
        padding: 0 20px;
    }

    /* Full Screen Schedule */
    #schedule-overlay {
        position: fixed;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        background: var(--bg-black);
        color: #ffffff;
    }
    .day-picker { overflow-x: auto; gap: 15px; justify-content: flex-start; padding-bottom: 10px; }
    .day { flex-shrink: 0; }
    .day.active b {
        border-color: var(--gta-yellow);
    }

    .sch-time {
        color: var(--gta-yellow);
        font-size: 1.2rem;
        min-width: 70px;
    }
    .sch-details h3 {
        font-size: 1.2rem;
        font-weight: 700;
    }
    .close-btn {
        top: 25px;
        right: 25px;
    }
    .live-label {
        display: inline-block;
        background: #ff0000;
        color: #ffffff;
        font-weight: 700;
        margin-left: 0;
    }
    .logo span {
        padding: 5px 20px;
        border-radius: 0 20px 20px 0;
        left: -20px;
    }
    /* 1. Reset the Bookmark to a standard block */
    .book-bookmark {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: unset !important; 
        right: 0;
        bottom: 0;
        width: 100%;
        background: transparent; /* Subtle dark backing instead of solid red */
        padding: 10px 20px 15px;
        box-shadow: none;
        border-radius: 0;
        /* Remove the triangle tip on mobile */
        filter: none;
    }

    /* 2. Hide the swallowtail triangle */
    .book-bookmark::after {
        display: none;
    }

    /* 3. Style the heading */
    .bookmark-label {
        order: 1;
        position: static; 
        text-align: left;
        padding-bottom: 10px;
        opacity: 0.8;
        letter-spacing: 0;
    }

    /* 4. Align links horizontally */
    #book-links-list {
        flex-direction: row; /* Horizontal row */
        order: 2;
        flex-wrap: wrap; /* Wrap if too many links */
        gap: 5px;
        opacity: 1 !important; /* Always visible on mobile */
    }

    /* 5. Adjust link style for touch */
    .book-link-item {
        background: none;
        padding: 0;
        border-radius: 0;
        font-size: 0.7rem;
        border: 0;
    }

    .track-info h1.long-title {
        font-size: 2rem;
        letter-spacing: -1px;
    }
    .track-info h1.extra-long-title {
        font-size: 1.5rem;
        letter-spacing: -1px;
    }
}