/* =========================================================
   music.css — music page layout + the vinyl shelf + player
========================================================= */

/* grid: about (top left) / favourites (top right) / shelf (bottom) */

.music-grid {
    width: calc(100% - 26px);
    margin-left: 26px;   
    margin-top: 50px;  
    height: calc(100% - 50px);
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 22px;
    opacity: 0;
    animation: contentFade .8s ease .15s forwards;
}

/* page title */
.music-box--about h3 {
    margin: 0 0 10px;
    font-family: "Mate SC", serif;
    font-size: 26px;
    font-weight: 700;
}

/* section headings */
.music-box--favs h3,
.music-box--shelf h3 {
    margin: 0 0 8px;
    font-family: "Mate SC", serif;
    font-size: 18px;
    font-weight: 600;
}

.music-box--about { grid-column: 1; grid-row: 1; }

.music-box--about p {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(234, 234, 234, .85);
}

.music-box--favs { grid-column: 2; grid-row: 1; }

.music-favs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.music-favs a {
    display: block;
    color: inherit;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    line-height: 1.3;
}

.music-favs a:hover { text-decoration: underline; }

.music-favs a span {
    display: block;
    font-size: 12px;
    opacity: .65;
}

.music-box--shelf {
    grid-column: 1 / 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
}

/* the vinyl shelf itself */

#vinyl-gallery {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 2px;
    margin-bottom: 40px;
    position: relative;
}

#vinyl-gallery .vinyl {
    perspective: 500px;
    width: 18px;
    transition: width 0.5s;
}

#vinyl-gallery .vinyl:hover { width: 100px; }

#vinyl-gallery img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transform: rotateY(25deg);
    transform-style: preserve-3d;
    transition: transform 0.5s, width 0.5s, height 0.5s, margin-top 0.5s;
}

#vinyl-gallery .vinyl:hover img {
    transform: rotateY(10deg);
    width: 108px;
    height: 108px;
    margin-top: -2px;
}

#vinyl-gallery .title {
    color: #FFFFFF;
    visibility: hidden;
    position: absolute;
    bottom: 120px;   
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: max-content;
    pointer-events: none;
}

#vinyl-gallery .vinyl:hover + .title { visibility: visible; }

/* --- music player --- */

.music-player {
    position: fixed;
    top: 130px;
    left: calc(100vw - 800px); 
    width: 300px;
    height: 175px;
    background: #5e5050;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    overflow: hidden;
    z-index: 2000;

    transform: scale(var(--ui-scale));  
    transform-origin: top left;

    opacity: 0;   /* fades in with everything else */
    animation: contentFade .8s ease .15s forwards;
}

.drag-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 24px;
    background: #5e5050;
    color: #fff;
    font-size: 14px;
    line-height: 24px;
    padding-left: 8px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    z-index: 2001;
}

.drag-bar:active { cursor: grabbing; }

.music-player iframe {
    position: absolute;
    top: 24px;
    left: 0;
    width: 300px;
    height: 300px;
    border: 0;
}