@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --bg-color: #1a1a1a;
    --text-color: #dddddd;
    --accent-color: #d500f9; /* MYSTIC PURPLE */
    --panel-bg: rgba(0, 0, 0, 0.85);
    --border-style: 4px solid #333;
    --success-color: #00ff00;
    --error-color: #ff3333;
}

body.theme-christmas { --accent-color: #ff5555; background-image: url('img/bg_snow.jpg'); }
body.theme-spring { --accent-color: #55ff55; }

body {
    font-family: 'Segoe UI', sans-serif; background-color: var(--bg-color);
    background-size: cover; background-attachment: fixed; color: var(--text-color);
    margin: 0; padding: 0; overflow-x: hidden;
}

h1, h2, h3, .mc-font {
    font-family: 'Press Start 2P', cursive; text-transform: uppercase;
    text-shadow: 3px 3px 0px #000; line-height: 1.5;
}

/* HEADER & LOGO */
header { 
    background: rgba(10,10,10,0.95); padding: 15px 30px; display: flex; 
    justify-content: space-between; align-items: center; 
    border-bottom: 6px solid #222; position: relative; z-index: 20; 
    height: 120px; 
}
.logo-container { position: relative; }
.logo { font-size: 2.5rem; color: #fff; text-decoration: none; -webkit-text-stroke: 1px #000; text-shadow: 0 0 10px var(--accent-color); animation: mysticGlow 3s infinite alternate; }
@keyframes mysticGlow { 0% { text-shadow: 0 0 5px var(--accent-color), 3px 3px 0px #000; } 100% { text-shadow: 0 0 20px var(--accent-color), 0 0 40px var(--accent-color), 3px 3px 0px #000; } }

/* NAV */
nav { background: #111; display: flex; justify-content: center; gap: 10px; padding: 15px; flex-wrap: wrap; border-bottom: 2px solid #222; }
.nav-item { position: relative; display: inline-block; }
.nav-link { display: block; color: #fff; text-decoration: none; padding: 15px 20px; font-weight: bold; border: 4px solid #444; background: #222; font-family: 'Press Start 2P'; font-size: 0.7rem; transition: all 0.1s; position: relative; top: 0; }
.nav-link:hover { background: var(--accent-color); color: #fff; border-color: #fff; box-shadow: inset 0 0 0 4px rgba(0,0,0,0.2); top: 4px; text-shadow: 2px 2px 0 #000; }
.dropdown-content { display: none; position: absolute; background-color: #1a1a1a; min-width: 220px; border: 4px solid #fff; z-index: 100; top: 100%; left: 0; box-shadow: 5px 5px 0px #000; }
.dropdown-content a { color: #fff; padding: 15px; text-decoration: none; display: block; font-family: 'Press Start 2P'; font-size: 0.6rem; border-bottom: 2px solid #333; }
.dropdown-content a:hover { background-color: #333; color: var(--accent-color); }
.nav-item:hover .dropdown-content { display: block; }

/* CONTENT GRID */
.container { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; max-width: 1400px; margin: 30px auto; padding: 0 20px; }
.card { background: var(--panel-bg); border: var(--border-style); padding: 20px; margin-bottom: 20px; box-shadow: 8px 8px 0px #000; position: relative; }

/* AMPEL STYLES - SIDEBAR */
.server-status-full-width-wrapper { display: none; } 

.server-status-box { 
    display: flex; 
    flex-direction: column; /* UNTEREINANDER */
    gap: 15px; 
    background: var(--panel-bg); 
    border: var(--border-style); 
    padding: 20px; 
    box-shadow: 8px 8px 0px #000;
    margin-bottom: 20px; 
    width: auto; 
}

.traffic-light-item {
    background: #000;
    border: 2px solid #333;
    padding: 10px;
    text-align: center;
    width: auto; 
}

.server-name-label {
    margin: 0 0 5px 0;
    color: var(--accent-color);
    font-size: 0.6rem;
    font-family: 'Press Start 2P', cursive;
}
.traffic-light-housing { 
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    gap: 15px; 
    background: #000; 
    padding: 10px 20px; 
    border-radius: 20px; 
    border: 2px solid #333; 
    margin-bottom: 5px; 
    box-shadow: inset 0 0 10px #000; 
}

.light { width: 25px; height: 25px; border-radius: 50%; background: #2a2a2a; border: 2px solid #444; transition: all 0.3s ease; box-shadow: inset 0 0 5px #000; }
.light.red.active { background: #ff3333; box-shadow: 0 0 15px #ff0000; border-color: #ffaaaa; }
.light.yellow.active { background: #ffcc00; box-shadow: 0 0 15px #ffaa00; border-color: #ffeeaa; }
.light.green.active { background: #33ff33; box-shadow: 0 0 15px #00ff00; border-color: #aaffaa; }
.blink { animation: blinker 1s linear infinite; }
@keyframes blinker { 50% { opacity: 0.3; } }

.status-legend { font-family: 'Press Start 2P'; font-size: 0.6rem; color: #888; margin-top: 8px; text-align: center; }
.admin-status-controls { margin-top: 5px; display: flex; flex-direction: column; gap: 2px; width: 100%; }
.admin-select { background: #222; color: #fff; border: 1px solid #555; font-size: 0.6rem; width: 100%; cursor: pointer; padding: 2px; }
.server-specific-select { margin-top: 5px; } 

/* EDITOR & BUTTONS */
.edit-toggle-btn { position: absolute; top: 10px; right: 10px; background: #333; color: #fff; border: 1px solid #aaa; padding: 5px 10px; cursor: pointer; font-size: 0.7rem; opacity: 0.7; }
.edit-toggle-btn:hover { opacity: 1; background: var(--accent-color); color:#000; }
.editor-wrapper { display: none; margin-top: 15px; border-top: 1px solid #555; padding-top: 15px; }
.editor-area { width: 100%; min-height: 300px; color: #000; }
.save-btn { background: #00aa00; color: #fff; padding: 10px; border: 2px solid #fff; cursor: pointer; font-family: 'Press Start 2P'; font-size: 0.6rem; margin-top:10px;}

/* WIKI */
.wiki-container { display: grid; grid-template-columns: 250px 1fr; gap: 20px; margin-top: 20px; }
.wiki-sidebar { background: #c6c6c6; border: 4px solid #000; padding: 10px; display: flex; flex-direction: column; gap: 5px; height: fit-content; }
.wiki-chapter-group { margin-bottom: 5px; } 
.wiki-parent-wrapper { display: flex; align-items: stretch; } 
.wiki-toggle { 
    background: #555; color: #fff; border: 2px solid #000; 
    width: 30px; display: flex; justify-content: center; align-items: center; 
    cursor: pointer; font-weight: bold; margin-right: 2px;
}
.wiki-toggle:hover { background: var(--accent-color); color: #000; }

.wiki-chapter-link { 
    flex-grow: 1; 
    display: block; padding: 10px; color: #404040; text-decoration: none; 
    background: #8b8b8b; border-bottom: 2px solid #fff; border-right: 2px solid #fff; 
    border-top: 2px solid #373737; border-left: 2px solid #373737; 
    font-family: 'Press Start 2P'; font-size: 0.6rem; line-height: 1.5; text-align: center; 
}
.wiki-chapter-link:hover { background: #a0a0a0; color: #000; }
.wiki-chapter-link.active { background: #fff; border: 2px solid #000; color: #000; box-shadow: inset 0 0 5px #aaa; }
.wiki-content { padding: 20px; background: rgba(0,0,0,0.6); border: 2px solid #444; min-height: 400px; }

.wiki-sub-container { display: none; margin-left: 20px; margin-top: 5px; border-left: 2px dashed #555; padding-left: 5px; }
.wiki-subchapter { font-size: 0.5rem; padding: 8px; margin-bottom: 2px; }

/* FORUM TABLE */
.forum-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.forum-table th, .forum-table td { text-align: left; padding: 10px; border-bottom: 1px solid #333; vertical-align: middle; }
.forum-table th { background: rgba(0,0,0,0.5); color: var(--accent-color); font-family: 'Press Start 2P'; font-size: 0.6rem; }
.forum-title-link { font-weight: bold; color: #fff; text-decoration: none; font-size: 1.1rem; display:block; transition: color 0.2s;}
.forum-title-link:hover { color: var(--accent-color); }
.forum-meta { font-size: 0.8rem; color: #888; margin-top: 5px;}
.new-thread-btn { background: var(--accent-color); color: #000; padding: 10px; text-decoration: none; font-weight: bold; display: inline-block; margin-bottom: 15px; border: 2px solid #fff; }
.forum-stats-right { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.last-activity-date { color:#aaa; font-size:0.8rem; margin-right:10px; }
.stat-box { display:flex; gap:8px; background:#111; padding:5px 8px; border-radius:5px; border:1px solid #333; }
.stat-item { display: flex; align-items: center; gap: 4px; color: #fff; font-size: 0.7rem; font-weight: bold; }

/* THREAD DETAIL */
.thread-header { border-bottom: 2px solid #444; padding-bottom: 15px; margin-bottom: 20px; position: relative; }
.thread-meta { font-size: 0.8rem; color: #888; margin-bottom: 5px; }
.thread-content-box { background: rgba(0,0,0,0.3); padding: 15px; border: 1px solid #333; min-height: 100px; }
.reaction-bar { margin-top: 15px; display: flex; gap: 10px; flex-wrap: wrap; }
.react-form { display: inline-block; }
.react-btn { background: #222; border: 1px solid #444; color: #aaa; cursor: pointer; padding: 5px 10px; border-radius: 5px; font-size: 0.8rem; display: flex; align-items: center; gap: 5px; }
.react-btn:hover { background: #444; color: #fff; border-color: var(--accent-color); }
.reaction-count { background: var(--accent-color); color: #000; padding: 1px 5px; border-radius: 3px; font-size: 0.7rem; font-weight: bold; }
.reply-box { margin-top: 20px; border-top: 1px solid #444; padding-top: 20px; }
.reply-item { background: #111; border: 1px solid #333; padding: 10px; margin-bottom: 10px; position: relative; }

/* DELETE BUTTONS */
.delete-btn { 
    background: #ff3333; color: #fff; border: 1px solid #fff; 
    padding: 5px; cursor: pointer; font-size: 0.6rem; 
    font-family: 'Press Start 2P'; margin-left: 10px;
}
.delete-btn:hover { background: #cc0000; }

/* TEAM STYLES */
.team-member { border-bottom: 2px dashed #444; padding: 15px 0; display: flex; flex-direction: column; }
.team-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 5px; }
.team-name { margin: 0; font-size: 1.2rem; color: #fff; }
.team-rank-badge { background: #000; border: 2px solid #fff; padding: 5px 10px; font-family: 'Press Start 2P'; font-size: 0.6rem; box-shadow: 3px 3px 0 #000; transform: translateY(-5px); text-transform: uppercase; }
.rank-master { color: #d500f9; border-color: #d500f9; text-shadow: 0 0 5px #d500f9; animation: mysticGlow 2s infinite; }
.rank-ceo { color: #800080; border-color: #800080; }
.rank-dev { color: #add8e6; border-color: #add8e6; }
.rank-srmod { color: #90ee90; border-color: #90ee90; }
.rank-mod { color: #006400; border-color: #006400; }
.rank-supporter { color: #00008b; border-color: #00008b; }
.team-desc { color: #aaa; font-style: italic; font-size: 0.9rem; margin-top: 5px; }

/* BUTTONS & WIDGETS */
.mc-3d-btn { display: block; text-align: center; padding: 12px; text-decoration: none; font-weight: bold; color: #fff; font-family: 'Press Start 2P', cursive; font-size: 0.7rem; border-left: 3px solid rgba(255,255,255,0.3); border-top: 3px solid rgba(255,255,255,0.3); border-right: 3px solid rgba(0,0,0,0.5); border-bottom: 3px solid rgba(0,0,0,0.5); transition: all 0.1s; text-shadow: 2px 2px 0 #000; }
.mc-3d-btn:active { border-left: 3px solid rgba(0,0,0,0.5); border-top: 3px solid rgba(0,0,0,0.5); border-right: 3px solid rgba(255,255,255,0.3); border-bottom: 3px solid rgba(255,255,255,0.3); transform: translateY(2px); }
.btn-ts { background-color: #2580c3; } .btn-dc { background-color: #7289da; }
.widget-ts { border-color: #2580c3; } .widget-discord { border-color: #7289da; }
.ts-icon { display:inline-block; width:10px; height:10px; background:#00ff00; border-radius:50%; margin-right:5px; box-shadow: 0 0 5px #00ff00;}
.top-bar { background: #000; color: #aaa; padding: 8px 20px; display: flex; justify-content: flex-end; align-items: center; font-size: 0.8rem; z-index: 50; position:relative; border-bottom: 1px solid #333; }
.login-trigger { cursor: pointer; color: #fff; margin-left: 15px; text-decoration: underline; font-weight: bold; }
.login-trigger:hover { color: var(--accent-color); }
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); }
.modal-content { background-color: #c6c6c6; margin: 10% auto; padding: 2px; border: 4px solid #000; width: 400px; box-shadow: 0 0 30px var(--accent-color); image-rendering: pixelated; position: relative; }
.gui-inner { background: #c6c6c6; border-top: 4px solid #fff; border-left: 4px solid #fff; border-right: 4px solid #555; border-bottom: 4px solid #555; padding: 20px; color: #404040; text-align: center; }
.gui-input, .gui-select { width: 90%; background: #000; color: #fff; border: 2px solid #a0a0a0; padding: 10px; margin: 10px 0; font-family: 'Press Start 2P'; font-size: 0.6rem; }
.gui-btn { background: #777; border: 2px solid #000; border-top: 2px solid #fff; border-left: 2px solid #fff; color: #fff; padding: 10px 20px; cursor: pointer; font-family: 'Press Start 2P'; margin-top: 10px; width: 100%; }
.gui-btn:active { border: 2px solid #000; border-bottom: 2px solid #fff; border-right: 2px solid #fff; background: #555; }
.close-btn { position: absolute; top: 5px; right: 10px; font-weight: bold; cursor: pointer; color: #404040; font-size: 24px; z-index: 100; }
.snow-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; display: none; }
.snowflake { position: absolute; top: -10px; color: #fff; font-size: 1.5rem; animation: fall linear infinite; text-shadow: 0 0 5px #fff; }
@keyframes fall { 0% { transform: translateY(-10vh) translateX(0); opacity: 1; } 100% { transform: translateY(100vh) translateX(20px); opacity: 0.5; } }
.blurred-text { filter: blur(5px); user-select: none; pointer-events: none; opacity: 0.5; }
.locked-message { text-align: center; background: #330000; border: 2px solid red; padding: 20px; color: #ff5555; font-family: 'Press Start 2P'; font-size: 0.8rem; margin-top: -50px; position: relative; z-index: 10; }

.pw-requirements {
    list-style: none; padding: 0; margin: 10px 0; text-align: left;
    font-family: 'Segoe UI', sans-serif; font-size: 0.7rem;
}
.pw-req { color: var(--error-color); transition: all 0.3s; display: flex; align-items: center; gap: 5px; font-weight: bold; }
.pw-req::before { content: '✖'; font-weight: bold; font-size: 1rem; }
.pw-req.valid { color: var(--success-color); text-shadow: 0 0 5px var(--success-color); }
.pw-req.valid::before { content: '✔'; }
.pw-input-valid { border-color: var(--success-color) !important; box-shadow: 0 0 10px var(--success-color) !important; }

.profile-trigger {
    text-decoration: underline;
    cursor: pointer;
}
.profile-trigger:hover {
    color: var(--accent-color);
}

.error-message { 
    background: #330000; 
    border: 2px solid red; 
    color: #fff; 
    padding: 10px; 
    margin-bottom: 15px; 
    font-family: sans-serif; 
}


/* MOBILE OPTIMIERUNG */
@media screen and (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column; 
        padding: 0 10px; 
    }
    header {
        height: auto; 
        flex-direction: column; 
        gap: 20px;
        text-align: center;
        padding-bottom: 20px;
    }
    nav {
        flex-wrap: wrap; 
        padding: 10px 5px;
    }
    .nav-link {
        padding: 12px 10px; 
        font-size: 0.6rem;
    }
    .wiki-container {
        display: flex;
        flex-direction: column; 
    }
    .wiki-sidebar {
        width: 100%; 
        box-sizing: border-box; 
        margin-bottom: 20px;
    }
    .forum-table, .forum-table tbody, .forum-table tr, .forum-table td {
        display: block; 
        width: 100%;
    }
    .forum-table thead { display: none; } 
    .forum-table tr {
        margin-bottom: 15px;
        border: 2px solid #333;
        background: rgba(0,0,0,0.2);
        padding: 10px;
    }
    .forum-table td {
        border: none;
        padding: 5px 0;
        text-align: left;
    }
    .forum-stats-right {
        justify-content: flex-start; 
        margin-top: 5px;
    }
    .modal-content {
        width: 90%; 
    }
    input[type="text"], input[type="password"], select, textarea {
        font-size: 16px !important; 
    }
}

/* --- FORUM BLUR & LOCK --- */
.blur-target {
    filter: blur(8px); /* Stärke der Unschärfe */
    pointer-events: none; /* Verhindert Klicken auf unscharfe Elemente */
    user-select: none;    /* Verhindert Textmarkierung */
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dunkler, halbtransparenter Hintergrund */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.lock-content {
    background: #222;
    border: 2px solid #ff5555;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.4);
    max-width: 80%;
}

/* --- NEU: Login & Register Buttons im Header --- */
.btn-top-login {
    background: #333;
    color: #fff;
    padding: 8px 12px;
    margin-left: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-decoration: none;
    border: 2px solid #000;
    border-top: 2px solid #777;
    border-left: 2px solid #777;
    cursor: pointer;
    display: inline-block;
    transition: all 0.1s;
}

.btn-top-login:hover {
    background: var(--accent-color);
    color: #000;
    border-top-color: #fff;
    border-left-color: #fff;
}

.btn-top-login:active {
    border: 2px solid #000;
    border-bottom: 2px solid #555;
    border-right: 2px solid #555;
    transform: translateY(2px);
}