.side-header {
    position: fixed;     
    top: 15%;            
    right: 0;           
    z-index: 1000;     
}

.nav-menu {
    display: flex;
    flex-direction: column; 
    gap: 30px;              
}

.nav-tag {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 2px;
    
    border: 1px solid #ffffff;
    border-right: none; 
    
    padding: 12px 40px 12px 30px; 
    
    background-color: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(4px); 
    
    transition: all 0.3s ease;
}


.nav-tag:hover {
    background-color: #ffffff;
    color: #000000;
    
    padding-left: 45px; 
}

/*the bookshelf*/
body {
    background-color: #0a0a0a; 
    color: hsl(0, 0%, 88%);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


.site-header {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    text-transform: uppercase;
}

.site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bookshelf-section {
    width: 90%;
    margin-top: 5vh;
}

.book-list {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px; 
    list-style: none;
    padding: 0;
    border-bottom: 2px solid #333; 
}


.book-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.book-item a {
    text-decoration: none;
    color: inherit;
}

.book-item:hover {
    transform: translateY(-15px); 
}


.book-spine {
    writing-mode: vertical-rl; 
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 10px;
    width: 40px; 
}

.theme-dark-red { background-color: #8b2626; height: 320px; color: #111; }
.theme-faded-blue { background-color: #5c7b99; height: 380px; color: #fff; }
.theme-dust-yellow { background-color: #c9b987; height: 240px; width: 55px; color: #222; }
.theme-bone-white { background-color: #e8e8e8; height: 420px; width: 35px;  color: #000;}
.theme-obsidian-black { background-color: #1a1a1a; height: 350px; color: #a3a3a3; border-top-right-radius: 4px; border-top-left-radius: 4px;}

.preview-section {
    margin-top: 40px;
    height: 300px;
    display: flex;
    justify-content: center;
}

.cover-image {
    width: 200px;
    height: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.4s ease; 
}

.is-flipping {
    animation: pageFlip 1s ease-in-out forwards;
    transform-origin: left center;
}

@keyframes pageFlip {
    0% { transform: perspective(1000px) rotateY(0deg); }
    50% { transform: perspective(1000px) rotateY(-90deg) scale(1.1); filter: brightness(1.5); }
    100% { transform: perspective(1000px) rotateY(-180deg); opacity: 0; }
}

.site-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #666;
}


/* the music*/
.audio-archive-section {
    position: relative;
    width: 100%;
    min-height: 80vh; 
    background-color: #000000; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    margin-top: 10vh; 
}


.turntable-container {
    position: relative;
    z-index: 10; 
    width: 50%;
    max-width: 650px;
    min-width: 300px;
    margin-top: 10px; 
}

.turntable-image {
    width: 100%;
    height: auto;
    display: block;
}

.turntable-platter-target {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; 
    height: 10px;
    z-index: -1; 
}

.vinyl-stack {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    z-index: 5; 
}

.stack-left {
    left: -120px; 
}

.stack-right {
    right: -120px; 
}

.vinyl-disc {
    width: 280px;
    height: 280px;
    border-radius: 50%; 
    background-size: cover;
    background-position: center;
    border: 15px solid #111; 
    position: relative;
    box-shadow: 15px 15px 30px rgba(0,0,0,0.9); 
    transition: transform 1s ease-in-out, z-index 0.3s, border 0.3s, box-shadow 0.3s;
    cursor: pointer;
    outline: none; 
}

.vinyl-disc + .vinyl-disc {
    margin-top: -140px; 
}

.vinyl-disc::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: #000;
    border-radius: 50%;
    border: 2px solid #222; 
}

.vinyl-stack .vinyl-disc:hover {
    z-index: 20; 
}

.stack-left .vinyl-disc:hover {
    transform: translateX(60px); 
}

.stack-right .vinyl-disc:hover {
    transform: translateX(-60px);
}

.stack-left .vinyl-disc:focus-within {

    transform: translateX(calc(50vw + 120px)) scale(0.8);
    z-index: 30; 

    animation: rotateDiscOnTurntable 2s linear infinite 1s; 
}


.stack-right .vinyl-disc:focus-within {
    transform: translateX(calc(-50vw - 120px)) scale(0.8);
    z-index: 30; 
    animation: rotateDiscOnTurntable 2s linear infinite 1s;
}

.stack-left .vinyl-disc:focus-within,
.stack-right .vinyl-disc:focus-within {
    border: 5px solid #111; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
}

@keyframes rotateDiscOnTurntable {
    0% {
        transform: translateX(calc(50vw + 120px)) scale(0.8) rotate(0deg);
    }
    100% {
        transform: translateX(calc(50vw + 120px)) scale(0.8) rotate(360deg);
    }
}

/*The media about phone*/
@media (max-width: 768px) {
    
    
    .site-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
        gap: 10px;
    }
    
    .header-title {
        font-size: 1.5rem; 
        margin: 0;
    }

    .bookshelf-section {
        width: 100%;
        margin-top: 3vh;
        overflow-x: auto; 
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; 
        
        scrollbar-width: none; 
        -ms-overflow-style: none; 
    }
    .bookshelf-section::-webkit-scrollbar {
        display: none; 
    }

    .book-list {
        justify-content: flex-start; 
        width: max-content; 
        padding: 0 20px; 
        gap: 2px; 
    }

    .book-spine {
        width: 30px; 
        padding: 15px 5px;
        font-size: 0.85rem; 
    }

    .theme-dark-red { height: 220px; }
    .theme-faded-blue { height: 260px; }
    .theme-dust-yellow { height: 160px; width: 40px; } 
    .theme-bone-white { height: 300px; }
    .theme-obsidian-black { height: 240px; }

    .preview-section {
        margin-top: 30px;
        height: 250px;
    }

    .cover-image {
        width: 140px; 
    }
}