/* ===== BOOK READER STYLES ===== */
.book-reader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Book opening animation */
.book-reader-container[style*="display: flex"] {
    animation: bookOpen 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes bookOpen {
    0% {
        opacity: 0;
        transform: scale(0.9) rotateY(-10deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98) rotateY(-2deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        filter: blur(0);
    }
}

.book-reader {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
    isolation: isolate;
    width: 100%;
    height: calc(100vh - 80px);
}


.book-spread {
    display: flex;
    width: 100%;
    max-width: 1600px;
    height: 100%;
    max-height: calc(100vh - 100px);
    gap: 0;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 2500px;
    transform-origin: center center;
}

/* Realistic page flip animation - individual pages curl */
.book-page-left,
.book-page-right {
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 0.1s ease-out;
}

.book-page-right {
    transform-origin: left center;
}

/* Right page flipping left (going forward) */
.book-page-right.page-flipping-left {
    animation: pageFlipLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 10;
    position: relative;
}

/* Left page flipping right (going backward) */
.book-page-left.page-flipping-right {
    animation: pageFlipRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 10;
    position: relative;
}

@keyframes pageFlipLeft {
    0% {
        transform: perspective(2500px) rotateY(0deg) translateZ(0);
        filter: brightness(1) contrast(1);
        box-shadow: 
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    15% {
        transform: perspective(2500px) rotateY(-15deg) translateZ(20px);
        filter: brightness(0.98) contrast(1.02);
        box-shadow: 
            -30px 0 50px rgba(0,0,0,0.4),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    30% {
        transform: perspective(2500px) rotateY(-45deg) translateZ(40px);
        filter: brightness(0.92) contrast(1.05);
        box-shadow: 
            -60px 0 80px rgba(0,0,0,0.5),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    50% {
        transform: perspective(2500px) rotateY(-90deg) translateZ(50px);
        filter: brightness(0.75) contrast(1.1);
        box-shadow: 
            -100px 0 100px rgba(0,0,0,0.6),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    70% {
        transform: perspective(2500px) rotateY(-135deg) translateZ(40px);
        filter: brightness(0.6) contrast(1.15);
        box-shadow: 
            -60px 0 80px rgba(0,0,0,0.5),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    85% {
        transform: perspective(2500px) rotateY(-165deg) translateZ(20px);
        filter: brightness(0.4) contrast(1.2);
        box-shadow: 
            -30px 0 50px rgba(0,0,0,0.4),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    100% {
        transform: perspective(2500px) rotateY(-180deg) translateZ(0);
        filter: brightness(0.3) contrast(1.25);
        box-shadow: 
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
        opacity: 0;
    }
}

@keyframes pageFlipRight {
    0% {
        transform: perspective(2500px) rotateY(0deg) translateZ(0);
        filter: brightness(1) contrast(1);
        box-shadow: 
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    15% {
        transform: perspective(2500px) rotateY(15deg) translateZ(20px);
        filter: brightness(0.98) contrast(1.02);
        box-shadow: 
            30px 0 50px rgba(0,0,0,0.4),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    30% {
        transform: perspective(2500px) rotateY(45deg) translateZ(40px);
        filter: brightness(0.92) contrast(1.05);
        box-shadow: 
            60px 0 80px rgba(0,0,0,0.5),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    50% {
        transform: perspective(2500px) rotateY(90deg) translateZ(50px);
        filter: brightness(0.75) contrast(1.1);
        box-shadow: 
            100px 0 100px rgba(0,0,0,0.6),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    70% {
        transform: perspective(2500px) rotateY(135deg) translateZ(40px);
        filter: brightness(0.6) contrast(1.15);
        box-shadow: 
            60px 0 80px rgba(0,0,0,0.5),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    85% {
        transform: perspective(2500px) rotateY(165deg) translateZ(20px);
        filter: brightness(0.4) contrast(1.2);
        box-shadow: 
            30px 0 50px rgba(0,0,0,0.4),
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
    }
    100% {
        transform: perspective(2500px) rotateY(180deg) translateZ(0);
        filter: brightness(0.3) contrast(1.25);
        box-shadow: 
            0 20px 60px rgba(0,0,0,0.5),
            inset 0 0 100px rgba(0,0,0,0.03);
        opacity: 0;
    }
}

/* Add gradient overlay to curling page for realistic shadow effect */
.book-page-right.page-flipping-left::before,
.book-page-left.page-flipping-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 30%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.5) 70%,
        rgba(0,0,0,0.7) 90%,
        rgba(0,0,0,0.9) 100%
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: pageShadowGradient 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    border-radius: inherit;
}

.book-page-left.page-flipping-right::before {
    background: linear-gradient(
        to left,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 30%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.5) 70%,
        rgba(0,0,0,0.7) 90%,
        rgba(0,0,0,0.9) 100%
    );
}

@keyframes pageShadowGradient {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
    80% {
        opacity: 0.9;
    }
    100% {
        opacity: 1;
    }
}

/* Subtle backdrop effect during page turn */
.book-spread.turning-left,
.book-spread.turning-right {
    position: relative;
}

.book-spread.turning-left::after,
.book-spread.turning-right::after {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(
        circle at center,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.05) 50%,
        transparent 100%
    );
    z-index: -1;
    opacity: 0;
    animation: backdropPulse 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

@keyframes backdropPulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

.book-page-left,
.book-page-right {
    flex: 1;
    background: #faf8f3;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 0 100px rgba(0,0,0,0.03);
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.01) 1px,
            rgba(0,0,0,0.01) 2px
        ),
        radial-gradient(
            circle at 20% 50%,
            rgba(255,255,255,0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 50%,
            rgba(255,255,255,0.1) 0%,
            transparent 50%
        );
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

/* Add subtle paper texture during flip */
.book-page-right.page-flipping-left,
.book-page-left.page-flipping-right {
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.01) 1px,
            rgba(0,0,0,0.01) 2px
        ),
        radial-gradient(
            circle at 20% 50%,
            rgba(255,255,255,0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 50%,
            rgba(255,255,255,0.15) 0%,
            transparent 50%
        ),
        linear-gradient(
            90deg,
            rgba(0,0,0,0.02) 0%,
            rgba(0,0,0,0.05) 50%,
            rgba(0,0,0,0.02) 100%
        );
}

.book-page-left {
    border-radius: 8px 0 0 8px;
    border-right: 1px solid rgba(0,0,0,0.1);
}

.book-page-right {
    border-radius: 0 8px 8px 0;
    border-left: 1px solid rgba(0,0,0,0.1);
}

.book-spine-divider {
    width: 20px;
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.1) 0%, 
        rgba(0,0,0,0.2) 50%, 
        rgba(0,0,0,0.1) 100%
    );
    position: relative;
    z-index: 5;
    box-shadow: 
        inset -5px 0 10px rgba(0,0,0,0.2),
        inset 5px 0 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.book-spine-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.3);
    transform: translateX(-50%);
}

.book-page-left::-webkit-scrollbar,
.book-page-right::-webkit-scrollbar {
    width: 8px;
}

.book-page-left::-webkit-scrollbar-track,
.book-page-right::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

.book-page-left::-webkit-scrollbar-thumb,
.book-page-right::-webkit-scrollbar-thumb {
    background: rgba(102,126,234,0.5);
    border-radius: 4px;
}

.book-page-content {
    width: 100%;
    min-height: 100%;
    padding: 3.5rem 3rem;
    font-family: var(--font-serif);
    color: #2a1a3e !important;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

@media (max-width: 1400px) {
    .book-page-content {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 1200px) {
    .book-page-content {
        padding: 2.5rem 2rem;
    }
}

.book-page-content * {
    color: #2a1a3e !important;
}

.book-page-content h1,
.book-page-content h2,
.book-page-content h3 {
    color: #1a0a2e !important;
    -webkit-text-fill-color: #1a0a2e !important;
    text-shadow: none !important;
}

/* Force dark color for all headings in book pages - override any white text */
.book-page-content h1,
.book-page-content h2,
.book-page-content h3,
.book-track-title,
.book-track-header h2,
.book-track-info-page h2 {
    color: #1a0a2e !important;
    -webkit-text-fill-color: #1a0a2e !important;
    text-shadow: none !important;
}

.book-page-content p {
    color: #2a1a3e !important;
}

.book-empty-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-empty-page-inner {
    width: 100%;
    text-align: center;
}

/* Cover Page */
.book-cover-page {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.book-cover-page-inner {
    max-width: 800px;
    width: 100%;
}

.book-cover-title-section {
    margin-bottom: 3rem;
}

.book-cover-main-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #1a0a2e !important;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.book-cover-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-style: italic;
    color: #667eea !important;
    margin-bottom: 0.5rem;
}

.book-cover-year {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    color: rgba(42,26,62,0.7) !important;
    text-transform: uppercase;
}

.book-cover-image-section {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.book-cover-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    margin: 0 auto;
    display: block;
}

.book-cover-review {
    text-align: justify;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2a1a3e !important;
    margin-top: 3rem;
}

.book-cover-review p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
    color: #2a1a3e !important;
}

.book-cover-review p:first-child {
    text-indent: 0;
}

/* Track Page */
.book-track-page {
    display: flex;
    flex-direction: column;
}

.book-track-page-inner {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.book-track-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(102,126,234,0.2);
}

.book-track-number {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #667eea !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.book-track-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: #1a0a2e !important;
    line-height: 1.2;
}

/* Ensure track title in info page is dark and readable */
.book-track-info-page .book-track-title,
.book-track-info-page .book-track-header h2,
.book-track-info-page .book-track-header .book-track-title {
    color: #1a0a2e !important;
    -webkit-text-fill-color: #1a0a2e !important;
    text-shadow: none !important;
}

.book-track-image-section {
    margin: 2rem 0;
    text-align: center;
}

.book-track-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 0 auto;
    display: block;
}

.book-track-story,
.book-track-review {
    margin: 2.5rem 0;
    text-align: justify;
    font-size: 1rem;
    line-height: 1.8;
    color: #2a1a3e !important;
}

.book-track-section-header {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #667eea !important;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(102,126,234,0.2);
}

.book-track-review-content,
.book-track-story-content {
    margin-top: 1rem;
}

.book-track-review-content p,
.book-track-story-content p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
    color: #2a1a3e !important;
}

.book-track-review-content p:first-child,
.book-track-story-content p:first-child {
    text-indent: 0;
}

.book-track-review .placeholder,
.book-track-story .placeholder {
    font-style: italic;
    color: rgba(42,26,62,0.6) !important;
    text-indent: 0;
}

/* Intro Page Styles - Redesigned for Better Space & Readability */
.book-intro-page {
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-intro-page-inner {
    max-width: 100%;
    width: 100%;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-intro-title-section {
    margin-bottom: 2.5rem;
    text-align: left;
    position: relative;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(102,126,234,0.15);
}

.book-intro-title-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.book-intro-main-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1a0a2e !important;
    margin-bottom: 0.75rem;
    margin-left: 1.5rem;
    line-height: 1.1;
    text-transform: none;
}

.book-intro-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-style: italic;
    color: #667eea !important;
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
    font-weight: 400;
}

.book-intro-author {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    letter-spacing: 0.15em;
    color: rgba(42,26,62,0.8) !important;
    text-transform: uppercase;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.book-intro-image-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.book-intro-image {
    width: 100%;
    max-width: 420px;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    margin: 0 auto;
    display: block;
}

.book-intro-text {
    text-align: left;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.85;
    color: #2a1a3e !important;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(102,126,234,0.1);
}

.book-intro-text p {
    margin-bottom: 1.25rem;
    text-indent: 0;
    color: #2a1a3e !important;
    max-width: 90%;
}

.book-intro-text p:first-child {
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 500;
    color: #1a0a2e !important;
    margin-bottom: 1.5rem;
}

/* Table of Contents Styles - Redesigned for Better Space & Readability */
.book-toc-page {
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
}

.book-toc-page-inner {
    max-width: 100%;
    width: 100%;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-toc-header {
    margin-bottom: 2.5rem;
    text-align: left;
    position: relative;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(102,126,234,0.2);
}

.book-toc-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: #1a0a2e !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    position: relative;
    padding-left: 1rem;
}

.book-toc-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.book-toc-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.book-toc-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border-radius: 6px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.book-toc-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 0 2px 2px 0;
}

.book-toc-item:hover {
    background: rgba(102,126,234,0.06);
    border-left-color: #667eea;
    transform: translateX(4px);
    padding-left: 1.75rem;
}

.book-toc-item:hover::before {
    opacity: 1;
}

.book-toc-number {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    font-weight: 700;
    color: #667eea !important;
    min-width: 70px;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.book-toc-title {
    font-family: var(--font-serif);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 500;
    color: #1a0a2e !important;
    flex: 1;
    line-height: 1.4;
}

.book-toc-footer {
    text-align: left;
    font-style: italic;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    color: rgba(42,26,62,0.7) !important;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(102,126,234,0.1);
}

/* Custom scrollbar for TOC list */
.book-toc-list::-webkit-scrollbar {
    width: 6px;
}

.book-toc-list::-webkit-scrollbar-track {
    background: transparent;
}

.book-toc-list::-webkit-scrollbar-thumb {
    background: rgba(102,126,234,0.3);
    border-radius: 3px;
}

.book-toc-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102,126,234,0.5);
}

/* Track Info Page Styles */
.book-track-info-page {
    padding: 3rem;
}

.book-track-info-page-inner {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* Track Lyrics Page Styles */
.book-track-lyrics-page {
    padding: 3rem;
}

.book-track-lyrics-page-inner {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.book-track-lyrics-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102,126,234,0.2);
}

.book-track-lyrics-header h3 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    color: #1a0a2e !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.book-track-lyrics-content {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 2;
    color: #2a1a3e !important;
}

.book-track-lyrics-content p {
    margin-bottom: 1rem;
    color: #2a1a3e !important;
}

.book-track-lyrics-content .placeholder {
    font-style: italic;
    color: rgba(42,26,62,0.6) !important;
}

/* Comments Section Styles */
.book-track-comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(102,126,234,0.2);
}

.book-track-comments-section h3 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: #1a0a2e !important;
    margin-bottom: 1.5rem;
}

.book-comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-comment-form input,
.book-comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(102,126,234,0.2);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #2a1a3e !important;
    background: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.book-comment-form input:focus,
.book-comment-form textarea:focus {
    outline: none;
    border-color: rgba(102,126,234,0.5);
    background: rgba(255,255,255,1);
}

.book-comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.book-comment-submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.book-comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

/* Comments List Styles */
.book-comments-list {
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.book-comments-list::-webkit-scrollbar {
    width: 6px;
}

.book-comments-list::-webkit-scrollbar-track {
    background: transparent;
}

.book-comments-list::-webkit-scrollbar-thumb {
    background: rgba(102,126,234,0.3);
    border-radius: 3px;
}

.book-comments-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102,126,234,0.5);
}

