@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto:wght@300;400;700&display=swap');

:root {
    --bg-color: #1a1a1a;
    --text-color: #dddddd;
    --accent-color: #d500f9; /* MYSTIC PURPLE (Standard) */
    --panel-bg: rgba(0, 0, 0, 0.85);
    --border-style: 4px solid #333;
    --success-color: #00ff00;
    --error-color: #ff3333;
}

/* ==========================================================================
   PERFORMANCE & BASIS SETUP
   ========================================================================== */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

a, button, input, textarea, select, .gui-btn, .new-thread-btn, .wiki-toggle, .wiki-chapter-link {
    touch-action: manipulation;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal, .modal-content, .card, .server-status-box, .wiki-sidebar, .wiki-content {
    transform: translateZ(0); 
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity; 
}

/* Lazy Rendering */
.wiki-content, .thread-content-box, .forum-table {
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    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;
}

/* ==========================================================================
   THEMES & SAISONALES
   ========================================================================== */
body.theme-christmas { --accent-color: #ff5555; background-image: url('img/bg_snow.jpg'); }
body.theme-christmas .snow-container { display: block; }
body.theme-spring { --accent-color: #55ff55; }
body.theme-autumn { --accent-color: #ff8c00; background-color: #2a1a0a; }
body.theme-autumn .leaf-container { display: block; }

body.theme-autumn .gui-btn { position: relative; overflow: hidden; }
body.theme-autumn .gui-btn::after {
    content: '🍂'; position: absolute; top: -8px; right: -5px;
    font-size: 1.2rem; opacity: 0.4; transform: rotate(20deg); pointer-events: none;
}
body.theme-autumn .nav-link::before {
    content: '🍁'; position: absolute; bottom: 2px; right: 2px;
    font-size: 0.6rem; color: #ff8c00; opacity: 0.6;
}

/* ==========================================================================
   ANIMATIONEN (LEBENDIGER & SCHIMMERND)
   ========================================================================== */
/* Page Load */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Popup - SUPER BOUNCY EFFEKT (Aktualisiert) */
@keyframes modalPop {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.15); } /* Springt weiter raus */
    70% { transform: scale(0.95); } /* Zieht sich kurz zusammen */
    100% { transform: scale(1); }
}

/* NEU: Der "Live" Schimmer Effekt für den Rand/Schatten */
@keyframes liveGlow {
    0% { 
        box-shadow: 0 0 20px var(--accent-color); 
        border-color: #000;
    }
    50% { 
        box-shadow: 0 0 50px var(--accent-color), 0 0 15px rgba(255,255,255,0.3); /* Weißer Kern */
        border-color: #555; /* Rand wird heller */
    }
    100% { 
        box-shadow: 0 0 20px var(--accent-color); 
        border-color: #000;
    }
}

/* Button Klick Animation */
@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Logo Glow */
@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; } 
}

