/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Fonts */
    --font-serif: "Bodoni Moda", serif;
    --font-sans: "Funnel Display", sans-serif;
    
    /* Colors - Vibrant Magazine Style */
    --color-bg: #000000;
    --color-text-primary: #ffffff;
    --color-text-secondary: #cccccc;
    --color-text-muted: #888888;
    
    /* Gradient Colors */
    --gradient-blue: #667eea;
    --gradient-purple: #764ba2;
    --gradient-pink: #f093fb;
    --gradient-orange: #ff6b6b;
    
    --color-accent: #ff6b6b;
    --color-border: #333333;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Cinematic Film Grain Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
    animation: grain 0.1s steps(6) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* Cinematic Vignette */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 9997;
}

/* ===== NAVIGATION ===== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    mix-blend-mode: difference;
    color: #ffffff;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide navigation when book is open */
.book-reader-container:not([style*="display: none"]) ~ * .main-nav,
body:has(.book-reader-container:not([style*="display: none"])) .main-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.main-nav > * {
    pointer-events: auto;
}

.menu-btn {
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
    padding: 0.75rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: currentColor;
    color: #000000;
}

/* ===== HERO SECTION - BOOK COVER DESIGN ===== */
.hero-book {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4rem 2rem;
    background: 
        linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f3460 100%),
        radial-gradient(circle at 50% 50%, rgba(102,126,234,0.1) 0%, transparent 70%);
    perspective: 2000px;
}

.book-shelf {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, #2c1810 0%, #1a0f08 100%);
    border-top: 3px solid #3d2415;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    z-index: 1;
}

.book-shelf::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.book-cover-container {
    position: relative;
    width: 800px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
    cursor: pointer;
}

.book-cover-container:hover {
    transform: translateY(-5px);
}

.book-cover-container:hover .book-cover-front {
    box-shadow: 
        0 0 60px rgba(0,0,0,0.9),
        inset 0 0 120px rgba(102,126,234,0.15),
        -15px 0 40px rgba(0,0,0,0.7);
}

.book-cover-container.opened {
    transform: rotateY(-180deg) translateZ(-50px);
    pointer-events: none;
}

.book-spine {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 40px;
    height: 100%;
    background: 
        linear-gradient(90deg, #1a0a2e 0%, #2a1a3e 50%, #1a0a2e 100%),
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.03) 0px,
            rgba(255,255,255,0.03) 1px,
            transparent 1px,
            transparent 4px
        );
    box-shadow: 
        inset -5px 0 20px rgba(0,0,0,0.5),
        inset 5px 0 20px rgba(0,0,0,0.5);
    z-index: 15;
    border-left: 2px solid rgba(255,255,255,0.1);
    border-right: 2px solid rgba(255,255,255,0.1);
}

.book-cover-front {
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0;
    top: 0;
    background: 
        linear-gradient(135deg, #2a1a3e 0%, #1a0a2e 50%, #0f0a1a 100%),
        repeating-linear-gradient(
            45deg,
            rgba(102,126,234,0.05) 0px,
            rgba(102,126,234,0.05) 1px,
            transparent 1px,
            transparent 20px
        );
    transform-origin: right center;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 0 50px rgba(0,0,0,0.8),
        inset 0 0 100px rgba(102,126,234,0.1),
        -10px 0 30px rgba(0,0,0,0.6);
    border-right: 3px solid rgba(102,126,234,0.3);
    overflow: hidden;
}

.book-cover-container.opened .book-cover-front {
    transform: rotateY(-180deg);
}

.book-cover-texture {
    position: absolute;
    inset: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

.book-cover-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2.5rem;
    color: #ffffff;
}

.book-cover-top {
    text-align: center;
}

.book-cover-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.book-cover-subtitle {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.1em;
}

.book-cover-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.book-cover-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
    opacity: 0;
    animation: fadeInScale 1.2s ease-out 0.5s forwards;
}

.book-cover-bottom {
    text-align: center;
}

.book-cover-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.95) 0%, 
        rgba(255,255,255,0.8) 50%,
        rgba(255,255,255,0.6) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(102,126,234,0.3);
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.book-cover-author {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    opacity: 0;
    animation: fadeIn 1s ease-out 1.3s forwards;
}