.book-comment-item {
    background: rgba(102,126,234,0.05);
    border-left: 3px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.book-comment-item:hover {
    background: rgba(102,126,234,0.08);
    border-left-color: rgba(102,126,234,0.5);
}

.book-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.book-comment-author {
    font-weight: 600;
    color: #667eea !important;
    font-size: 0.95rem;
}

.book-comment-date {
    font-size: 0.85rem;
    color: rgba(42,26,62,0.6) !important;
    font-style: italic;
}

.book-comment-text {
    color: #2a1a3e !important;
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comments-loading,
.comments-empty,
.comments-error {
    text-align: center;
    color: rgba(42,26,62,0.6) !important;
    font-style: italic;
    padding: 2rem 1rem;
}

.comments-error {
    color: rgba(255,107,107,0.8) !important;
}

.comment-success {
    background: rgba(102,126,234,0.1);
    border: 2px solid rgba(102,126,234,0.3);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #667eea !important;
    text-align: center;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-track-story p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
    color: #2a1a3e !important;
}

.book-track-story p:first-child {
    text-indent: 0;
}

.book-track-story .placeholder {
    font-style: italic;
    color: rgba(42,26,62,0.6) !important;
    text-indent: 0;
}

/* Audio Player in Book */
.book-track-player {
    margin: 2.5rem 0;
    padding: 2rem;
    background: rgba(102,126,234,0.1);
    border-radius: 12px;
    border: 2px solid rgba(102,126,234,0.2);
    position: relative;
    z-index: 10;
}

.book-player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.book-player-btn {
    background: rgba(102,126,234,0.2);
    border: 2px solid rgba(102,126,234,0.4);
    color: #667eea;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.book-player-btn i,
.book-player-btn svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: block;
    padding: 10px;
}

.book-player-btn:not(.book-player-play) i,
.book-player-btn:not(.book-player-play) svg {
    color: #667eea !important;
    stroke: #667eea !important;
}

.book-player-btn.book-player-play i,
.book-player-btn.book-player-play svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.book-player-btn:hover {
    background: rgba(102,126,234,0.3);
    border-color: rgba(102,126,234,0.6);
    transform: scale(1.1);
}

.book-player-btn.book-player-play {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: #ffffff !important;
}

.book-player-btn.book-player-play svg {
    fill: #ffffff !important;
    color: #ffffff !important;
}

.book-player-btn.book-player-play:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: scale(1.15);
}

.book-player-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.book-player-progress {
    width: 100%;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.book-player-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(102,126,234,0.2);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.book-player-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
}

.book-player-time {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: #2a1a3e !important;
}

.book-player-time span {
    color: #2a1a3e !important;
}

/* Lyrics */
.book-track-lyrics {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(102,126,234,0.2);
}

.book-track-lyrics-header {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #667eea !important;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.book-track-lyrics-content {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 2;
    color: #2a1a3e !important;
    font-style: italic;
    white-space: pre-line;
}

.book-track-lyrics-content p {
    margin-bottom: 0.5rem;
    text-indent: 0;
    color: #2a1a3e !important;
}

/* Close Button */
.book-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    color: #ffffff !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.book-close-btn svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
    stroke: #ffffff !important;
    fill: none !important;
}

