/* ===== Neo Dominion Story Archive Theme ===== */

:root {
    --bg: #0a0a0a;
    --panel: #161616;
    --text: #e0e0e0;
    --accent: #ff004c;
    --subtle: #666;
    --system-green: #00ff9c;
}

/* ===== Base ===== */

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Georgia", serif;
    margin: 0;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* Reading container */
.archive-container {
    max-width: 750px;
    margin: 40px auto;
    background: var(--panel);
    padding: 50px;
    border: 1px solid #222;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
}

/* ===== Archive Notices ===== */

.archive-notice {
    position: relative;
    overflow: hidden;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    color: var(--system-green);
    margin-bottom: 30px;
    padding: 10px;
    border-left: 2px solid var(--system-green);
    background: rgba(0, 255, 156, 0.05);
    letter-spacing: 1px;
    text-shadow: 0 0 4px rgba(0,255,156,0.3);
}

/* Scan effect */
.archive-notice::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0,255,156,0.07),
        transparent
    );
    animation: scan 4s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(-120%); }
    100% { transform: translateY(120%); }
}

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

.archive-header {
    border-bottom: 1px solid var(--accent);
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.archive-header h1 {
    margin: 0;
    font-size: 2.4rem;
    letter-spacing: -1px;
    color: #fff;
}

/* ===== Chapter Text ===== */

.chapter-text {
    font-size: 1.05rem;
}

.chapter-text p {
    margin-bottom: 1.6em;
}

/* Drop cap */
.chapter-text p:first-of-type::first-letter {
    font-size: 4rem;
    float: left;
    margin-top: 0.1em;
    margin-right: 10px;
    color: var(--accent);
    font-family: "Times New Roman", serif;
    line-height: 1;
}

/* ===== Flashback Mode ===== */

.timeline-flashback {
    filter: sepia(0.25) contrast(1.05);
    border-left: 4px double var(--subtle);
}

.timeline-flashback .chapter-text {
    color: #d4c4a8;
}

/* ===== Navigation ===== */

.chapter-nav {
    margin-top: 50px;
    border-top: 1px solid #333;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.chapter-nav a {
    color: var(--accent);
    text-decoration: none;
    font-family: "Courier New", monospace;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.2s ease;
}

.chapter-nav a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--accent);
}

.chapter-nav a:focus {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

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

@media (max-width: 800px) {
    .archive-container {
        margin: 0;
        padding: 30px 20px;
        max-width: 100%;
    }

    .archive-header h1 {
        font-size: 1.8rem;
    }

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

    .chapter-nav {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ===== FUN ADDITIONS ===== */

/* Progress bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 0%;
    z-index: 1000;
}

/* Collapsible archive logs */
details.archive-log summary {
    cursor: pointer;
    font-family: "Courier New", monospace;
    color: var(--system-green);
    margin-bottom: 10px;
}

/* Glitch text (memory corruption) */
.glitch {
    position: relative;
    font-family: "Courier New", monospace;
    color: #fff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    opacity: 0.6;
}

.glitch::before {
    color: red;
    animation: glitch 1s infinite;
}

.glitch::after {
    color: cyan;
    animation: glitch 1s infinite reverse;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 1px); }
    100% { transform: translate(0); }
}

/* ===== Observer Logs (Comments) ===== */

.observer-log {
    max-width: 750px;
    margin: 60px auto;
    padding: 30px;
    background: var(--panel);
    border: 1px solid #222;
}

.observer-entry {
    border-left: 2px solid var(--system-green);
    padding: 10px 15px;
    margin-bottom: 20px;
    font-family: "Courier New", monospace;
    background: rgba(0,255,156,0.03);
}

.observer-id {
    font-size: 0.75rem;
    color: var(--system-green);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.observer-text {
    font-family: Georgia, serif;
    color: var(--text);
}
