﻿/* Dynamic viewport height updated from script.js on mobile */
:root {
    --app-height: 100vh;
}


html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    background: radial-gradient(circle, #91cdfa, #2e2372);
    min-height: var(--app-height, 100vh);
}
/* Main body layout */
body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
    overflow-y: hidden;
}

#where-background {
    position: fixed;
    inset: 0;
    background-image: url("images/where.gif");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    will-change: opacity;
}

/* Outer wrapper */
#jukebox-wrapper {
width: 100vw;
max-width: 100%;
display: flex;
justify-content: center;
align-items: flex-start;
padding: 0;
overflow-x: hidden;
position: relative;
z-index: 2;
}

/* Record + Jukebox container */
#jukebox-container {
position: relative;
margin-top: 140px; /* ðŸ‘ˆ creates space for record */
padding-bottom: 20px;
display: flex;
justify-content: center;
}

/* Record image */
.record {
    position: absolute;
    top: 15%;
    left: 50%;
    width: 350px;
    height: 350px;
    transform: translateX(-50%);
    opacity: 0;
    transition: top 0.5s, opacity 0.5s;
    z-index: 1; /* âœ… behind jukebox, above background */
    cursor: pointer;
    touch-action: manipulation;
}

.record.up {
    top: -120px; /* âœ… slides up into margin space */
    opacity: 1;
}

.record-seek-controls {
    position: absolute;
    left: 50%;
    top: -50px;
    transform: translateX(-50%) translateY(8px);
    width: min(450px, 78vw);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 420ms ease-out, transform 420ms ease-out, visibility 0s linear 420ms;
    z-index: 3;
}

.record-seek-controls.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    transition: opacity 420ms ease-out, transform 420ms ease-out, visibility 0s linear 0s;
}

body.modal-open .record-seek-controls {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(8px) !important;
    transition: opacity 420ms ease-out, transform 420ms ease-out, visibility 0s linear 420ms !important;
}

.record-seek-button {
    border: 1px solid #737373;
    background: transparent;
    color: #ffffff;
    padding: 4px 6px;
    min-width: 50px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.1px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    opacity: 0.85;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
    transition: color 160ms ease-out, transform 120ms ease-out, text-shadow 160ms ease-out;
}

.record-seek-button:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.68);
    transform: translateY(-1px);
}

.record-seek-button:active {
    transform: translateY(0);
}

.seek-arrow {
    font-size: 1.18em;
    line-height: 1;
}

.seek-seconds {
    font-size: 0.95em;
    font-weight: 700;
    line-height: 1;
}

/* Jukebox container */
#jukebox {
position: relative;
text-align: center;
max-width: 500px;
width: 90vw;
padding: 20px 20px 0 20px;
border-radius: 10px;
background: #2e2e3d;
box-shadow: 0 0 0 3px #ffffff;
border: 3px solid #738fff;
z-index: 2; /* âœ… above the record */
}