/* Schnee & Laub */
.snow-container, .leaf-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 999; display: none; 
}
.snowflake { position: absolute; top: -20px; 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; } }
.leaf { position: absolute; top: -20px; font-size: 1.2rem; animation: leafFall linear infinite; opacity: 0.8; }
.leaf:nth-child(1) { left: 10%; color: #d2691e; animation-duration: 8s; animation-delay: 0s; }
.leaf:nth-child(2) { left: 30%; color: #ff4500; animation-duration: 12s; animation-delay: 2s; }
.leaf:nth-child(3) { left: 60%; color: #ffd700; animation-duration: 6s; animation-delay: 4s; }
.leaf:nth-child(4) { left: 80%; color: #8b4513; animation-duration: 10s; animation-delay: 1s; }
.leaf:nth-child(5) { left: 50%; color: #ff8c00; animation-duration: 9s; animation-delay: 3s; }
@keyframes leafFall {
    0% { transform: translateY(-20px) rotate(0deg) translateX(0px); opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg) translateX(50px); opacity: 0.7; }
}

/* ==========================================================================
   HEADER & NAVIGATION - PC & HANDY FIX
   ========================================================================== */

/* 1. GRUNDEINSTELLUNG (Gilt für PC und allgemein) */
header { 
    background-image: url('img/banner.png');
    
    /* HIER STELLST DU DEN ZOOM FÜR DEN PC EIN */
    /* 'cover' = Automatischer Zoom */
    /* '100% auto' = Ganz rausgezoomt (volle Breite sichtbar) */
    /* '120% auto' = Leicht reingezoomt */
    background-size: 90% auto; 
    
    /* HIER STELLST DU DIE POSITION FÜR DEN PC EIN */
    /* Erster Wert: Links/Rechts (center) */
    /* Zweiter Wert: Oben/Unten (Pixel oder % um es zu verschieben) */
    background-position: center 46%; 

    height: 210px; 
    
    padding: 0 80px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 6px solid #222; 
    position: relative; 
    z-index: 20; 
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5); 
}

/* 2. DER UNSICHTBARE KLICK-BEREICH */
.logo-container { 
    position: relative; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    z-index: 25; 
}

.logo-banner {
    display: block; 
    text-decoration: none;
    background-image: none; /* Kein extra Logo, nur das Banner */
    height: 100%; 
    width: 400px; 
    text-indent: -9999px; 
    overflow: hidden; 
}
.logo-banner:hover { cursor: pointer; }
.logo { display: none !important; }

/* ==========================================================================
   MOBILE OPTIMIERUNGEN (MAX 768PX)
   ========================================================================== */
@media screen and (max-width: 768px) {
    
    /* FIX FÜR DEN HEADER AUF DEM HANDY */
    header {
        /* WICHTIG: Hier stand vorher 840px (viel zu hoch!). 
           150px ist perfekt für ein Handy-Banner. */
        height: 70px !important; 
        
        /* 'cover' sorgt dafür, dass die Box komplett gefüllt ist.
           Das Bild wird reingezoomt, damit keine schwarzen Ränder entstehen. */
        background-size: cover !important; 
        
        /* Zentriert das Bild strikt in der Mitte */
        background-position: center center !important;
        
        padding: 0 15px;
        
        /* Korrigiert das Flexbox-Verhalten für Handys */
        flex-direction: row; 
        justify-content: center;
    }
    
    /* Der Klickbereich füllt auf dem Handy die ganze Breite */
    .logo-banner {
        width: 100% !important;
    }

    /* RESTLICHE HANDY ANPASSUNGEN (Layout, Tabellen, Schriftgrößen) */
    .gui-input, .gui-select, textarea, input, select {
        font-size: 16px !important; /* Verhindert Auto-Zoom beim Tippen auf iPhones */
    }

    .container { display: flex; flex-direction: column; padding: 0 10px; }
    
    .logo { font-size: 1.8rem; }
    nav { flex-wrap: wrap; padding: 10px 5px; gap: 5px; }
    .nav-link { padding: 10px 8px; font-size: 0.55rem; }
    
    /* Tabellen Fix für Forum */
    .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; position: relative; }
    .forum-stats-right { justify-content: flex-start; margin-top: 5px; }
    
    /* Modal Anpassungen */
    #settingsModal .modal-content, .modal-content { width: 95% !important; margin-top: 20px !important; margin-bottom: 20px !important; }
    
    /* Widgets untereinander statt nebeneinander */
    .server-status-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
    .traffic-light-item { padding: 5px; border-width: 1px; }
    .server-name-label { font-size: 0.5rem; margin-bottom: 3px; }
    .traffic-light-housing { padding: 5px 10px; gap: 8px; }
    .light { width: 15px; height: 15px; }
    .status-legend { font-size: 0.4rem; margin-top: 3px; }
    
    .gui-btn, .mc-3d-btn { width: auto; display: inline-block; min-width: 60%; padding: 8px 15px; font-size: 0.6rem; margin-left: auto; margin-right: auto; }
    .gui-inner form { text-align: center; }
    .widget-ts { text-align: center; }
    
    .gui-input, .gui-select { padding: 8px; }
    
    .wiki-container { display: flex; flex-direction: column; }
    .wiki-sidebar { width: 100% !important; max-width: 100%; margin-right: 0; margin-bottom: 15px; border-right: none; border-bottom: 2px dashed #555; padding-bottom: 15px; }
    .wiki-content { width: 100% !important; padding-left: 0 !important; border-left: none !important; border-top: none; }
}
/* VORDERGRUND: Unsichtbarer Klick-Bereich (Home-Button) */
.logo-banner {
    display: block; 
    text-decoration: none;
    
    /* ÄNDERUNG: Kein Logo-Bild mehr (Logo links ist weg) */
    background-image: none; 
    
    /* Wir lassen den Container aber da, damit man im linken Bereich 
       trotzdem noch klicken kann, um zur Startseite zu kommen. */
    height: 100%; 
    width: 400px; 
    
    text-indent: -9999px; 
    overflow: hidden; 
}

/* Hover-Effekte entfernt, da kein Logo mehr da ist */
.logo-banner:hover { 
    transform: none; 
    cursor: pointer; /* Zeigt trotzdem die Hand beim Drüberfahren */
}

/* Alte Text-Klasse ausblenden */
.logo { display: none !important; }

/* Alte Text-Klasse sicherheitshalber ausblenden */
.logo { display: none !important; }
.header-theme-select:hover { border-color: var(--accent-color); background: #111; }
.header-theme-select:focus { outline: none; box-shadow: 0 0 10px var(--accent-color); }

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; 
    position: relative; top: 0; 
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.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; 
    transform: scale(1.05);
}
.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; 
    animation: fadeIn 0.2s ease-in-out;
}
.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; 
    transition: padding-left 0.2s;
}
.dropdown-content a:hover { 
    background-color: #333; color: var(--accent-color); 
    padding-left: 20px; 
}
.nav-item:hover .dropdown-content { display: block; }

.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; transition: color 0.3s; }
.login-trigger:hover { color: var(--accent-color); text-shadow: 0 0 5px var(--accent-color); }
.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; transform: translateY(-2px); }
.btn-top-login:active { 
    border: 2px solid #000; border-bottom: 2px solid #555; border-right: 2px solid #555; 
    transform: translateY(2px) scale(0.95); 
}