.book-close-btn:hover {
    background: rgba(0,0,0,0.7);
    border-color: rgba(255,255,255,0.4);
    transform: rotate(90deg) scale(1.1);
}

/* Navigation */
.book-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 100;
}

.book-nav-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: #ffffff !important;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.book-nav-btn span {
    color: #ffffff !important;
}

.book-nav-btn svg {
    stroke: #ffffff !important;
    fill: none !important;
}

.book-nav-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

.book-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.book-nav-btn svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
    flex-shrink: 0;
}

.book-page-indicator {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.9) !important;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 968px) {
    .book-spread {
        flex-direction: column;
        max-height: 90vh;
    }
    
    .book-page-left,
    .book-page-right {
        height: 50%;
        border-radius: 8px 8px 0 0;
    }
    
    .book-page-right {
        border-radius: 0 0 8px 8px;
    }
    
    .book-spine-divider {
        width: 100%;
        height: 10px;
        background: linear-gradient(180deg, 
            rgba(0,0,0,0.1) 0%, 
            rgba(0,0,0,0.2) 50%, 
            rgba(0,0,0,0.1) 100%
        );
    }
    
    .book-spine-divider::before {
        width: 100%;
        height: 2px;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .book-page-content {
        padding: 2.5rem;
    }
    
    .book-track-image {
        max-height: 350px;
        max-width: 100%;
        object-fit: contain;
    }
    
    .book-cover-image {
        max-height: 400px;
        max-width: 100%;
        object-fit: contain;
    }
    
    .book-track-image-section,
    .book-cover-image-section {
        min-height: auto;
    }
    
    .book-navigation {
        padding: 1rem 2rem;
    }
    
    .book-nav-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .book-page-content {
        padding: 1.5rem;
    }
    
    .book-cover-main-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
    
    .book-track-title {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }
    
    .book-player-controls {
        gap: 1rem;
    }
    
    .book-player-btn {
        width: 45px;
        height: 45px;
    }
    
    .book-player-btn.book-player-play {
        width: 55px;
        height: 55px;
    }
    
    .book-navigation {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .book-page-indicator {
        width: 100%;
        text-align: center;
        order: 3;
    }
}