/* Jukebox Title */
h1 {
    font-size: 3.4em;
    line-height: 1.2;
    margin-bottom: 15px;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(90deg, #476bfc, #d4c9ff);
    background-size: 200% 200%;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    animation: gradientAnimation 3s ease-in-out infinite;
    font-weight: bold;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Title layout */
.title-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-text-main {
    white-space: nowrap;
}

.penguin-badge {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: none;
    background: linear-gradient(180deg, rgba(104, 111, 138, 0.45), rgba(62, 67, 84, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.24);
}

.penguin-icon {
    width: 30px;
    height: 30px;
    display: block;
    transform: scale(1.6);
    transform-origin: center center;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transition: transform 180ms ease-out;
}

.penguin-badge:hover .penguin-icon {
    animation: penguinBounce 560ms cubic-bezier(0.3, 0.8, 0.35, 1.2);
}

@keyframes penguinBounce {
    0% {
        transform: scale(1.6) translateY(0);
    }
    35% {
        transform: scale(1.62) translateY(-3px);
    }
    70% {
        transform: scale(1.58) translateY(1px);
    }
    100% {
        transform: scale(1.6) translateY(0);
    }
}

p {
    text-align: justify;
    line-height: 1.5;
}

.jukebox-description {
    position: relative;
    margin: 2px 0 12px;
    padding: 14px 24px 14px 24px;
    text-align: justify;
    line-height: 1.4;
    color: #f3f4f7;
    border-radius: 10px;
    border: 1px solid #b6b9c1;
    background-color: #343946;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 2px 12px rgba(0, 0, 0, 0.24);
}

.jukebox-description-text {
    display: block;
}

.sign-bolt {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(174, 182, 197, 0.72);
    background: radial-gradient(circle at 32% 30%, #dde2ec 0, #b6bfcd 48%, #8a94a5 100%);
    box-shadow: 0 0 0 1px rgba(44, 52, 67, 0.24);
    opacity: 0.82;
}

.sign-bolt--tl {
    top: 8px;
    left: 8px;
}

.sign-bolt--tr {
    top: 8px;
    right: 8px;
}

.sign-bolt--bl {
    bottom: 8px;
    left: 8px;
}

.sign-bolt--br {
    bottom: 8px;
    right: 8px;
}

#filters {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
}

.filter-group label {
    color: #dfe5ff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.random-track-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 9px;
    border: 1px solid #6f83e8;
    background: #31367f;
    color: #f0f3ff;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.random-track-button:hover {
    background: #3c4295;
    border-color: #8ea1ff;
    transform: translateY(-1px);
}

.random-track-button:active {
    transform: translateY(0);
}

.random-track-button:focus {
    outline: none;
    border-color: #9db0ff;
    box-shadow: 0 0 0 2px rgba(100, 128, 255, 0.2);
}

#tag-filter,
#sort-filter {
    background: #31367f;
    color: #e8ecff;
    border: 1px solid #6f83e8;
    border-radius: 8px;
    padding: 6px 28px 6px 10px;
    min-width: 0;
    width: 100%;
    font-size: 0.9rem;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #d6deff 50%),
        linear-gradient(135deg, #d6deff 50%, transparent 50%);
    background-position:
        calc(100% - 14px) calc(50% - 2px),
        calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

#tag-filter:hover,
#sort-filter:hover {
    background: #393f8f;
    border-color: #8094f5;
}

#tag-filter:focus,
#sort-filter:focus {
    outline: none;
    border-color: #9db0ff;
    box-shadow: 0 0 0 2px rgba(100, 128, 255, 0.2);
}

#tag-filter option,
#sort-filter option {
    background: #2f2c73;
    color: #ffffff;
}

#track-list {
max-height: 400px;
overflow-y: auto;
overflow-x: hidden;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
margin: 10px 0px 0;
padding: 10px;
border: 3px solid #373593;
border-radius: 10px;
box-shadow: 0 0 0 3px #ffffff;
}

#track-list.skeleton-loading {
    overflow: hidden;
}

.track.track-enter {
    opacity: 0;
    transform: translateY(8px);
}

#track-list.tracks-ready .track.track-enter {
    animation: trackFadeInUp 260ms ease-out forwards;
    animation-delay: var(--track-delay, 0ms);
}

@keyframes trackFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.track-skeleton {
    pointer-events: none;
}

.skeleton-cover {
    width: var(--cover-size);
    height: var(--cover-size);
    min-width: var(--cover-size);
    border-radius: 12px;
    margin-right: 15px;
}

.skeleton-line {
    height: 18px;
    border-radius: 8px;
}

.skeleton-title {
    width: min(240px, 72%);
    margin-bottom: 10px;
}

.skeleton-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.skeleton-pill {
    width: 56px;
    height: 20px;
    border-radius: 999px;
}

.skeleton-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.skeleton-button {
    width: 70px;
    height: 32px;
    border-radius: 10px;
}

.skeleton-time {
    width: 110px;
    height: 26px;
    border-radius: 10px;
}

.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.skeleton-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    animation: skeletonShimmer 1.2s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    100% {
        transform: translateX(100%);
    }
}

.frogquest-link {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 8px 0px 6px 0;
    line-height: 0;
}

.frogquest-gif {
    display: block;
}

.track {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #444;
    padding: 15px 10px 15px 10px;
    --cover-size: 88px;
}

.track.track-playing {
    z-index: 8;
    border-radius: 12px;
    background: rgba(54, 58, 88, 0.96);
    border-bottom-color: rgba(154, 168, 248, 0.35);
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.35);
}

.track.track-playing-fade-out {
    border-radius: 12px;
    animation: trackPlayingFadeOut 220ms ease-out;
}

@keyframes trackPlayingFadeOut {
    from {
        background: rgba(54, 58, 88, 0.96);
        border-bottom-color: rgba(154, 168, 248, 0.35);
        box-shadow: 0 7px 16px rgba(0, 0, 0, 0.35);
    }

    to {
        background: transparent;
        border-bottom-color: #444;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

.track.track-playing.track-playing-stick-top {
    position: sticky;
    top: 0;
}

.track.track-playing.track-playing-stick-bottom {
    position: sticky;
    bottom: 0;
}

.track img {
    width: var(--cover-size);
    height: var(--cover-size);
    min-width: var(--cover-size);
    max-width: var(--cover-size);
    min-height: var(--cover-size);
    max-height: var(--cover-size);
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 12px;
    margin-right: 15px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid rgba(100, 100, 120, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 200ms ease-out, box-shadow 200ms ease-out, border-color 200ms ease-out;
    flex-shrink: 0;
    align-self: flex-end;
}

.track img.cover-loading {
    filter: brightness(1.5);
}

.track img:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border-color: rgba(130, 130, 150, 0.6);
}

.track img:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.track-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
}



.title {
    font-weight: bold;
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: auto;
    overscroll-behavior-x: contain;
    cursor: grab;
    user-select: none;
}

.title-text {
    flex: 0 0 auto;
}

.tags {
    margin: 4px 0;
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: auto;
    overscroll-behavior-x: contain;
    cursor: grab;
    user-select: none;
}

#track-list .play-button,
#track-list img,
#track-list .clickable-tag {
    touch-action: pan-y;
}

