/* ==========================================================================
   EVER DREAM THIS PIXEL? (eww.everdreamthispixel.px)
   Classic Early-Web Aesthetic (Inspired by www.thisman.org & DEPO)
   ========================================================================== */

:root {
    --bg-page: #ffffff;
    --text-ink: #111111;
    --text-grey: #555555;
    --link-color: #0000cc;
    --link-visited: #551a8b;
    --link-hover: #cc0000;
    --red-alert: #cc0000;
    --paper-tint: #d9d6cc;
    --graphite: #3a3a40;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-ink);
    font-family: "Times New Roman", Times, Georgia, "DejaVu Serif", serif;
    font-size: 15px;
    line-height: 1.5;
    padding: 24px 16px 48px;
    display: flex;
    justify-content: center;
}

/* Main Site Container */
.site-container {
    width: 100%;
    max-width: 740px;
    background-color: #ffffff;
    padding: 10px 15px 30px;
}

/* Header */
.site-header {
    text-align: center;
    margin-bottom: 22px;
}

.site-title {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: var(--text-ink);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-title a:hover {
    color: var(--link-hover);
}

.site-subtitle {
    font-size: 14px;
    color: var(--text-grey);
    font-style: italic;
    margin-bottom: 14px;
}

.retro-hr {
    border: 0;
    border-top: 1px solid #777777;
    margin: 14px 0 20px;
}

/* Standard Links */
a {
    color: var(--link-color);
    text-decoration: underline;
    cursor: pointer;
}

a:visited {
    color: var(--link-visited);
}

a:hover, a:active {
    color: var(--link-hover);
}

.back-link {
    display: inline-block;
    margin-top: 24px;
    font-weight: bold;
}

/* Home Page Layout */
.home-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.nav-sidebar {
    width: 170px;
    flex-shrink: 0;
}

.menu-list {
    list-style: none;
    line-height: 1.85;
}

.menu-list li {
    margin-bottom: 2px;
}

.menu-list a {
    font-size: 15px;
    display: inline-block;
}

.menu-list a.active {
    color: var(--link-visited);
    font-weight: bold;
}

.home-main-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portrait-frame-large {
    width: 280px;
    height: 220px;
    background: #000000;
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.25);
}

.pixel-canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.home-intro-text {
    font-size: 15px;
    line-height: 1.55;
    text-align: justify;
    color: var(--text-ink);
}

/* Inner Pages */
.inner-layout {
    width: 100%;
}

.inner-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: var(--text-ink);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.content-paragraph {
    margin-bottom: 14px;
    text-align: justify;
    font-size: 15px;
    line-height: 1.6;
}

.content-small-grey {
    font-size: 13px;
    color: var(--text-grey);
}

/* Dreams Page */
.dreams-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dream-item {
    border-bottom: 1px dotted #cccccc;
    padding-bottom: 10px;
}

.dream-author {
    font-weight: bold;
    color: var(--text-ink);
    margin-bottom: 4px;
}

.dream-quote {
    color: var(--text-grey);
    padding-left: 12px;
    font-style: italic;
    line-height: 1.45;
}

/* Theories Page */
.theories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theory-item {
    line-height: 1.5;
    padding: 6px 12px;
    background: #faf8f5;
    border-left: 3px solid #888888;
}

/* Portraits Grid */
.portraits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.portrait-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fbfbf8;
    padding: 10px;
    border: 1px solid #d4d2c8;
}

.portrait-caption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-grey);
    text-align: center;
}

/* In The World / Radar */
.radar-container {
    width: 100%;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

#world-radar-canvas {
    max-width: 100%;
    height: auto;
}

/* Download Page */
.download-preview-box {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.download-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
}

/* Guestbook */
.guestbook-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 26px;
}

.guestbook-entry {
    background: #fcfbf9;
    border: 1px solid #e2e0d8;
    padding: 12px 14px;
}

.entry-header {
    color: var(--link-color);
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.entry-body {
    color: var(--text-ink);
    font-size: 14px;
    line-height: 1.5;
}

.entry-body.lucy-text {
    color: var(--red-alert);
}

.entry-flagged {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-grey);
    font-style: italic;
}

.guestbook-form-card {
    background: #f3f1eb;
    border: 1px solid #c9c7be;
    padding: 16px;
    margin-top: 20px;
}

.form-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

/* News */
.timeline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f3ef;
    padding: 8px 12px;
    border: 1px solid #d5d3cb;
    margin-bottom: 16px;
}

.stage-label {
    font-size: 13px;
    font-weight: bold;
}

.retro-select {
    font-family: inherit;
    padding: 3px 6px;
    font-size: 13px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 8px;
    border-bottom: 1px dashed #dddddd;
}

.news-item.fallen-highlight {
    background: #fbf6e8;
    padding: 6px;
    border-left: 3px solid #b58900;
}

.news-item.format-highlight {
    background: #f8e8e8;
    padding: 6px;
    border-left: 3px solid #dc322f;
}

/* Contact Us */
.contact-signature {
    text-align: right;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-grey);
    margin-bottom: 20px;
}

.retro-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
}

.retro-form label {
    font-weight: bold;
    font-size: 13px;
}

/* Admin Panel & 403 */
.forbidden-container {
    text-align: center;
    padding: 30px 10px;
}

.forbidden-sub {
    font-size: 16px;
    color: var(--text-grey);
    margin-bottom: 12px;
}

.forbidden-msg {
    font-size: 15px;
    color: var(--text-ink);
}

.admin-panel-card {
    background: #14141c;
    color: #00ff66;
    font-family: "Courier New", Courier, monospace;
    padding: 20px;
    border: 2px solid #00aa44;
}

.admin-status-badge {
    background: #004411;
    color: #66ff88;
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    margin-bottom: 12px;
}

.admin-body-text {
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
    color: #ffffff;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-box {
    background: #0d0d14;
    border: 1px solid #00aa44;
    padding: 10px;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.stat-label {
    font-size: 11px;
    color: #88cc88;
}

/* Buttons & Inputs */
.retro-btn {
    background: #ece9d8;
    color: #000000;
    border: 2px outset #ffffff;
    padding: 6px 16px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

.retro-btn:active {
    border-style: inset;
}

.retro-btn.secondary {
    background: #dddbce;
    font-size: 13px;
    font-weight: normal;
}

.retro-input, .retro-textarea {
    width: 100%;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid #7f9db9;
    margin-bottom: 8px;
}

/* Footer */
.site-footer {
    margin-top: 36px;
    padding-top: 14px;
    border-top: 1px solid #cccccc;
    text-align: center;
    font-size: 13px;
    color: var(--text-grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.admin-secret-link {
    font-size: 11px;
    color: #cccccc;
    text-decoration: none;
}

.admin-secret-link:hover {
    color: #666666;
}

/* Modal Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #ece9d8;
    border: 2px outset #ffffff;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 380px;
    padding: 2px;
}

.modal-header {
    background: #101018;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-icon {
    cursor: pointer;
}

.modal-content {
    padding: 20px;
    font-size: 14px;
    color: #000000;
    text-align: center;
    white-space: pre-line;
}

.modal-actions {
    padding: 10px 16px 16px;
    display: flex;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .home-layout {
        flex-direction: column;
    }
    .nav-sidebar {
        width: 100%;
        margin-bottom: 20px;
        border-bottom: 1px solid #cccccc;
        padding-bottom: 14px;
    }
    .portraits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}
