/* --- 1. CORE TERMINAL & LAYOUT --- */
body {
    background-color: #0a0a0a;
    color: #00ff00; 
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    padding-top: 50px;
    line-height: 1.2;
}

.terminal-container {
    width: 80ch; 
    background: #000;
    padding: 20px;
    border: 2px solid #333;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* CRT Scanline Overlay */
.terminal-container::before {
    content: " ";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

/* --- 2. BRANDING & ALERTS --- */
.logo {
    color: #ff0000; 
    white-space: pre; 
    margin-bottom: 20px;
    text-align: center;
}

.branding {
    text-align: center;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.status-msg {
    color: #ffff00; 
    text-align: center;
    border: 1px dashed #ffff00;
    padding: 10px;
    margin-top: 20px;
}

.ansi-alert {
    border: 2px double #ff0000;
    padding: 10px;
    background: #220000;
    color: #ff5555;
    font-weight: bold;
    text-transform: uppercase;
    margin: 15px 0;
    font-size: 0.9em;
}

/* --- 3. FORM ELEMENTS --- */
input[type="text"], 
input[type="password"], 
input[type="file"],
input[type="number"],
textarea { 
    background: #111; 
    border: 1px solid #333; 
    color: #0f0; 
    padding: 5px; 
    font-family: 'Courier New', monospace;
    outline: none;
}

input:focus, textarea:focus {
    border-color: #00ff00;
}

.bbs-button {
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 10px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    width: 100%;
    display: block;
}

.bbs-button:hover {
    background: #0f0;
    color: #000;
}

/* --- 4. FORUM INTERFACE --- */
.bbs-mini-btn {
    background: #111;
    color: #0f0;
    border: 1px solid #444;
    padding: 2px 8px;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.8em;
    text-transform: uppercase;
    margin-right: 5px;
}

.bbs-mini-btn:hover {
    background: #222;
    border-color: #0f0;
}

/* The Active/Remove state must come AFTER .bbs-mini-btn */
.btn-active {
    background: #333300 !important; 
    color: #ffff00 !important;      
    border-color: #ffff00 !important;
}

.btn-active:hover {
    background: #444400 !important;
    color: #fff !important;
}

/* --- 5. BBCODE & CONTENT RENDERING --- */
.bb-content {
    white-space: pre-wrap; 
    word-wrap: break-word; 
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    color: #ccc;
}

.bbs-quote {
    border-left: 3px solid #0f0;
    padding: 5px 10px;
    color: #888;
    font-style: italic;
    margin: 10px 0;
    background: #0a0a0a;
}

.quote-author {
    color: #0f0;
    font-weight: bold;
    font-size: 0.8em;
}

.spoiler {
    background: #555;
    color: #555;
    cursor: pointer;
    padding: 0 4px;
}
.spoiler.revealed { background: transparent; color: #fff; }

.nsfw-overlay {
    background: #300;
    color: #f00;
    border: 1px dashed #f00;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}
.nsfw-overlay.revealed { background: transparent; color: inherit; border: none; }

.forum-responsive-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #333;
    display: block;
    margin: 10px 0;
}

.bbs-link { color: #00ffff; text-decoration: underline; }
.bbs-link:hover { color: #fff; background: #005555; }