.horizontal-scroll.dragging {
    cursor: grabbing;
}

.title::-webkit-scrollbar,
.tags::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.tag-bubble {
    background: #373593;
    color: #ccc;
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 0.9em;
    flex: 0 0 auto;
}

.clickable-tag {
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.clickable-tag:hover {
    transform: scale(1.1);
    background-color: #476bfc;
}

audio {
    width: 100%;
    height: 40px;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
}

.play-button {
    background-color: #7BA8D0;
    color: #fff;
    border: none;
    padding: 7px 18px;
    font-size: 0.95em;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 120ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out, width 300ms cubic-bezier(0.4, 0, 0.2, 1), min-width 300ms cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    margin-right: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 70px;
    width: auto;
}

.play-button span {
    display: inline-block;
    transition: transform 400ms cubic-bezier(0.68, -0.6, 0.32, 1.6), opacity 200ms ease-out !important;
    transform: scale(1);
    opacity: 1;
}

.play-button.transitioning span {
    transform: scale(0.3) !important;
    opacity: 0 !important;
}

.play-button:not(.transitioning) span {
    transform: scale(1) !important;
    opacity: 1 !important;
    animation: bounceIn 400ms cubic-bezier(0.68, -0.6, 0.32, 1.6) !important;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.play-button:hover::before {
    left: 100%;
}

.play-button:hover {
    transform: scale(1.05);
    background-color: #6B98C0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.play-button:active {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.time-display {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.85em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateX(-14px);
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 160ms ease-out, transform 220ms ease-out, max-width 220ms ease-out;
    position: relative;
    z-index: 0;
    letter-spacing: 0.2px;
    line-height: 1;
}

.time-display.visible {
    opacity: 1;
    transform: translateX(0);
    max-width: 150px;
}

.time-display.loading {
    color: rgba(255, 255, 255, 0.74);
    filter: saturate(0.65);
}

.time-display.ready-fade {
    animation: timeReadyFade 220ms ease-out;
}

@keyframes timeReadyFade {
    from {
        opacity: 0.38;
        filter: blur(0.8px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: visible;

    margin-top: auto;
    padding-bottom: 1px;        /* NEW: tiny buffer so it never kisses the bottom */
}


.play-button {
    position: relative;
    z-index: 1;
}

.release-date {
    font-size: 0.75em;
    color: #ccc;
    opacity: 0.7;
    margin-left: 2px;
    padding: 4px 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    background: #0000002e;
    flex: 0 0 auto;
}

/* Mobile */
@media (max-width: 600px) {
    html, body {
        width: 100%;
        height: var(--app-height, 100dvh);
        min-height: var(--app-height, 100dvh);
        overflow: hidden;
    }

    body {
        position: fixed;
        inset: 0;
    }

    #jukebox-wrapper {
        width: 100%;
        height: var(--app-height, 100dvh);
        min-height: var(--app-height, 100dvh);
        overflow: hidden;
        margin-top: 0;
        padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        align-items: flex-start;
    }

    #jukebox-container {
        width: 100%;
        margin-top: 74px;
        height: calc(100% - 74px);
        padding-bottom: 0;
        box-sizing: border-box;
    }

    #jukebox {
        width: calc(100vw - 25px);
        max-width: none;
        height: 98%;
        max-height: 98%;
        padding: 10px 10px 8px 10px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    #track-list {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        margin: 6px 0 0 0;
        padding: 4px;
    }

    .frogquest-link {
        padding: 12px 0px 0;
    }

    h1 {
        font-size: 2.2em;
        line-height: 1.05;
        margin: 0 0 6px 0;
    }

    #jukebox > p {
        margin: 2px 0 6px 0;
        font-size: 0.85rem;
        line-height: 1.15;
    }

    #filters {
        margin-bottom: 6px;
        gap: 6px;
    }

    .filter-group {
        gap: 4px;
    }

    .filter-group label {
        font-size: 0.72rem;
    }

    .random-track-button {
        width: 30px;
        height: 30px;
        min-width: 30px;
        flex-basis: 30px;
        font-size: 0.95rem;
    }

    .track {
        flex-direction: row;
        align-items: stretch;
        --cover-size: 78px;
    }

    .track img {
        width: var(--cover-size);
        height: var(--cover-size);
        margin-right: 10px;
    }

    .track-info {
        min-width: auto;
        flex: 1;
    }

    .title {
        font-size: 1.15rem;
    }

    .tag-bubble {
        font-size: 0.75em;
        padding: 2px 6px;
    }

    .play-button {
        font-size: 0.86em;
        padding: 5px 12px;
    }

    .time-display {
        font-size: 0.72em;
        padding: 3px 8px;
    }

    .time-display.visible {
        max-width: 128px;
    }

    .cover-modal-close {
        top: -12px;
        right: -10px;
        font-size: 1.3em;
        width: 32px;
        height: 32px;
    }

    .cover-modal-overlay {
        background: rgba(0, 0, 0, 0.95);
    }

    /* Ensure modal is on top of everything on mobile */
    .cover-modal {
        z-index: 99999;
    }

    .record {
        width: 210px;
        height: 210px;
    }

    .record-seek-controls {
        top: -40px;
        width: min(300px, 86vw);
    }

    .record-seek-button {
        min-width: 42px;
        font-size: 0.86rem;
        padding: 3px 6px;
    }

    .record.up {
        top: -82px;
        opacity: 1;
    }

    .penguin-badge {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .penguin-icon {
        width: 24px;
        height: 24px;
        transform: scale(1.45);
    }
}