/* ==========================================================================
   LAYOUT & INHALT
   ========================================================================== */
.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;
    animation: fadeInUp 0.5s ease-out; 
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-2px); box-shadow: 10px 10px 0px #000; }

.server-status-box { 
    display: flex; flex-direction: column; gap: 15px; 
    background: var(--panel-bg); border: var(--border-style); 
    padding: 20px; box-shadow: 8px 8px 0px #000;
    margin-bottom: 20px; width: auto; 
    animation: fadeInUp 0.6s ease-out; 
}
.traffic-light-item { background: #000; border: 2px solid #333; padding: 10px; text-align: center; }
.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.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); box-shadow: inset 0 0 5px #000; }
.light.red.active { background: #ff3333; box-shadow: 0 0 15px #ff0000; border-color: #ffaaaa; transform: scale(1.2); }
.light.yellow.active { background: #ffcc00; box-shadow: 0 0 15px #ffaa00; border-color: #ffeeaa; transform: scale(1.2); }
.light.green.active { background: #33ff33; box-shadow: 0 0 15px #00ff00; border-color: #aaffaa; transform: scale(1.2); }
.blink { animation: blinker 1s linear infinite; }
@keyframes blinker { 50% { opacity: 0.3; transform: scale(0.9); } }

.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; } 

/* ==========================================================================
   WIKI, FORUM & TEAM
   ========================================================================== */
.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; 
    transition: background 0.3s;
}
.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; 
    transition: all 0.2s;
}
.wiki-chapter-link:hover { background: #a0a0a0; color: #000; transform: translateX(5px); }
.wiki-chapter-link.active { background: #fff; border: 2px solid #000; color: #000; box-shadow: inset 0 0 5px #aaa; transform: scale(1.02); }
.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; animation: fadeIn 0.3s; }
.wiki-subchapter { font-size: 0.5rem; padding: 8px; margin-bottom: 2px; }

/* Forum */
.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; transition: background 0.3s; }
.forum-table tr:hover td { background: rgba(255,255,255,0.05); }
.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, transform 0.2s;}
.forum-title-link:hover { color: var(--accent-color); transform: translateX(5px); }

.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; 
    box-shadow: 0 0 10px var(--accent-color);
    transition: all 0.2s;
}
.new-thread-btn:hover { background: #fff; transform: scale(1.05); box-shadow: 0 0 20px var(--accent-color); }
.new-thread-btn:active { transform: scale(0.95); }

.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-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; 
    transition: all 0.2s;
}
.react-btn:hover { background: #444; color: #fff; border-color: var(--accent-color); transform: scale(1.1); }
.react-btn:active { transform: scale(0.9); }
.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; transition: transform 0.3s; }
.reply-item:hover { transform: translateX(5px); border-left-color: var(--accent-color); }

.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; 
    transition: all 0.2s;
}
.edit-toggle-btn:hover { opacity: 1; background: var(--accent-color); color:#000; transform: scale(1.1) rotate(5deg); }
.editor-wrapper { display: none; margin-top: 15px; border-top: 1px solid #555; padding-top: 15px; animation: fadeIn 0.3s; }
.editor-area { width: 100%; min-height: 300px; color: #000; transition: box-shadow 0.3s; }
.editor-area:focus { box-shadow: 0 0 15px var(--accent-color); outline: none; }

.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; 
    transition: all 0.2s;
}
.save-btn:hover { background: #00cc00; transform: scale(1.02); box-shadow: 0 0 10px #00ff00; }
.save-btn:active { transform: scale(0.95); }

.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; 
    transition: all 0.2s;
}
.delete-btn:hover { background: #cc0000; transform: rotate(5deg) scale(1.1); }

/* Team */
.team-member { border-bottom: 2px dashed #444; padding: 15px 0; display: flex; flex-direction: column; transition: background 0.3s; }
.team-member:hover { background: rgba(255,255,255,0.03); }
.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; 
    transition: transform 0.3s;
}
.team-member:hover .team-rank-badge { transform: translateY(-8px) rotate(-2deg); }

.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:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.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) scale(0.98); 
}
.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; animation: blinker 2s infinite; }