.book-cover-back {
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0;
    top: 0;
    background: 
        linear-gradient(135deg, #0f0a1a 0%, #1a0a2e 50%, #2a1a3e 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(118,75,162,0.05) 0px,
            rgba(118,75,162,0.05) 1px,
            transparent 1px,
            transparent 20px
        );
    box-shadow: 
        0 0 50px rgba(0,0,0,0.8),
        inset 0 0 100px rgba(118,75,162,0.1),
        10px 0 30px rgba(0,0,0,0.6);
    border-left: 3px solid rgba(118,75,162,0.3);
}

.book-pages-container {
    position: absolute;
    width: 800px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
    pointer-events: none;
    z-index: 5;
}

.book-pages-container.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.book-page {
    position: absolute;
    width: 50%;
    height: 100%;
    background: 
        linear-gradient(135deg, #f8f4e8 0%, #f0ead6 100%),
        repeating-linear-gradient(
            0deg,
            rgba(0,0,0,0.02) 0px,
            rgba(0,0,0,0.02) 1px,
            transparent 1px,
            transparent 2px
        );
    box-shadow: 
        inset 0 0 50px rgba(0,0,0,0.1),
        0 0 30px rgba(0,0,0,0.3);
    padding: 3rem 2.5rem;
    overflow-y: auto;
}

.book-page-left {
    left: 0;
    border-right: 2px solid rgba(0,0,0,0.1);
    border-radius: 5px 0 0 5px;
    position: relative;
}

.book-page-left::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
}

.book-page-right {
    right: 0;
    border-left: 2px solid rgba(0,0,0,0.1);
    border-radius: 0 5px 5px 0;
    position: relative;
}

.book-page-right::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to left, transparent, rgba(0,0,0,0.1));
    pointer-events: none;
}

.book-page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-page-header {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: #2a1a3e;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(42,26,62,0.2);
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.book-page-text {
    flex: 1;
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.8;
    color: #2a1a3e;
    text-align: justify;
}

.book-page-text p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

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

.book-page-signature {
    text-align: right;
    font-style: italic;
    margin-top: 2rem !important;
    text-indent: 0 !important;
    color: #667eea;
}

.open-book-btn {
    position: absolute;
    bottom: 8rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102,126,234,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    color: #ffffff;
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.open-book-btn:hover {
    background: rgba(102,126,234,0.4);
    border-color: rgba(255,255,255,0.5);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 15px 40px rgba(102,126,234,0.5);
}

.open-book-btn:active {
    transform: translateX(-50%) translateY(-1px);
}

.open-book-btn svg {
    transition: transform 0.3s ease;
}

.open-book-btn:hover svg {
    transform: translateX(3px);
}

/* Legacy hero styles for backward compatibility */
.hero-magazine {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
}

.hero-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(102,126,234,0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118,75,162,0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(240,147,251,0.3) 0%, transparent 70%),
        linear-gradient(135deg, 
            rgba(102,126,234,0.2) 0%, 
            rgba(118,75,162,0.3) 35%,
            rgba(240,147,251,0.2) 65%,
            rgba(255,107,107,0.2) 100%
        );
    opacity: 1;
    z-index: 1;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
    }
    50% {
        filter: hue-rotate(10deg) brightness(1.1);
    }
}

.hero-content-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.hero-labels-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-labels-column.left {
    align-items: flex-end;
    text-align: right;
}

.hero-labels-column.right {
    align-items: flex-start;
    text-align: left;
}

.hero-labels-column .label {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-labels-column.left .label:nth-child(1) { animation-delay: 0.5s; }
.hero-labels-column.left .label:nth-child(2) { animation-delay: 0.7s; }
.hero-labels-column.left .label:nth-child(3) { animation-delay: 0.9s; }
.hero-labels-column.right .label:nth-child(1) { animation-delay: 1.1s; }
.hero-labels-column.right .label:nth-child(2) { animation-delay: 1.3s; }
.hero-labels-column.right .label:nth-child(3) { animation-delay: 1.5s; }

.hero-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-nick-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 20px 60px rgba(0,0,0,0.5));
    opacity: 0;
    animation: fadeInScale 1.2s ease-out 0.3s forwards;
}