/* â”€â”€â”€â”€â”€ CUSTOM SCROLLBAR FOR THE TRACK LIST â”€â”€â”€â”€â”€ */
#track-list {
    /* existing styles... */
    scrollbar-width: thin;          /* Firefox */
    scrollbar-color: #738fff #2e2e3d;  /* thumb + track color (Firefox) */
}

/* Webkit browsers (Chrome, Edge, Safari, Android, iOS) */
#track-list::-webkit-scrollbar {
    width: 10px;                     /* vertical scrollbar */
    height: 10px;                    /* horizontal (wonâ€™t appear anyway) */
}

#track-list::-webkit-scrollbar-track {
    background: #2e2e3d;             /* dark background like your jukebox */
    border-radius: 10px;
    border: 2px solid #373593;
}

#track-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #738fff, #580af5); /* matches your title gradient */
    border-radius: 10px;
    border: 2px solid #2e2e3d;
}

#track-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8ba8ff, #7a2eff);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* â”€â”€â”€â”€â”€ OPTIONAL: make the whole page scrollbar match too â”€â”€â”€â”€â”€ */
html {
    scrollbar-width: thin;
    scrollbar-color: #738fff #2e2e3d;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #2e2e3d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #738fff, #580af5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8ba8ff, #7a2eff);
}

/* FORCE PORTRAIT + AUTO-RESET WHEN ROTATING BACK */
@media screen and (orientation: landscape) and (max-width: 920px) {
    /* Full-screen "rotate back" message */
    body::before {
        content: "Please rotate to portrait â†‘";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.95);
        color: #fff;
        font-size: 1.8rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 40px;
        z-index: 99999;
        backdrop-filter: blur(8px);
    }

    /* Hide all real content while in landscape */
    body > * {
        visibility: hidden !important;
    }
}

/* Cover Art Modal */
.cover-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 300ms ease-out;
    pointer-events: none;
}

.cover-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.cover-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.cover-modal.active .cover-modal-overlay {
    opacity: 1;
}

.cover-modal-content {
    position: relative;
    z-index: 10001;
    width: var(--modal-width, 460px);
    height: var(--modal-height, 460px);
    max-width: min(84vw, 720px);
    max-height: min(82vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 250ms ease-out;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cover-modal-content img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(220, 224, 238, 0.62);
}

.cover-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: rgba(30, 32, 44, 0.76);
    border: 1px solid rgba(206, 212, 231, 0.55);
    color: rgba(243, 247, 255, 0.92);
    font-size: 1.35em;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out;
    line-height: 1;
    padding: 0;
}

.cover-modal-close:hover {
    background: rgba(47, 51, 69, 0.88);
    border-color: rgba(242, 246, 255, 0.78);
    transform: scale(1.06);
}

/* This is the key part â€” reset everything when back in portrait */
@media screen and (orientation: portrait) {
    body::before {
        display: none !important;
    }
    body > * {
        visibility: visible !important;
    }
    
    /* Force a full refresh of layout when returning to portrait */
    #jukebox-wrapper, #jukebox-container, #jukebox {

        zoom: 1 !important;

    }
    
    /* Fix iOS Safari weird zoom/scale bug on rotate back */
    body {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}