/* ==========================================================================
   MODAL FIX (BOUNCY & SHIMMER)
   ========================================================================== */
#settingsModal, .modal {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99999;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    
    /* Overlay scrollbar */
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; 
    overscroll-behavior: contain; 
}

#settingsModal[style*="block"], .modal[style*="block"] {
    display: flex !important;
    align-items: flex-start; 
    justify-content: center;
}

#settingsModal .modal-content, .modal-content {
    margin: auto !important;
    margin-top: 50px !important; 
    margin-bottom: 50px !important;
    width: 450px !important;
    max-width: 90% !important;
    height: auto !important;
    max-height: none !important; 
    
    background-color: #c6c6c6; 
    border: 4px solid #000;
    padding: 2px;
    image-rendering: pixelated; 
    position: relative;
    
    /* HIER SIND DIE NEUEN ANIMATIONEN: POP + LIVE GLOW */
    animation: modalPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), liveGlow 3s infinite alternate;
    
    display: flex !important;
    flex-direction: column !important;
    top: auto !important; left: auto !important; transform: none !important;
}

.gui-inner, .gui-scroll-container {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    flex: none !important;
    padding: 20px;
    background: #c6c6c6;
    border: 4px solid #fff;
    border-right-color: #555; border-bottom-color: #555;
    text-align: center;
    color: #404040;
}

.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; 
    transition: all 0.3s;
}
.gui-input:focus, .gui-select:focus { 
    border-color: var(--accent-color); 
    box-shadow: 0 0 10px var(--accent-color); 
    transform: scale(1.02);
    outline: none;
}

.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%; 
    transition: all 0.1s;
}
.gui-btn:hover { background: #888; transform: translateY(-1px); }
.gui-btn:active { 
    border: 2px solid #000; border-bottom: 2px solid #fff; border-right: 2px solid #fff; 
    background: #555; transform: scale(0.95);
}

.close-btn { 
    position: absolute; top: 5px; right: 10px; font-weight: bold; cursor: pointer; color: #404040; font-size: 24px; z-index: 100; 
    transition: transform 0.2s, color 0.2s;
}
.close-btn:hover { color: var(--error-color); transform: scale(1.2) rotate(90deg); }

.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; transition: transform 0.3s; }
.pw-req.valid { color: var(--success-color); text-shadow: 0 0 5px var(--success-color); transform: translateX(5px); }
.pw-req.valid::before { content: '✔'; transform: scale(1.2); }
.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; transition: color 0.2s; }
.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; animation: blinker 0.5s 3; }

/* ==========================================================================
   MOBILE OPTIMIERUNGEN (MAX 768PX)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .gui-input, .gui-select, textarea, input, select {
        font-size: 16px !important;
    }

    .container { display: flex; flex-direction: column; padding: 0 10px; }
    header { height: auto; flex-direction: column; gap: 15px; text-align: center; padding-bottom: 15px; }
    .logo { font-size: 1.8rem; }
    nav { flex-wrap: wrap; padding: 10px 5px; gap: 5px; }
    .nav-link { padding: 10px 8px; font-size: 0.55rem; }
    
    .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; position: relative; }
    .forum-stats-right { justify-content: flex-start; margin-top: 5px; }
    
    #settingsModal .modal-content, .modal-content { width: 95% !important; margin-top: 20px !important; margin-bottom: 20px !important; }
    
    .server-status-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
    .traffic-light-item { padding: 5px; border-width: 1px; }
    .server-name-label { font-size: 0.5rem; margin-bottom: 3px; }
    .traffic-light-housing { padding: 5px 10px; gap: 8px; }
    .light { width: 15px; height: 15px; }
    .status-legend { font-size: 0.4rem; margin-top: 3px; }
    
    .gui-btn, .mc-3d-btn { width: auto; display: inline-block; min-width: 60%; padding: 8px 15px; font-size: 0.6rem; margin-left: auto; margin-right: auto; }
    .gui-inner form { text-align: center; }
    .widget-ts { text-align: center; }
    
    .gui-input, .gui-select { padding: 8px; }
    
    .wiki-container { display: flex; flex-direction: column; }
    .wiki-sidebar { width: 100% !important; max-width: 100%; margin-right: 0; margin-bottom: 15px; border-right: none; border-bottom: 2px dashed #555; padding-bottom: 15px; }
    .wiki-content { width: 100% !important; padding-left: 0 !important; border-left: none !important; border-top: none; }
}