/* =========================================================
   BASE TERMINAL (GREEN CRT)
   ========================================================= */

body {
    background-color: black;
    color: #00FF00;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: block;
}

/* Menu */
/* =========================================================
   MENU (LOCKED — NOT AFFECTED BY DOS SCALING)
   ========================================================= */

.menu {
    background-color: black;
    color: #00FF00;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    border-bottom: 1px solid #00FF00;
    z-index: 1000;

    display: flex;
    align-items: center;

    font-size: 16px; /* 🔥 CRITICAL FIX */
}

/* Menu list */
.menu-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 20px;
    gap: 20px; /* 🔥 CLEAN spacing */
}

.menu-list li {
    margin: 0;
}

.menu-list a,
.menu-list a:visited,
.menu-list a:hover,
.menu-list a:active {
    color: #00FF00;
    text-decoration: none;
}

/* Hamburger (mobile) */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    width: 30px;
    height: 25px;
    position: absolute;
    left: 15px;
}

.menu-toggle span {
    height: 3px;
    background-color: #00FF00;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .menu-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background: black;
        border-top: 1px solid #00FF00;
    }

    .menu-list.active { display: flex; }

    .menu-list li {
        margin: 10px 0;
        text-align: center;
    }
}

/* =========================================================
   DOS SCREEN
   ========================================================= */

.dos-screen,
.contact-dos-screen {
    margin-top: 60px;
    padding: 20px;
    font-size: 1.5rem;
}

/* =========================================================
   BLOG TABLE — LOCKED GREEN
   ========================================================= */

.blog-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #00FF00;
    background-color: black;
    color: #00FF00;
    border-collapse: collapse;
}

.blog-table td {
    padding: 10px;
    border-bottom: 1px solid #00FF00;
}

.blog-table strong {
    color: #00FF00;
}

/* Blog links NEVER change colour */
.blog-table a,
.blog-table a:visited,
.blog-table a:hover,
.blog-table a:active {
    color: #00FF00;
    text-decoration: none;
}

/* =========================================================
   PAGINATION — FORCE GREEN
   ========================================================= */

.pagination a,
.pagination a:visited,
.pagination a:hover,
.pagination a:active {
    color: #00FF00;
    text-decoration: none;
}

/* =========================================================
   🟠 COMMENTS — AMBER COMMAND LINE CRT
   (SCOPED INSIDE BLOG TABLE ONLY)
   ========================================================= */

.comment-line {
    font-size: 1.15rem;                 /* slightly smaller */
    line-height: 1.4;
    margin: 4px 0;
    white-space: normal;                /* ✅ single line when possible */
    word-wrap: break-word;              /* ✅ wrap ONLY when too long */
}

.comment-prompt {
    color: #ff9f1c;
    margin-right: 6px;
}

.comment-text {
    color: #ffb347;
}

.comment-time {
    color: rgba(255,179,71,0.65);
    margin-left: 8px;
    font-size: 0.85em;
}

.comment-line.empty {
    color: rgba(255,179,71,0.7);
}

/* Separator stays subtle */
.blog-table td hr {
    border: none;
    border-top: 1px dashed rgba(255,159,28,0.6);
    margin: 12px 0;
}

/* =========================================================
   COMMENT INPUT — AMBER TERMINAL
   ========================================================= */

.blog-table textarea {
    background-color: black;
    color: #ffb347;
    border: 1px solid #ff9f1c;
    font-family: 'Courier New', Courier, monospace;
}

.blog-table button {
    background-color: black;
    color: #ff9f1c;
    border: 1px solid #ff9f1c;
    cursor: pointer;
}

.blog-table button:hover {
    background-color: rgba(255,159,28,0.15);
}

/* =========================================================
   SCROLL ANCHOR
   ========================================================= */

.comment-anchor {
    scroll-margin-top: 60px;
}
/* =========================================================
   SCROLL OFFSET FIX — FIXED MENU COMPENSATION
   ========================================================= */

/* Comment anchor (existing) */
.comment-anchor {
    scroll-margin-top: 90px; /* menu (50px) + breathing room */
}

/* Bottom-of-post anchor */
a[id^="post-end-"] {
    scroll-margin-top: 120px; /* slightly more so form is visible */
}

.chat-wrapper {
    border-left:1px solid #00ff00;
    border-right:1px solid #00ff00;
    border-bottom:1px solid #00ff00;
    padding:10px;
    background:black;
    position:relative;
}
/* CRT EFFECT */
.chat-wrapper::before {
    content:"";
    position:absolute;
    top:2px;
    left:0;
    width:100%;
    height:calc(100% - 2px);

    background: repeating-linear-gradient(
        rgba(0,255,0,0.06) 0px,
        rgba(0,255,0,0.06) 1px,
        transparent 2px
    );

    animation: scanlines 6s linear infinite;

    pointer-events:none;
}

/* scanline drift */
@keyframes scanlines {
    0%   { transform: translateY(0); }
    100% { transform: translateY(10px); }
}
#chat-box {
    height:400px;
    overflow-y:auto;
    font-family:monospace;
}

.message {
    margin-bottom:10px;
}

.reply {
    margin-left:20px;
    border-left:1px solid #00ff00;
    padding-left:10px;
}

#online-users {
    margin-top:10px;
    font-size:12px;
}
.page-title {
    border-bottom: 1px solid #00ff00;
    padding: 10px 0;
    margin: 0 0 10px 0;
}
.chat-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input input[type="text"] {
    flex: 1;
}
/* =========================================================
   CRT FLICKER (GLOBAL)
   ========================================================= */

@keyframes crt-flicker {
    0%   { opacity: 1; }
    50%  { opacity: 0.97; }
    100% { opacity: 1; }
}

body {
    animation: crt-flicker 0.15s infinite;
}
/* =========================================================
   CRT GLOW
   ========================================================= */

body {
    text-shadow: 0 0 3px #00ff00;
}
/* =========================================================
   NEW IMAGE MODAL (FINAL FIX)
   ========================================================= */

.img-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.img-modal.open {
    display: flex;
}

.img-modal__inner {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    height: 100%;
}

.img-modal img {
    width: auto;
    height: auto;

    max-width: 90vw;
    max-height: 90vh;

    object-fit: contain;

    display: block;
    margin: auto;

    border: 2px solid #00FF00;
}

/* Close button ALWAYS clickable */
.img-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 28px;
    color: #00FF00;
    background: rgba(0,0,0,0.6);
    border: 1px solid #00FF00;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10001;
}