.hero-title-massive {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 0.9;
    text-align: center;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.95) 0%, 
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0.3) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 120%;
    opacity: 0;
    animation: fadeIn 1.5s ease-out 0.8s forwards;
    text-shadow: 0 0 60px rgba(255,255,255,0.2);
    pointer-events: none;
}

.hero-subtitle-script {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-style: italic;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    margin-top: 1.5rem;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
    position: relative;
    z-index: 3;
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
}

.scroll-indicator span {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, #ffffff, transparent);
    animation: scrollLineMove 2s ease-in-out infinite;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bookOpen {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-180deg) translateZ(-50px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLineMove {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(20px); opacity: 0.3; }
}

/* ===== CHAPTER/STORY SECTIONS ===== */
.chapter-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 2rem;
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
}

/* Cinematic Review Section */
.review-section {
    position: relative;
    background: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(20,10,30,0.98) 100%);
    display: none; /* Hidden - replaced by book reader */
}

.cinematic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102,126,234,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118,75,162,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240,147,251,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.review-section .chapter-content {
    position: relative;
    z-index: 2;
}

.review-text {
    font-family: var(--font-serif);
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    letter-spacing: 0.05em;
    position: relative;
    padding: 2rem;
    background: rgba(255,255,255,0.01);
    border-left: 2px solid rgba(102,126,234,0.3);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 40px rgba(102,126,234,0.08),
        inset 0 0 30px rgba(0,0,0,0.2);
    animation: fadeInUp 1.5s ease-out;
    opacity: 0;
    animation: autoScrollFadeIn 3s ease-out forwards;
}

.review-text p {
    margin-bottom: 1.5rem;
    text-indent: 1.5em;
    font-size: 0.95em;
}

.review-text p:first-child {
    text-indent: 0;
    font-size: 1em;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

@keyframes autoScrollFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-loading {
    text-align: center;
    opacity: 0.5;
    font-style: italic;
}

.chapter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.chapter-header {
    max-width: 1200px;
    margin: 0 auto 4rem;
    text-align: center;
}

.chapter-number {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(102,126,234,0.7);
    margin-bottom: 0.8rem;
    display: block;
    font-weight: 500;
}

.chapter-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.chapter-content {
    max-width: 900px;
    margin: 0 auto;
}

.story-text {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
}

.story-text p {
    margin-bottom: 1.5rem;
}

/* ===== TRACKS AS CHAPTERS ===== */
.chapters-container {
    background: var(--color-bg);
    display: none; /* Hidden - replaced by book reader */
}

.track-chapter {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 4rem;
    position: relative;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.track-chapter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102,126,234,0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(118,75,162,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.track-chapter:hover::before {
    opacity: 1;
}

.track-chapter:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
}

.track-chapter:nth-child(even) .track-image-container {
    order: 2;
}

.track-chapter:nth-child(even) .track-content {
    order: 1;
}

.track-image-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.track-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(0.3) contrast(1.1);
}

.track-chapter:hover .track-image-container img {
    transform: scale(1.05);
}

.track-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.track-number-large {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.8;
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.12;
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 0;
    pointer-events: none;
}

.track-title-chapter {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    letter-spacing: 0.03em;
}

.track-story-description {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    letter-spacing: 0.02em;
}

.track-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.track-play-btn {
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-pink));
    border: none;
    color: #ffffff;
    padding: 1.25rem 3rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(118,75,162,0.3);
}

.track-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(118,75,162,0.5);
}

.track-play-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== EDIT BUTTONS ===== */
.edit-btn {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

.edit-btn.editing {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

.edit-btn.modern {
    justify-content: center;
    min-width: 200px;
}

/* ===== EDITABLE TEXT ===== */
.editable-text {
    position: relative;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.editable-text[contenteditable="true"] {
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--color-accent);
    outline: none;
}

.editable-text .placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

/* ===== PLAYER MODAL - 3D BOOK WITH THREE.JS ===== */
.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.player-modal.active {
    display: flex;
}

.player-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(102,126,234,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(118,75,162,0.1) 0%, transparent 50%),
        rgba(0,0,0,0.95);
    backdrop-filter: blur(30px);
    animation: overlayFadeIn 0.5s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(30px);
    }
}

