/* ==========================================================================
   AEGIS MAINFRAME :: GLOBAL BBS STYLES (CONSOLIDATED)
   ========================================================================== */

/* --- 1. NAVIGATION & HEADER --- */
.bbs-nav {
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid #00ffaa;
    padding: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
}
.bbs-nav a, .bbs-nav-links a { color: #00ffaa; text-decoration: none; }
.bbs-nav-links a { margin-left: 20px; }
.bbs-nav a:hover, .bbs-nav-links a:hover { color: #fff; }

/* --- 2. TERMINALS & BOXEN --- */
.terminal-box, .form-box { 
    border: 1px solid #333; 
    background: rgba(0,0,0,0.6); 
    padding: 20px; /* Gemittelt aus 20px und 25px */
    margin-bottom: 30px; 
    font-family: monospace;
}
.terminal-box h3 { 
    color: #00e5ff; 
    margin-top: 0; 
    border-bottom: 1px dashed #333; 
    padding-bottom: 10px; 
    display: flex; 
    justify-content: space-between;
}
/* Ausnahme für Password Recovery Terminals */
.terminal-box[style*="max-width: 500px"] { border-color: #ffaa00; }

/* --- 3. FORMULARE & INPUTS --- */
.bbs-form-group { margin-bottom: 20px; }
.bbs-form-group label, .telemetry-label { 
    display: block; 
    color: #00ffaa; 
    margin-bottom: 5px; 
    font-weight: bold; 
    font-family: monospace;
}
.telemetry-label { color: #888; display: inline-block; width: 120px; }

.bbs-input, .bbs-select {
    width: 100%; 
    padding: 10px; 
    background: rgba(0, 0, 0, 0.5); 
    border: 1px solid #333; 
    color: #fff; 
    font-family: monospace; 
    box-sizing: border-box;
    margin-bottom: 15px;
}
.bbs-input:focus, .bbs-select:focus { 
    border-color: #00e5ff; 
    outline: none; 
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.3); 
}

/* --- 4. BUTTONS --- */
.bbs-btn, .btn-submit, .btn-new {
    background: transparent; 
    border: 1px solid #00ffaa; 
    color: #00ffaa;
    padding: 10px 20px; 
    font-family: monospace; 
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer; 
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}
.bbs-btn:hover, .btn-submit:hover, .btn-new:hover { 
    background: #00ffaa; 
    color: #000; 
}
.btn-action { 
    background: transparent; border: 1px solid #00e5ff; color: #00e5ff; padding: 5px 10px; font-family: monospace; cursor: pointer; text-decoration: none; font-size: 0.8rem;
}
.btn-action:hover { background: #00e5ff; color: #000; }
.btn-delete { border-color: #ff5555; color: #ff5555; }
.btn-delete:hover { background: #ff5555; color: #000; }

/* --- 5. ALARM- & STATUS-PROTOKOLLE --- */
.alert-box, .alert-error, .alert-success { 
    padding: 10px 15px; 
    margin-bottom: 20px; 
    font-family: monospace; 
    border: 1px dashed; 
}
.alert-success, .success { color: #00ffaa; background: rgba(0, 255, 170, 0.1); border-color: #00ffaa; }
.alert-error, .error { color: #ff5555; background: rgba(255, 85, 85, 0.1); border-color: #ff5555; }

/* --- 6. BBS LISTEN (BOARD & THREADS) --- */
.board-category, .thread-row, .post-container {
    border: 1px solid #333;
    background: rgba(0, 0, 0, 0.6);
    margin-bottom: 15px;
    transition: all 0.2s;
}
.board-category:hover, .thread-row:hover { border-color: #00ffaa; box-shadow: 0 0 10px rgba(0, 255, 170, 0.1); }
.thread-row { display: flex; justify-content: space-between; padding: 15px; }
.post-container { display: flex; }

.category-header { padding: 15px; border-bottom: 1px dashed #333; }
.category-title, .thread-title { font-size: 1.2rem; color: #00ffaa; text-decoration: none; display: block; margin-bottom: 5px; }
.category-title:hover, .thread-title:hover { color: #fff; }
.category-desc { color: #888; font-size: 0.9rem; font-family: monospace; }
.category-stats { padding: 10px 15px; background: rgba(0,0,0,0.4); font-family: monospace; font-size: 0.8rem; color: #666; }

.subcat-box { border: 1px dashed #333; background: rgba(0,0,0,0.4); margin-bottom: 20px; padding: 15px; }
.subcat-box h3 { margin-top: 0; color: #aaa; font-size: 1rem; border-bottom: 1px solid #333; padding-bottom: 5px; }
.subcat-item { margin-bottom: 10px; display: block; text-decoration: none; color: #00e5ff; }
.subcat-item:hover { color: #fff; }

.thread-main { flex-grow: 1; }
.thread-meta { color: #666; font-size: 0.8rem; font-family: monospace; }
.thread-stats { text-align: right; color: #888; font-size: 0.8rem; font-family: monospace; min-width: 120px; }

/* --- 7. BBS POSTS & PROFILE --- */
.post-sidebar { width: 200px; padding: 15px; border-right: 1px solid #333; background: rgba(0,0,0,0.3); font-family: monospace; text-align: center; flex-shrink: 0;}
.post-content { flex-grow: 1; padding: 20px; color: #ccc; line-height: 1.6; min-width: 0; }
.post-meta { font-family: monospace; font-size: 0.8rem; color: #666; border-bottom: 1px dashed #333; padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between;}

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }
.telemetry-data { color: #ccc; font-family: monospace; line-height: 2; }

/* --- 8. INBOX TABLES --- */
.msg-table { width: 100%; border-collapse: collapse; font-family: monospace; }
.msg-table th { text-align: left; padding: 10px; border-bottom: 1px solid #333; color: #888; }
.msg-table td { padding: 10px; border-bottom: 1px dashed #222; color: #ccc; }
.msg-table tr:hover td { background: rgba(0, 229, 255, 0.05); }
.msg-link { color: #ccc; text-decoration: none; display: block; }
.msg-link:hover { color: #00e5ff; }
.msg-unread { color: #00ffaa; font-weight: bold; }
.msg-unread .msg-link { color: #00ffaa; }

/* --- 9. TAGS & BADGES --- */
.clearance-tag { font-size: 0.7rem; padding: 2px 5px; border: 1px solid #ff5555; color: #ff5555; margin-left: 10px; vertical-align: middle; }
.pinned-tag { color: #ffaa00; border: 1px solid #ffaa00; padding: 2px 5px; font-size: 0.7rem; margin-right: 10px; }
.rank-tag { display: inline-block; padding: 2px 5px; font-size: 0.75rem; margin-top: 5px; border: 1px solid #666; }
.rank-core { color: #ff5555; border-color: #ff5555; }
.rank-praetor { color: #aa55ff; border-color: #aa55ff; }

/* --- 10. EDITOR STYLES (EASYMDE / MARKDOWN) --- */
.editor-toolbar { border-color: #333; background: rgba(0,0,0,0.8); }
.editor-toolbar button { color: #00e5ff !important; transition: 0.3s; }
.editor-toolbar button.active, .editor-toolbar button:hover { background: rgba(0, 229, 255, 0.2); border-color: #00e5ff; }
.CodeMirror { background: rgba(0,0,0,0.4); color: #fff; border: 1px solid #333; font-family: monospace; }
.CodeMirror-cursor { border-left: 2px solid #00ffaa !important; }
.editor-preview { background: #111; color: #ccc; }
.reply-box { border: 1px solid #00e5ff; padding: 20px; background: rgba(0, 229, 255, 0.05); margin-top: 40px; }

/* Markdown Renderer Overrides */
.post-body-rendered img { max-width: 100%; height: auto; border: 1px solid #333; }
.post-body-rendered blockquote { border-left: 3px solid #00e5ff; margin: 0; padding-left: 15px; color: #888; font-style: italic; background: rgba(0,229,255,0.05); }
.post-body-rendered code { background: rgba(0,0,0,0.8); color: #00ffaa; padding: 2px 5px; font-family: monospace; }
.post-body-rendered pre code { display: block; padding: 10px; overflow-x: auto; }

/* ==========================================================================
   MODUL: GATEWAY / LANDING PAGE (INDEX)
   ========================================================================== */
body.gateway-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.gateway-panel {
    background: var(--bg-card);
    border: 1px solid rgba(110, 122, 207, 0.3);
    border-top: 3px solid var(--accent-primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 20px rgba(110, 122, 207, 0.05);
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
}

.gateway-desc {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 0.95rem;
    font-family: var(--font-term);
}

.gateway-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.gateway-grid .btn-download {
    margin-top: 0; 
    flex-grow: 1;
    text-align: center;
}

.system-status {
    margin-top: 50px;
    border-top: 1px dashed #333;
    padding-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: left;
}

.typewriter-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-green);
    width: 0;
    animation: typing 2.5s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-green); }
}