
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #111318;
    color: #e8e2d6;
    font-family: Georgia, serif;
}

header {
    text-align: center;
    padding: 55px 20px 30px;
}

.series {
    color: #c5a46d;
    letter-spacing: 6px;
    font-size: 14px;
}

h1 {
    font-size: 36px;
    font-weight: normal;
    margin: 12px 0;
}

.issue {
    color: #999;
    letter-spacing: 3px;
}

main {
    display: flex;
    justify-content: center;
    padding: 30px 20px 70px;
    flex-direction: column;
    align-items: center;
}

.comic-page {
    width: 100%;
    max-width: 780px;
    min-height: 650px;
    background: #242830;
    border: 1px solid #5b5146;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.placeholder {
    min-height: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.placeholder p {
    color: #c5a46d;
    letter-spacing: 2px;
}

.placeholder h2 {
    font-size: 30px;
    font-weight: normal;
    font-style: italic;
}

footer {
    text-align: center;
    padding: 25px;
    color: #888;
    font-size: 13px;
}

/* Open-book layout */
.book {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 1100px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.book-page {
    min-width: 0;
    min-height: 650px;
    background: #242830;
    border: 1px solid #5b5146;
}

.book-page:first-child {
    border-right: 2px solid #111318;
}

.book-page .placeholder {
    min-height: 650px;
}

/* Phone layout */
@media (max-width: 768px) {
    .book {
        grid-template-columns: 1fr;
        max-width: 550px;
    }

    .book-page:nth-child(2) {
        display: none;
    }

    .book-page {
        min-height: 500px;
    }

    .book-page .placeholder {
        min-height: 500px;
    }
}
.page-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 20px;
}

.page-navigation button {
    background: transparent;
    color: #c5a46d;
    border: 1px solid #5b5146;
    padding: 12px 20px;
    cursor: pointer;
    font-family: Georgia, serif;
}

.page-navigation button:hover {
    background: #242830;
}
/* Illustrated comic pages */
.book-page {
    min-height: 0;
    align-self: start;
}

.book-page .placeholder {
    min-height: 0;
    padding: 0;
    display: block;
}

.comic-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Keep both pages aligned on desktop */
.book {
    align-items: start;
}

/* Mobile reader */
@media (max-width: 768px) {
    .book-page {
        min-height: 0;
    }

    .book-page .placeholder {
        min-height: 0;
    }

    .page-navigation {
        gap: 12px;
        flex-wrap: wrap;
    }

    .page-navigation button {
        padding: 12px 14px;
    }
}

/* ComicOps - Cover layout */

.book:has(.cover-page) {
    grid-template-columns: minmax(0, 550px);
    justify-content: center;
    box-shadow: none;
}

.book-page.cover-page {
    width: 100%;
    border: 1px solid #5b5146;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.book:has(.cover-page) .book-page:not(.cover-page) {
    display: none;
}

.book-page.cover-page .comic-image {
    width: 100%;
    height: auto;
}

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