/* Three.js Canvas */
#book-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

/* Book UI Overlay */
.book-ui-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.book-ui-overlay * {
    pointer-events: auto;
}

/* Page Navigation Arrows */
.page-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    backdrop-filter: blur(10px);
}

.page-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.page-nav.prev-page {
    left: 2rem;
}

.page-nav.next-page {
    right: 2rem;
}

.page-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Page Indicator */
.page-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Book Content Overlay - Cinematic Enhancement */
.book-content-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) perspective(1500px) rotateY(-2deg);
    width: 85%;
    max-width: 1400px;
    height: 75%;
    max-height: 750px;
    display: flex;
    gap: 0;
    opacity: 0;
    animation: bookReveal 1s ease-out 0.5s forwards;
    filter: 
        drop-shadow(0 30px 80px rgba(0,0,0,0.6))
        drop-shadow(0 0 40px rgba(102,126,234,0.2));
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bookReveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) perspective(1500px) rotateY(-15deg) scale(0.9);
        filter: blur(20px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) perspective(1500px) rotateY(-2deg) scale(1);
        filter: blur(0);
    }
}

.book-page-left,
.book-page-right {
    flex: 1;
    background: 
        linear-gradient(135deg, rgba(10,5,20,0.95) 0%, rgba(20,10,30,0.98) 100%),
        repeating-linear-gradient(
            0deg,
            rgba(102,126,234,0.02) 0px,
            rgba(102,126,234,0.02) 1px,
            transparent 1px,
            transparent 2px
        );
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        inset 0 0 80px rgba(102,126,234,0.15),
        inset 0 0 40px rgba(0,0,0,0.5),
        0 0 30px rgba(102,126,234,0.2);
    border: 1px solid rgba(102,126,234,0.1);
}

.book-page-left {
    border-radius: 15px 0 0 15px;
    border-right: 2px solid rgba(102,126,234,0.3);
}

.book-page-right {
    border-radius: 0 15px 15px 0;
    border-left: 2px solid rgba(118,75,162,0.3);
}

/* Cinematic texture effect */
.book-page-left::before,
.book-page-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(102,126,234,0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(118,75,162,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* Page content styling */
.book-page-left > div,
.book-page-right > div {
    position: relative;
    z-index: 2;
    height: 100%;
}

/* Override text colors for book pages - Dark theme for cinematic feel */
.book-page-left *,
.book-page-right * {
    color: rgba(255,255,255,0.9) !important;
}

.book-page-left h2,
.book-page-right h2 {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.7)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 2px 20px rgba(102,126,234,0.3);
}

.book-page-left .edit-btn,
.book-page-right .edit-btn {
    background: rgba(139,69,19,0.1) !important;
    border: 1px solid rgba(139,69,19,0.3) !important;
    color: #8B4513 !important;
}

.book-page-left .edit-btn:hover,
.book-page-right .edit-btn:hover {
    background: rgba(139,69,19,0.2) !important;
    transform: translateY(-1px);
}

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

.book-page-left::-webkit-scrollbar-track,
.book-page-right::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
}

.book-page-left::-webkit-scrollbar-thumb,
.book-page-right::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}

