

:root {
    --bg-paper: #fff8de;
    --text-ink: #2b2b2b;
    --accent-gold: #d4af37;
    --marker-color: #666666;
    --font-reading: 'Crimson Text', serif;
    --font-ui: 'Lato', sans-serif;
}


body.reading-mode {
    background-color: #1a1a1a;
    margin: 0;
    overflow-y: auto;
    
}


.story-wrapper {
    max-width: 800px;
    min-width: 45vw;
    
    margin: 40px auto;
    background-color: var(--bg-paper);
    padding: 60px 80px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    position: relative;
}


.story-content {
    font-family: var(--font-reading);
    font-size: 1.35rem;
    
    line-height: 1.8;
    color: var(--text-ink);
    text-align: justify;
    
}


.story-content p {
    margin-bottom: 0.50rem;
}

.story-content p strong {
    margin-bottom: 0.0rem;
    font-weight: bold;
}


.story-header {
    min-height: 85vh;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.story-header.no-image {
    align-items: center;
    display: flex;
    justify-content: center;
}




.chapter-header {
    text-align: center;
    padding-bottom: 2rem;
}

.summary-header {
    font-family: var(--font-reading);
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    color: var(--text-ink);
    font-size: 1.2rem;
}

.chapter-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #111;
    margin: 1rem 0;
    line-height: 1.2;
    box-sizing: border-box;
}

.story-meta {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
}

.story-image {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
    filter: sepia(15%);
    
}

.story-text-part {
    min-height: 90vh;
    box-sizing: border-box;
}


.page-break-marker {
    position: relative;
    width: 100%;
    height: 60px;
    
    margin: 4rem 0 4rem 0;
    

    
    display: flex;
    align-items: center;
    justify-content: center;
}


.page-break-marker::before,
.last-page-marker::before {
    content: attr(data-prev-page);
    
    position: absolute;
    top: -10px;
    
    right: 0;
    

    font-family: 'Playfair Display', serif;
    
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-ink);
    
    opacity: 0.8;
}

.last-page-marker {
    position: relative;
    width: 100%;
    height: 60px;
    
    margin-top: 2rem;
    display: block;
    
}


.page-break-marker::after {
    content: "- " attr(data-curr-page) " -";
    
    position: absolute;
    top: 50%;
    
    width: 120%;
    text-align: center;

    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--marker-color);
    
    opacity: 0.5;
    box-sizing: unset;
    
    
    
    border-bottom: 1px dashed rgba(163, 133, 36, 0.432);
    line-height: 0.1em;
    
}


@media (max-width: 768px) {

    .page-break-marker::before,
    .last-page-marker {
        right: 10px;
        font-size: 1rem;
    }
}


@media (max-width: 1000px) {
    .story-wrapper {
        padding: 40px 25px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .page-break-marker::after {
        right: auto;
        position: relative;
        background: transparent;
        color: var(--marker-color);
        font-weight: bold;
        opacity: 1;
        content: "- " attr(data-page-display) " -";
    }
}




.fixed-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    z-index: 100;
}

.fixed-back-btn:hover {
    background: var(--accent-gold);
    color: #000;
}


.fixed-page-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s;
}


.toast-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gold);
    color: #000;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
}




.page-controls-wrapper {
    position: fixed;
    bottom: 1%;
    left: 50%;
    
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    
    transition: opacity 0.3s ease-in-out;
}

.opacity-0 {
    opacity: 0;
}

.pointer-events-none {
    pointer-events: none;
    
}


.media-player-bar {
    background: rgba(10, 10, 10, 0.9);
    
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    
    border-radius: 30px;
    
    padding: 5px 15px;

    display: flex;
    align-items: center;
    gap: 15px;
    

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        
        0 0 15px rgba(212, 175, 55, 0.1);
    

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-player-bar:hover {
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(212, 175, 55, 0.2);
    
}


.player-btn {
    background: transparent;
    border: none;
    color: #666;
    
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50%;
}

.player-btn svg {
    stroke-width: 2.5;
    
}

.player-btn:hover {
    color: var(--accent-gold);
    
    background: rgba(212, 175, 55, 0.1);
}

.player-btn:active {
    transform: scale(0.9);
}


.player-info {
    font-family: 'Lato', sans-serif;
    
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 60px;
    
    justify-content: center;
}

.current-page {
    color: var(--accent-gold);
    
}

.separator {
    color: #444;
    
    font-weight: 300;
}

.total-page {
    color: #888;
    
}

@media (max-width: 1024px) {
    .page-controls-wrapper {
        bottom: 1%;
        left: 50%;
        width: auto;
    }

    .media-player-bar {
        padding: 5px 12px;
        gap: 10px;
    }
}




@media (max-width: 768px) {
    .page-controls-wrapper {
        bottom: 10%;
        left: 50%;
        width: auto;
    }

    .media-player-bar {
        padding: 5px 12px;
        gap: 10px;
    }
}



.media-player-bar {
    
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 40px;
    
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;

    
    max-width: 90vw;
    overflow-x: auto;
    
}


.player-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 5px;
}


.player-btn svg {
    opacity: 0.8;
    transition: all 0.2s;
}

.player-btn:hover svg {
    opacity: 1;
    color: var(--accent-gold);
    transform: scale(1.1);
}


.player-btn[title="Dosyayı İndir (PDF/Word)"]:hover svg {
    color: #4ade80;
    
}


.player-btn[title="Kütüphaneye Dön"]:hover svg {
    color: #f87171;
    
}