:root {
    --background: #0b1018;
    --surface: rgba(18, 27, 40, 0.78);
    --border: rgba(150, 190, 230, 0.12);

    --text: #f2f4f7;
    --muted: #9ba8b8;

    --accent-blue: #8bbcff;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-height: 100vh;

    background: var(--background);

    color: var(--text);

    font-family: Georgia, serif;
}


.reader-page {
    width: min(900px, 90%);

    margin: auto;

    padding-top: 100px;
    padding-bottom: 80px;
}


.reader-header {
    margin-bottom: 55px;
}


.back-link {
    display: inline-block;

    margin-bottom: 45px;

    color: var(--muted);

    text-decoration: none;

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 2px;

    transition: color 0.3s ease;
}


.back-link:hover {
    color: var(--accent-blue);
}


.eyebrow {
    margin: 0 0 12px;

    color: var(--accent-blue);

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 3px;
}


.reader-header h1 {
    margin: 0 0 18px;

    font-size: clamp(30px, 5vw, 48px);

    line-height: 1.15;

    font-weight: 500;
}


.reader-description {
    color: var(--muted);

    line-height: 1.7;
}


/* =========================
   CHAPTER LIST
========================= */

.chapter-list {
    display: flex;

    flex-direction: column;

    gap: 14px;
}


.chapter-card {
    width: 100%;

    display: grid;

    grid-template-columns: 50px 1fr 30px;

    align-items: center;

    gap: 18px;

    padding: 23px 25px;

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text);

    text-align: left;

    cursor: pointer;

    font-family: Georgia, serif;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease;
}


.chapter-card:hover {
    transform: translateX(6px);

    border-color: rgba(139, 188, 255, 0.35);

    background: rgba(25, 40, 60, 0.82);
}


.chapter-index {
    color: var(--accent-blue);

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 2px;

    opacity: 0.7;
}


.chapter-name {
    font-size: 17px;
}


.chapter-arrow {
    color: var(--accent-blue);

    font-family: Arial, sans-serif;

    text-align: right;

    opacity: 0.6;

    transition: transform 0.3s ease;
}


.chapter-card:hover .chapter-arrow {
    transform: translateX(5px);

    opacity: 1;
}


/* =========================
   READER
========================= */

.chapter-reader {
    display: none;

    padding: 40px;

    border: 1px solid var(--border);

    background: var(--surface);
}


.chapter-number {
    margin: 0 0 10px;

    color: var(--accent-blue);

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 3px;
}


.chapter-reader h2 {
    margin: 0 0 35px;

    font-size: clamp(28px, 4vw, 42px);

    font-weight: 500;
}


.chapter-content {
    color: #d9dee5;

    font-size: 17px;

    line-height: 1.9;
}


.chapter-content p {
    margin: 0 0 1.5em;
}


/* =========================
   BUTTONS
========================= */

.reader-button {
    border: 1px solid var(--border);

    background: transparent;

    color: var(--muted);

    padding: 10px 15px;

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 1.5px;

    cursor: pointer;

    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        opacity 0.3s ease;
}


.reader-button:hover:not(:disabled) {
    color: var(--accent-blue);

    border-color: var(--accent-blue);
}


.reader-button:disabled {
    opacity: 0.25;

    cursor: default;
}


.chapter-navigation {
    display: flex;

    justify-content: space-between;

    margin-top: 55px;

    padding-top: 25px;

    border-top: 1px solid var(--border);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .reader-page {
        width: 88%;

        padding-top: 60px;
    }

    .chapter-card {
        grid-template-columns: 40px 1fr 20px;

        padding: 19px;
    }

    .chapter-reader {
        padding: 25px;
    }

    .chapter-content {
        font-size: 16px;

        line-height: 1.8;
    }

}