/* Fixed Audio Controls */
.fixed-audio-controls {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.audio-controls-compact {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.control-btn-compact,
.play-btn-compact {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.play-btn-compact {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-pink));
}

.control-btn-compact:hover,
.play-btn-compact:hover {
    transform: scale(1.1);
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.progress-bar-compact {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.time {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    min-width: 40px;
}

.volume-control-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.close-player {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.close-player:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg) scale(1.1);
}

#visualizer-canvas {
    width: 100%;
    height: 250px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin: 2rem 0;
}

.player-track-info {
    text-align: center;
    margin-bottom: 2rem;
}

.player-track-number {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.player-track-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.audio-player-wrapper {
    margin-bottom: 2rem;
}

.audio-controls {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.control-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.control-btn, .play-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-btn {
    width: 70px;
    height: 70px;
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.control-btn:hover, .play-btn:hover {
    transform: scale(1.1);
    border-color: var(--color-accent);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    min-width: 50px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-purple), var(--gradient-pink));
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
}

.viz-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.viz-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    color: var(--color-text-secondary);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.viz-btn:hover, .viz-btn.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.player-tabs {
    margin-top: 2rem;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-accent);
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

.lyrics-display, .story-display {
    min-height: 200px;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

/* ===== SAVE NOTIFICATION ===== */
.save-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(16,185,129,0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.save-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .book-cover-container,
    .book-pages-container {
        width: 700px;
        height: 525px;
    }
    
    .hero-content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-labels-column {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
    
    .hero-labels-column.left,
    .hero-labels-column.right {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 968px) {
    .book-cover-container,
    .book-pages-container {
        width: 90vw;
        height: 70vh;
        min-height: 500px;
    }
    
    .book-cover-content {
        padding: 2rem 1.5rem;
    }
    
    .book-cover-image {
        max-width: 250px;
    }
    
    .book-cover-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
    
    .book-page {
        padding: 2rem 1.5rem;
    }
    
    .book-page-header {
        font-size: 1rem;
    }
    
    .book-page-text {
        font-size: 0.9rem;
    }
    
    .open-book-btn {
        bottom: 6rem;
        padding: 0.875rem 2rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .hero-book {
        padding: 2rem 1rem;
    }
    
    .book-cover-container,
    .book-pages-container {
        width: 95vw;
        height: 65vh;
        min-height: 400px;
    }
    
    .book-cover-content {
        padding: 1.5rem 1rem;
    }
    
    .book-cover-label {
        font-size: 0.6rem;
    }
    
    .book-cover-subtitle {
        font-size: 0.8rem;
    }
    
    .book-cover-image {
        max-width: 200px;
    }
    
    .book-cover-title {
        font-size: clamp(1.5rem, 10vw, 2.5rem);
        margin-bottom: 0.75rem;
    }
    
    .book-cover-author {
        font-size: 0.65rem;
    }
    
    .book-page {
        padding: 1.5rem 1rem;
    }
    
    .book-page-header {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .book-page-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .open-book-btn {
        bottom: 4rem;
        padding: 0.75rem 1.5rem;
        font-size: 0.75rem;
    }
    
    .book-shelf {
        height: 100px;
    }
}

@media (max-width: 968px) {
    .track-chapter {
        grid-template-columns: 1fr !important;
        padding: 4rem 2rem;
    }
    
    .track-chapter:nth-child(even) .track-image-container,
    .track-chapter:nth-child(even) .track-content {
        order: 0;
    }
    
    .track-image-container {
        height: 400px;
    }
    
    .track-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .track-play-btn,
    .edit-btn {
        justify-content: center;
    }
}

@media (max-width: 1200px) {
    .book {
        width: 1000px;
        height: 600px;
    }
}

@media (max-width: 968px) {
    .book {
        width: 90vw;
        height: 80vh;
        flex-direction: column;
    }
    
    .book-cover-left,
    .book-page-right {
        width: 100%;
        height: 50%;
    }
    
    .book.open .book-cover-left {
        transform: rotateX(-160deg);
    }
    
    .page-content {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .main-nav {
        padding: 1.5rem;
    }
    
    .hero-magazine {
        padding: 5rem 1rem 3rem;
    }
    
    .chapter-section {
        padding: 4rem 1.5rem;
    }
    
    .book {
        width: 95vw;
        height: 85vh;
    }
    
    .page-content {
        padding: 1.5rem;
    }
    
    .cover-title {
        font-size: 2.5rem;
    }
}

/* Keyboard Navigation Help */
.keyboard-help {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 200px;
}

.keyboard-help.show {
    opacity: 1;
    transform: translateY(0);
}

.keyboard-help.hide {
    opacity: 0;
    transform: translateY(20px);
}

.keyboard-help-title {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
}

.keyboard-help-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
}

.keyboard-help-key {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.65rem;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent transform conflicts */
.hero-magazine,
.chapter-section,
.track-chapter {
    transform: none !important;
    will-change: auto;
}
