body {
            margin: 0;
            padding: 40px;
            background-color: #111;
            color: white;
            font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
            overflow-x: hidden; 
        }

        h1 {
            font-weight: 400;
            font-size: 4.5rem;
            letter-spacing: 5px;
            margin: 0;
            text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
        }

        .subtitle {
            font-size: 1.1rem;
            font-weight: 300;
            color: #f0f0f0;
            max-width: 480px;
            line-height: 1.6;
            margin-top: 10px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
        }

        img.bg-image {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            object-fit: cover;
            z-index: -2; 
        }

        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.3);
            z-index: -1;
        }

        /* --- Desktop Controls --- */
        .controls {
            position: fixed;
            right: 50px; 
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            z-index: 10;
        }

        .controls button {
            background-color: rgba(40, 40, 40, 0.7);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 18px 25px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            transition: all 0.3s ease;
            width: 280px;
            backdrop-filter: blur(10px);
            text-align: left;
        }

        .controls button:hover {
            background-color: rgba(255, 255, 255, 0.15);
            border-color: white;
            transform: translateX(-5px);
        }

        .controls button:last-child {
            margin-top: 25px;
            background-color: rgba(20, 20, 20, 0.5);
            border-color: rgba(255, 255, 255, 0.1);
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
        }

        /* --- Modals & Content --- */
        .modal {
            display: none; 
            position: fixed;
            z-index: 100;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background-color: rgba(30, 30, 30, 0.95);
            margin: 5% auto;
            padding: 40px;
            border: 1px solid rgba(255,255,255,0.2);
            width: 50%;
            max-width: 600px;
            border-radius: 12px;
            line-height: 1.8;
            color: #ddd;
            position: relative;
            max-height: 75vh; 
            overflow-y: auto;
        }

        .modal-content::-webkit-scrollbar { width: 8px; }
        .modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
        .modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
        .modal-content::-webkit-scrollbar-thumb:hover { background: rgba(255, 204, 0, 0.6); }

        .modal-content a {
            color: #ffcc00;
            text-decoration: none;
            border-bottom: 1px solid rgba(255, 204, 0, 0.3);
            transition: color 0.3s;
        }

        .book-title-separator {
            font-size: 0.75rem;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: #ffcc00;
            margin: 25px 0 10px 0;
            padding-bottom: 5px;
            border-bottom: 1px solid rgba(255, 204, 0, 0.2);
            font-weight: bold;
        }

        .chapter-item {
            padding: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            cursor: pointer;
            transition: all 0.2s;
            text-transform: capitalize;
        }

        .chapter-item:hover {
            background: rgba(255,255,255,0.05);
            color: #ffcc00;
            padding-left: 20px;
        }

        .close-btn {
            position: absolute;
            top: 20px;
            right: 25px;
            font-size: 28px;
            cursor: pointer;
            color: #888;
        }

        /* --- Now Playing UI --- */
        .now-playing-container {
            position: fixed;
            bottom: 40px;
            left: 40px;
            width: 300px;
            z-index: 5;
        }

        .progress-container {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            margin-bottom: 12px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            width: 0%;
            background: #ffcc00;
            box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
        }

        .now-playing-info {
            font-size: 0.9rem;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.8);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            background-color: #ff4b4b;
            border-radius: 50%;
            box-shadow: 0 0 8px #ff4b4b;
            animation: pulse 2s infinite;
        }

        @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

        /* --- Responsive --- */
        @media (max-width: 768px) {
            h1 { 
        font-size: 2.5rem; 
        margin-top: 20px;
    }
    
    .subtitle { 
        font-size: 1rem; 
        max-width: 100%; 
        margin-bottom: 30px; /* Reduced to sit comfortably above the player */
    }

    /* Repositioned below the subtitle instead of fixing it to the top */
    .now-playing-container { 
        position: relative; /* Removes the absolute/fixed pinning */
        bottom: auto; 
        top: auto; 
        left: auto; 
        width: 100%; /* Spans the full width of the text column */
        margin-top: 20px;
        margin-bottom: 140px; /* Pushes page content up so bottom menu doesn't block it */
        z-index: 5; 
    }
    
    .modal-content { 
        width: 85%; 
        margin: 15% auto; 
        padding: 25px; 
    }
    
    .controls { 
        bottom: 0; 
        left: 0; 
        right: 0; 
        top: auto; 
        transform: none; 
        flex-direction: row; 
        flex-wrap: wrap; 
        padding: 20px; 
        width: 100%; 
        box-sizing: border-box; 
        background: linear-gradient(transparent, rgba(0,0,0,0.9)); 
    }
    
    .controls button { 
        width: calc(50% - 10px); 
        padding: 12px; 
        font-size: 11px; 
        text-align: center; 
    }
    
    .controls button:last-child { 
        width: 100%; 
        margin-top: 5px; 
    }
    
    .live-badge { 
        margin-left: 5px; 
        padding: 1px 5px; 
    }
}

/* --- MODAL READER TEXT --- */
.reader-text {
    font-family: 'Georgia', serif;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.reader-text p {
    margin-bottom: 24px;
}

/* --- SITE TITLE LINK --- */
h1 a {
    text-decoration: none;
    color: inherit; /* Keeps whatever color your H1 already is */
    transition: opacity 0.2s ease;
}

h1 a:hover {
    opacity: 0.7; /* Gives a subtle visual cue that it is clickable */
}

/* --- CHAPTER NAVIGATION --- */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chapter-navigation a {
    color: white;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.chapter-navigation a:hover {
    opacity: 1;
}

/* If there is only a "Next" button (like on Overture), push it to the right */
.chapter-navigation .nav-next:only-child {
    margin-left: auto;
}