/* Dawn of Civilization Website - Unified Stylesheet */
/* Theme: Golden dawn gradient with cream card aesthetic */

/* ========================================
   CSS Reset & Base Styles
   ======================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    background: radial-gradient(ellipse at 50% 100%, #f5a623 0%, #c0392b 40%, #6b1515 70%, #3d0808 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #f5f0e8;
}

/* ========================================
   Floating Red Star
   ======================================== */

.floating-star {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 100;
}

.floating-star svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(255, 200, 100, 0.7)) drop-shadow(0 0 25px rgba(245, 166, 35, 0.5));
}

.page-home .floating-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 220, 150, 0.5) 0%, rgba(245, 180, 80, 0.3) 30%, transparent 60%);
    border-radius: 50%;
    z-index: -1;
}

/* ========================================
   Header
   ======================================== */

header {
    background: #8b2020;
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.header-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

header h1 {
    font-family: 'Noto Serif SC', 'Source Serif 4', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

header h1 a:hover {
    text-decoration: underline;
}

.header-quote-en {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.9;
}

.header-quote-cn {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.7rem;
    opacity: 0.7;
}

header nav a {
    color: #f5f0e8;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

header nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========================================
   Main Content Area / Card
   ======================================== */

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-volume main {
    max-width: 900px;
}

.card {
    background: #f5f0e8;
    color: #1a0505;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Landing / Volume Typography
   ======================================== */

.title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    color: #8b0000;
    margin-bottom: 0.5rem;
}

.page-volume .title {
    font-size: 2rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.page-volume .subtitle {
    font-size: 1rem;
}

.description {
    line-height: 1.7;
    color: #333;
    margin-bottom: 1.5rem;
}

.page-home .description {
    margin-bottom: 2rem;
}

.status-warning {
    background-color: #faf0e0;
    border-left: 4px solid #d4a05a;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #5a4a3a;
}

h2 {
    font-size: 1.1rem;
    color: #8b0000;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid #8b0000;
    padding-bottom: 0.3rem;
}

.page-volume h2 {
    margin: 1.5rem 0 1rem;
}

h2:first-of-type {
    margin-top: 0;
}

/* ========================================
   About Page
   ======================================== */

.page-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    color: #8b0000;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #8b0000;
    padding-bottom: 0.5rem;
}

.page-about h2 {
    font-size: 1.25rem;
}

.content {
    line-height: 1.8;
    color: #333;
}

.content p {
    margin-bottom: 1rem;
}

.content ul {
    margin: 1rem 0 1rem 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content a {
    color: #8b0000;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.highlight-box {
    background: #fff8f0;
    border-left: 4px solid #8b0000;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #8b0000;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* ========================================
   Volume / Chapter Lists
   ======================================== */

.volumes,
.chapters {
    list-style: none;
}

.volumes li {
    margin: 0.8rem 0;
}

.volumes a {
    color: #8b0000;
    text-decoration: none;
}

.volumes a:hover {
    text-decoration: underline;
}

.volumes .unavailable {
    color: #999;
}

.volumes .status {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.chapters {
    column-count: 2;
    column-gap: 2rem;
}

.chapters li {
    margin: 0.4rem 0;
    break-inside: avoid;
}

.chapters a {
    color: #333;
    text-decoration: none;
}

.chapters a:hover {
    color: #8b0000;
    text-decoration: underline;
}

.chapter-num {
    color: #8b0000;
    font-weight: 600;
    margin-right: 0.3rem;
}

.coming-soon {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: #fff8f0;
    border-radius: 4px;
}

/* ========================================
   Chapter Reading Page
   ======================================== */

.chapter-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

.chapter-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.75rem;
    color: #8b0000;
    margin-bottom: 0.5rem;
}

.chapter-subtitle {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.chapter-content {
    line-height: 1.9;
    font-size: 1.1rem;
}

.chapter-content p {
    margin-bottom: 1.25rem;
    text-indent: 1.5em;
}

.chapter-content p:first-child {
    text-indent: 0;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.chapter-nav.nav-top {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.chapter-nav.nav-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.chapter-nav a {
    color: #8b0000;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid #8b0000;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.chapter-nav a:hover {
    background: #8b0000;
    color: #f5f0e8;
}

.chapter-nav .disabled {
    opacity: 0.3;
    pointer-events: none;
}

.chapter-nav .toc {
    border: none;
}

/* ========================================
   404 Page
   ======================================== */

body.page-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

body.page-404 h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 4rem;
    color: #d4a05a;
    margin-bottom: 1rem;
}

body.page-404 p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

body.page-404 a {
    color: #d4a05a;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #d4a05a;
    border-radius: 4px;
    transition: all 0.3s;
}

body.page-404 a:hover {
    background: #d4a05a;
    color: #1a0505;
}

/* ========================================
   Footer
   ======================================== */

footer {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 0.85rem;
}

footer .chinese {
    font-family: 'Noto Serif SC', serif;
    color: #d4a05a;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.page-home footer {
    color: #f5f0e8;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.page-home footer .chinese {
    color: #ffe082;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 600px) {
    .floating-star {
        width: 40px;
        height: 40px;
        bottom: 8px;
        right: 8px;
    }

    header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    header nav {
        margin-top: 0.5rem;
    }

    header nav a {
        margin: 0 0.75rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .title {
        font-size: 2rem;
    }

    .chapters {
        column-count: 1;
    }

    .chapter-content {
        font-size: 1rem;
    }
}
