/* ==========================================================================
   1. GLOBALE VARIABLEN & BASISSYSTEM
   ========================================================================== */
:root {
    --bg-color: #121214;
    --text-color: #e2e8f0;
    --accent-color: #00ff66;
    --accent-blue: #8a99ad;
    --card-bg: #1e1e24;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* --- Echtes Konsolen-Code-Element --- */
code {
    font-family: 'Courier New', Courier, monospace !important;
    color: var(--accent-color) !important;
    font-weight: bold !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   2. NAVIGATION & HEADER (CODEFRONTS PUSH-DOWN ENGINE)
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 9999;
    padding: 24px 20px;
    background-color: var(--bg-color);
    border-bottom: 1px solid rgba(0, 255, 102, 0.15);
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    
    /* CodeFronts Scroll-Anbindung für die Navbar-Höhe */
    animation: cf-nav-shrink linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 140px;
}

@keyframes cf-nav-shrink {
    to {
        padding-block: 12px;
        background-color: rgba(18, 18, 20, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    font-weight: bold;
    color: var(--text-color);
    font-size: 1.3rem;
    letter-spacing: 1px;
    white-space: nowrap;
    
    animation: cf-logo-shrink linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 140px;
}

@keyframes cf-logo-shrink {
    to { font-size: 1.1rem; }
}

.nav-subtitle {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: normal;
    margin-left: 5px;
}

/* Rechte Funktionseinheit */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* --- Hamburger Button --- */
.hamburger {
    width: 44px;
    height: 44px;
    display: grid; /* Immer sichtbar auf allen Geräten */
    place-items: center;
    border: 1px solid rgba(0, 255, 102, 0.2);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    transition: background .2s, border-color .2s;
    
    animation: cf-btn-shrink linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 140px;
}

@keyframes cf-btn-shrink {
    to { width: 36px; height: 36px; }
}

.hamburger:hover {
    border-color: var(--accent-color);
}

.hamburger span {
    position: relative;
    width: 18px;
    height: 12px;
    display: block;
    animation: cf-ico-shrink linear both;
    animation-timeline: scroll(nearest);
    animation-range: 0 140px;
}

@keyframes cf-ico-shrink {
    to { scale: .85; }
}

.hamburger i {
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-color);
    transition: translate .28s, rotate .28s .04s, opacity .2s, background-color .2s;
}

.hamburger i:nth-child(1) { top: 0; }
.hamburger i:nth-child(2) { top: 5px; }
.hamburger i:nth-child(3) { top: 10px; }

/* Kreuz-Animation bei Klick */
.nav-toggle:checked ~ .nav-row .hamburger i:nth-child(1) {
    translate: 0 5px;
    rotate: 45deg;
    background-color: var(--accent-color);
}
.nav-toggle:checked ~ .nav-row .hamburger i:nth-child(2) {
    opacity: 0;
}
.nav-toggle:checked ~ .nav-row .hamburger i:nth-child(3) {
    translate: 0 -5px;
    rotate: -45deg;
    background-color: var(--accent-color);
}

/* --- Die CSS Push-Down Grid Engine --- */
.nav-panel {
    display: grid;
    grid-template-rows: 0fr; /* Standardmäßig komplett zusammengeschoben */
    opacity: 0;
    transition: grid-template-rows .35s cubic-bezier(.2,.7,.2,1), opacity .25s;
}

/* Schiebt beim Klick den Rest der Seite sanft nach unten */
.nav-toggle:checked ~ .nav-panel {
    grid-template-rows: 1fr;
    opacity: 1;
}

.nav-links {
    overflow: hidden;
    min-height: 0;
    list-style: none;
    display: flex;
    flex-direction: column; /* Links untereinander im aufgeklappten Zustand */
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nav-links li {
    width: 100%;
}

.nav-links a {
    display: flex;
    align-items: center;
    min-height: 22px;
    padding: 10px 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid rgba(138, 153, 173, 0.08);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.nav-links li:first-child a {
    margin-top: 15px; /* Abstand zur oberen Zeile beim Aufklappen */
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--accent-color);
    background: rgba(0, 255, 102, 0.04);
    padding-left: 20px;
}

/* --- Sprachauswahl Formatierung --- */
.lang-switch {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    color: var(--accent-blue);
    white-space: nowrap;
}

.lang-switch a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lang-switch a:hover {
    color: var(--accent-color);
}

.lang-switch .lang-active {
    color: var(--accent-color);
    font-weight: bold;
}

/* ==========================================================================
   3. SYSTEM-SPRUNGMENÜ (CLI STYLE)
   ========================================================================== */
.jump-menu-grid {
    background: rgba(138, 153, 173, 0.02);
    border: 1px dashed rgba(0, 255, 102, 0.2);
    padding: 15px;
    margin-bottom: 30px;
    text-align: left;
    font-size: 0.9rem;
}

.jump-menu-title {
    color: var(--accent-blue);
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jump-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.jump-grid a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.jump-grid a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   4. HAUPT-CONTENT, CONTAINER & BOXEN
   ========================================================================== */
.container {
    width: 100%;
    max-width: 725px;
    padding: 40px 20px;
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.2);
    margin: 20px auto;
    box-sizing: border-box;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

h1 .sub-title {
    display: block;
    font-size: 0.95rem;
    color: #8a99ad;
    margin-top: 6px;
    font-weight: normal;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 30px;
    animation: blink 1.5s infinite;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #a0aec0;
}

/* --- Info-Boxen --- */
.info-box {
    margin-top: 30px;
    padding: 15px;
    background: rgba(138, 153, 173, 0.03);
    border-left: 3px solid var(--accent-blue) !important;
    text-align: left;
    font-size: 0.95rem;
}

.info-box span {
    display: block;
    margin-bottom: 5px;
}

.info-box ul {
    list-style-type: disc !important;
    padding-left: 20px !important;
    margin: 10px 0 0 0 !important;
}

.info-box ul li {
    margin-bottom: 8px !important;
    color: #cbd5e1;
    line-height: 1.5;
    text-align: left;
}

.info-box a {
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.info-box a:hover {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

footer {
    margin-top: 40px;
    font-size: 0.8rem;
    color: #4a5568;
}

/* ==========================================================================
   5. SEITENSPEZIFISCHE FORMATIERUNGEN
   ========================================================================== */
.webchat-frame {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 450px;
    border: 1px solid rgba(0, 255, 102, 0.3);
    border-radius: 4px;
    background: #000000;
    margin-top: 20px;
    display: block;
}

.member-name {
    margin: 5px 0 10px 0;
    font-size: 1.4rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.admin-color {
    color: var(--accent-color);
}

.member-text {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
    text-align: left;
}

.cmd-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}

.cmd-table th {
    color: var(--accent-color);
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid var(--accent-blue);
    font-weight: bold;
    text-transform: uppercase;
}

.cmd-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(138, 153, 173, 0.1);
    vertical-align: top;
    color: #cbd5e1;
    line-height: 1.4;
}

.cmd-table tr:hover td {
    background: rgba(138, 153, 173, 0.02);
}

/* ==========================================================================
   6. INTERAKTIVE WIDGETS & ANIMATIONEN
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    left: calc(50% + 380px);
    background: var(--card-bg);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    padding: 10px 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 25px var(--accent-color);
    cursor: pointer;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ==========================================================================
   7. RESPONSIVE ANPASSUNGEN (ZUSÄTZLICHE BREAKPOINTS)
   ========================================================================== */
@media (max-width: 600px) {
    .container {
        margin-top: 20px;
        margin-bottom: 40px;
    }
    h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .jump-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1280px) {
    .back-to-top {
        left: auto;
        right: 20px;
        bottom: 20px;
        padding: 8px 12px;
        font-size: 0.8rem;
        opacity: 0.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navbar, .navbar * {
        animation: none !important;
        transition-duration: .01s !important;
    }
}
