/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-hetzner: #d50c2d;
    --accent-warn: #f59e0b;

    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
}

* { box-sizing: border-box; }


body {
    background-color: #0f172a;
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative; /* Wichtig für z-index */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top center, #1e293b 0%, #0f172a 60%);
    z-index: -1;
    pointer-events: none;
}

* { box-sizing: border-box; }

body {
    /* Sicherheits-Farbe: Falls der Gradient lädt, ist es dunkelblau statt weiß */
    background-color: #0f172a;
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative; /* Wichtig für z-index */
}

/* NEU: Der Hintergrund wird fixiert */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top center, #1e293b 0%, #0f172a 60%);
    z-index: -1;
    pointer-events: none;
}

a { color: var(--accent-blue); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-green); }

/* =========================================
   HEADER & NAVIGATION (RESPONSIVE)
   ========================================= */
header {
    background: rgba(30, 41, 59, 0.95); /* Etwas undurchsichtiger für Lesbarkeit */
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    position: sticky;
    top: 0;
    z-index: 1000; /* Muss über allem liegen */
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 1001;
}

/* Desktop Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav a {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}
nav a:hover { color: var(--accent-blue); }

/* Hamburger Icon (Standardmäßig versteckt) */
.menu-toggle {
    display: flex;
    margin-left: auto;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s;
}

/* --- MOBILE VIEW --- */
@media (max-width: 768px) {
    /* Hamburger anzeigen */
    .menu-toggle { display: flex; }

    /* Menü verstecken & stylen */
    nav ul {
        position: fixed;
        top: 0;
        right: -100%; /* Außerhalb des Bildschirms */
        width: 70%;
        height: 100vh;
        background: var(--bg-card); /* Dunkler Hintergrund */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        border-left: 1px solid #334155;
    }

    /* Wenn Menü offen ist */
    nav ul.active { right: 0; }

    nav a { font-size: 1.2rem; }

    /* Hamburger Animation zum X */
    .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
}

.logo {
    font-weight: 900; font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    width: 100%;
}

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #64748b;
    border-top: 1px solid #334155;
    margin-top: auto;
}

/* =========================================
   3. GLOBAL COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    display: inline-block;
    text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

.btn-primary { background: var(--gradient-main); }
.btn-secondary { background: #475569; border: 1px solid #64748b; }
.btn-secondary:hover { background: #64748b; }
.btn-green { background: var(--accent-green); }
.btn-green:hover { background: #059669; }
.btn-blue { background: var(--accent-blue); }
.btn-blue:hover { background: #2563eb; }
.btn-hetzner { background: var(--accent-hetzner); }
.btn-hetzner:hover { background: #b91c1c; }

.btn-hetzner-outline { border: 1px solid var(--accent-hetzner); color: var(--accent-hetzner); background: transparent; }
.btn-hetzner-outline:hover { background: var(--accent-hetzner); color: white; }
.btn-warning-outline { border: 1px solid var(--accent-warn); color: var(--accent-warn); background: transparent; }
.btn-warning-outline:hover { background: var(--accent-warn); color: black; }

.btn-small { padding: 5px 10px; font-size: 0.8rem; }

/* Input Fields */
input[type="text"] {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid var(--accent-blue);
    color: white;
    padding: 12px 20px;
    font-size: 1.2rem;
    border-radius: 8px;
    outline: none;
    font-family: monospace;
    transition: all 0.3s;
}
input[type="text"]:focus { border-color: var(--accent-green); box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
.input-error { border-color: #ef4444 !important; animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; color: #ef4444 !important; }

/* Cards & Text */
.hero-small { text-align: center; padding: 2rem 1rem; margin-bottom: 2rem; }
.subtitle { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 2rem; }
.highlight-hetzner { color: var(--accent-hetzner); font-weight: bold; }
.highlight-blue { color: var(--accent-blue); font-weight: bold; }

/* =========================================
   4. PORTFOLIO / HOME PAGE
   ========================================= */
.hero { text-align: center; max-width: 700px; margin-bottom: 3rem; }
h1 { font-size: 3rem; margin-bottom: 0.5rem; font-weight: 800; }
.text-gradient { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.bio-box {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem; border-radius: 12px;
    border: 1px solid #334155;
    line-height: 1.7; font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
}

/* Tech Stack Grid */
.stack-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 3rem; max-width: 800px; }
.stack-item {
    background: rgba(30, 41, 59, 0.6); border: 1px solid var(--accent-blue);
    padding: 8px 15px; border-radius: 8px; font-weight: 600; color: #e2e8f0;
    transition: all 0.3s; cursor: default;
}
.stack-item:hover { background: var(--accent-blue); color: white; transform: translateY(-3px); box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); }

/* Timeline */
.timeline-section { max-width: 800px; width: 100%; position: relative; }
.timeline-section h2 { text-align: center; margin-bottom: 3rem; border-bottom: 2px solid #334155; display: table; margin-left: auto; margin-right: auto; padding-bottom: 1rem; }
.timeline { display: flex; flex-direction: column; position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; top: 15px; bottom: 0; width: 2px; background: #334155; }

.timeline-item { display: flex; flex-direction: column; padding-left: 2rem; margin-bottom: 2.5rem; position: relative; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px; /* <-- Geändert damit es mittig ist */
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--bg-dark);
    border: 3px solid var(--accent-blue);
    border-radius: 50%;
    z-index: 1;
    transition: background 0.3s;
}
.timeline-item:hover::before { background: var(--accent-green); border-color: var(--accent-green); }

.card { background: var(--bg-card); padding: 1.5rem; border-radius: 10px; border: 1px solid #334155; transition: transform 0.3s; }
.timeline-item:hover .card { transform: translateX(5px); border-color: #475569; }
.card h3 { margin: 0 0 0.5rem 0; font-size: 1.3rem; color: white; }
.year { font-weight: bold; font-family: monospace; font-size: 1rem; margin-bottom: 0.5rem; opacity: 0.8; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.tag { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.2); font-size: 0.75rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; }

@media (min-width: 768px) {
    .timeline::before { left: 85px; }
    .timeline-item { flex-direction: row; padding-left: 0; align-items: flex-start; }

    /* Hier die Änderung: */
    .timeline-item::before {
        left: 85px; /* <-- Geändert von 134px auf 131px */
        top: 25px;
    }

    .year { width: 120px; text-align: right; padding-right: 2.5rem; padding-top: 1.2rem; flex-shrink: 0; }
    .info { flex: 1; position: relative; }
    .info.card::after { content: ''; position: absolute; left: -8px; top: 25px; width: 15px; height: 15px; background: var(--bg-card); transform: rotate(45deg); border-left: 1px solid #334155; border-bottom: 1px solid #334155; }
}

/* =========================================
   5. SUBNETTING TOOL
   ========================================= */
.subnet-guide { max-width: 800px; width: 100%; margin-top: 2rem; }
.calculating-overlay { text-align: center; font-family: monospace; color: var(--accent-green); font-size: 1.2rem; margin: 2rem 0; display: none; }

.step-card { display: flex; background: var(--bg-card); border-radius: 12px; border: 1px solid #334155; margin-bottom: 2rem; opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.step-card.visible { opacity: 1; transform: translateY(0); }
.step-number { background: var(--accent-blue); color: white; font-size: 2rem; font-weight: bold; width: 60px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-content { padding: 1.5rem; flex: 1; }

.octet-grid { display: flex; gap: 10px; margin: 1rem 0; }
.octet { flex: 1; background: #0f172a; border: 1px solid #475569; padding: 10px; text-align: center; border-radius: 6px; color: #64748b; }
.octet.active { background: rgba(59, 130, 246, 0.2); border-color: var(--accent-blue); color: white; font-weight: bold; }
.octet.filled { border-color: var(--accent-green); color: var(--accent-green); }

.binary-table { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 1.5rem 0; font-family: monospace; }
.bin-col { display: flex; flex-direction: column; align-items: center; background: #0f172a; padding: 8px 2px; border-radius: 6px; border: 1px solid #334155; }
.bin-col.active { background: rgba(59, 130, 246, 0.15); border-color: var(--accent-blue); transform: scale(1.05); }
.bin-val { font-size: 0.75rem; color: #64748b; margin-bottom: 5px; border-bottom: 1px solid #334155; width: 100%; text-align: center; }
.bin-col.active .bin-val { color: var(--accent-blue); font-weight: bold; }
.bin-bit { font-size: 1.2rem; color: #475569; }
.bin-col.active .bin-bit { color: white; font-weight: bold; }

.interval-scale { display: flex; align-items: center; margin-top: 2rem; font-family: monospace; position: relative; padding-bottom: 2rem; }
.interval-marker .num { background: #334155; padding: 5px 10px; border-radius: 4px; font-weight: bold; }
.interval-marker .desc { position: absolute; top: 35px; font-size: 0.7rem; color: #94a3b8; width: 80px; text-align: center; }
.grow-bar { height: 100%; background: var(--gradient-main); width: 0%; transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1); border-radius: 4px; position: relative; }

.calc-assembly { background: #1e293b; padding: 1.5rem; border-radius: 8px; border: 1px solid #334155; }
.assembly-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.assembly-label { width: 100px; font-size: 0.9rem; color: #94a3b8; text-transform: uppercase; }
.ip-visual { display: flex; gap: 4px; font-family: monospace; font-size: 1.2rem; }
.octet-mini { background: #0f172a; padding: 5px 10px; border-radius: 4px; border: 1px solid #334155; color: #cbd5e1; min-width: 30px; text-align: center; }
.octet-mini.changed-net { background: rgba(59, 130, 246, 0.2); border-color: var(--accent-blue); color: var(--accent-blue); font-weight: bold; }
.octet-mini.changed-broad { background: rgba(213, 12, 45, 0.2); border-color: var(--accent-hetzner); color: var(--accent-hetzner); font-weight: bold; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.res-item { background: #0f172a; padding: 1rem; border-radius: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.res-item.full-width { grid-column: span 2; border: 1px dashed #475569; }
.res-item .value { font-size: 1.2rem; font-weight: bold; margin: 5px 0; color: white; }

.neighbors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.neighbor-card { background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; position: relative; }
.neighbor-card.current { border-color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); transform: scale(1.05); z-index: 10; }
.neighbor-card.muted { opacity: 0.6; border-style: dashed; }
.n-title { font-size: 0.8rem; text-transform: uppercase; color: #94a3b8; text-align: center; margin-bottom: 5px; }
.n-row { display: flex; justify-content: space-between; font-size: 0.85rem; border-bottom: 1px solid #1e293b; padding-bottom: 4px; }
.n-val { color: #e2e8f0; font-family: monospace; font-weight: bold; }

/* =========================================
   6. DDOS & DPI SIMULATOR
   ========================================= */
.ddos-container { max-width: 1000px; width: 100%; margin: 0 auto; }

/* Controls */
.control-panel { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; justify-content: center; }
.control-group { background: #1e293b; border: 1px solid #334155; padding: 1rem; border-radius: 8px; flex: 1; min-width: 250px; text-align: center; }
.control-group h3 { margin: 0 0 10px 0; font-size: 0.9rem; color: #94a3b8; text-transform: uppercase; border-bottom: 1px solid #334155; padding-bottom: 5px; }
.btn-row { display: flex; gap: 5px; justify-content: center; }
.status-text { font-size: 0.8rem; font-weight: bold; color: #64748b; margin-top: 5px; }

/* MAIN GRID LAYOUT */
.sim-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Battlefield | Inspector */
    gap: 1rem;
    margin-bottom: 1rem;
}

/* --- BATTLEFIELD (Left) --- */
.battlefield-linear {
    display: flex; align-items: center; justify-content: space-between;
    background: #0f172a; border: 2px solid #334155; border-radius: 12px;
    height: 350px; position: relative; padding: 0 1rem; overflow: hidden;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Nodes */
.sources { display: flex; flex-direction: column; gap: 2rem; z-index: 10; }
.source { text-align: center; opacity: 0.8; }
.source .icon { font-size: 2.5rem; }
.source .label { font-size: 0.8rem; color: #94a3b8; }

.firewall-zone {
    width: 100px; height: 140px; border: 2px dashed #475569; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(30, 41, 59, 0.5); position: relative; z-index: 10; transition: all 0.3s;
}
.firewall-zone.fw-active { border: 2px solid #10b981; background: rgba(16, 185, 129, 0.1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
.fw-icon { font-size: 2.5rem; margin-bottom: 5px; opacity: 0.5; }
.fw-active .fw-icon { opacity: 1; }
.fw-label { font-size: 0.8rem; color: #64748b; font-weight: bold; }
.fw-active .fw-label { color: #10b981; }
.fw-scan-line { position: absolute; width: 100%; height: 2px; background: #10b981; top: 10%; left: 0; opacity: 0; box-shadow: 0 0 10px #10b981; }
.fw-active .fw-scan-line { animation: scan 1.5s infinite linear; opacity: 1; }

.target-zone { width: 200px; background: #1e293b; border: 2px solid #334155; border-radius: 10px; padding: 10px; z-index: 10; position: relative; transition: border-color 0.2s; }
.server-icon { text-align: center; font-size: 2rem; margin-bottom: 5px; }
.bar-container { margin-bottom: 8px; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.7rem; color: #94a3b8; margin-bottom: 2px; }
.bar-bg { width: 100%; height: 6px; background: #0f172a; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; width: 0%; transition: width 0.2s; }
.bar-fill.ram { background-color: #d50c2d; }
.bar-fill.bw { background-color: #f59e0b; }
.status-badge { text-align: center; padding: 4px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; margin-top: 5px; }
.status-ok { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-down { background: rgba(239, 68, 68, 0.2); color: #ef4444; animation: blink 1s infinite; }

/* --- PACKET INSPECTOR (Right) --- */
.packet-inspector {
    background: #000; border: 1px solid #334155; border-radius: 12px; padding: 1rem;
    font-family: 'Courier New', monospace; display: flex; flex-direction: column;
    height: 350px; box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.packet-inspector h3 { margin: 0 0 10px 0; color: var(--accent-blue); font-size: 0.9rem; border-bottom: 1px dashed #334155; padding-bottom: 5px; text-transform: uppercase; }
.inspector-empty { color: #475569; text-align: center; margin-top: 50%; transform: translateY(-50%); font-size: 0.8rem; }

.pkt-detail { animation: flashIn 0.1s; }
.pkt-row { display: flex; justify-content: space-between; border-bottom: 1px solid #1e1e1e; padding: 5px 0; font-size: 0.8rem; }
.pkt-label { color: #94a3b8; }
.pkt-val { color: #e2e8f0; font-weight: bold; }
.pkt-payload { background: #1e1e1e; padding: 5px; margin-top: 5px; font-size: 0.7rem; word-break: break-all; border-radius: 4px; }
.hex-dump { margin-top: auto; font-size: 0.6rem; color: #475569; border-top: 1px solid #1e1e1e; padding-top: 10px; opacity: 0.7; }

/* Packets */
.packet { position: absolute; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: bold; color: white; z-index: 5; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
.pkt-syn { background: #d50c2d; }
.pkt-udp { background: #f59e0b; border-radius: 4px; }
.pkt-user { background: #10b981; border: 2px solid white; z-index: 6; }
.scanned-bad { animation: dissolve 0.2s forwards; background: white !important; color: black; }
.scanned-good { transform: scale(1.2); transition: transform 0.2s; }

/* Console & Legend */
.log-console { height: 120px; overflow: hidden; background: #000; padding: 10px; border: 1px solid #334155; border-radius: 8px; font-family: monospace; font-size: 0.8rem; display: flex; flex-direction: column; margin-bottom: 1rem; }
.log-line { border-bottom: 1px solid #1e1e1e; padding: 2px 0; }
.log-line.error { color: #ef4444; } .log-line.warn { color: #f59e0b; } .log-line.success { color: #10b981; } .log-line.info { color: #3b82f6; }

.legend { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; font-size: 0.85rem; color: #94a3b8; }
.legend-item { display: flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.syn { background: #d50c2d; } .dot.udp { background: #f59e0b; } .dot.dpi { background: #10b981; }

@media (max-width: 800px) {
    .sim-grid { grid-template-columns: 1fr; }
    .battlefield-linear { height: 250px; }
    .packet-inspector { height: auto; min-height: 200px; }
}

/* =========================================
   7. ANIMATIONS
   ========================================= */
.fade-in { animation: fadeIn 1s ease-out; }
.fade-in-delay { animation: fadeIn 1s ease-out 0.3s backwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.wave { display: inline-block; animation: wave 2.5s infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0deg); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }

@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }
@keyframes blink { 50% { opacity: 0.5; } }
@keyframes scan { 0% { top: 10%; } 50% { top: 90%; } 100% { top: 10%; } }
@keyframes dissolve { to { transform: scale(2); opacity: 0; } }
@keyframes flashIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

.pulsing { animation: pulseBtn 0.5s infinite alternate; }
@keyframes pulseBtn { from { opacity: 1; transform: scale(1); } to { opacity: 0.8; transform: scale(1.05); } }

.cursor { display: inline-block; width: 3px; background-color: var(--accent-green); animation: blink 1s infinite; margin-left: 5px; }

/* --- IPv6 Calculator Styles --- */

.ipv6-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Mobile: 4 pro Zeile */
    gap: 10px;
    margin-top: 1rem;
}

@media (min-width: 700px) {
    .ipv6-grid {
        grid-template-columns: repeat(8, 1fr); /* Desktop: Alle 8 nebeneinander */
    }
}

.hextet-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px 5px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.hex-val {
    font-family: monospace;
    font-weight: bold;
    font-size: 1rem;
    color: #cbd5e1;
    letter-spacing: 1px;
}

.hex-label {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: 5px;
    text-transform: uppercase;
}

/* Status Colors */
.hextet-box.network {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}
.hextet-box.network .hex-val { color: var(--accent-blue); }

.hextet-box.host {
    border-color: var(--accent-hetzner); /* oder grau */
    background: rgba(213, 12, 45, 0.05);
}
.hextet-box.host .hex-val { color: var(--accent-hetzner); }

.hextet-box.split {
    border-color: #f59e0b; /* Orange für Split */
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 50%, rgba(213, 12, 45, 0.05) 50%);
}

/* --- Kubernetes Visualizer --- */

.k8s-container { max-width: 1000px; width: 100%; margin: 0 auto; position: relative; }

/* 1. ADMIN / TERMINAL */
.admin-zone { margin-bottom: 2rem; display: flex; gap: 1rem; align-items: flex-start; }

.terminal-window {
    flex: 1;
    background: #1e1e1e;
    border-radius: 6px;
    border: 1px solid #334155;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.term-header { background: #334155; padding: 5px 10px; font-size: 0.8rem; color: #cbd5e1; }
.term-body { height: 100px; padding: 10px; overflow-y: auto; font-size: 0.9rem; color: #e2e8f0; }
.term-input-line { padding: 10px; border-top: 1px solid #334155; background: #262626; display: flex; align-items: center; font-size: 0.9rem; }
.btn-xs { padding: 4px 8px; font-size: 0.7rem; margin-left: auto; }

.controls-extra { display: flex; flex-direction: column; gap: 5px; }

/* 2. CLUSTER GRID */
.cluster-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* CP links (kleiner), Nodes rechts (größer) */
    gap: 2rem;
    align-items: start;
}

/* Control Plane */
.control-plane {
    background: rgba(59, 130, 246, 0.05);
    border: 2px dashed #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.cp-label {
    position: absolute; top: -12px; left: 1rem;
    background: #0f172a; padding: 0 5px;
    color: #3b82f6; font-size: 0.8rem; font-weight: bold;
}

.cp-internals { display: flex; gap: 10px; width: 100%; justify-content: center; }

/* Components (API, Sched, etc) */
.component {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    width: 80px;
    transition: all 0.3s;
    z-index: 10;
}
.api-server { width: 100%; border-color: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.1); }
.comp-icon { font-size: 1.5rem; margin-bottom: 5px; }
.comp-name { font-size: 0.7rem; color: #cbd5e1; }

.pulse-active { transform: scale(1.1); border-color: #10b981; box-shadow: 0 0 20px #10b981; }

/* Worker Zone */
.worker-zone {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.node {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}
.node-header { display: flex; justify-content: space-between; border-bottom: 1px solid #334155; padding-bottom: 5px; margin-bottom: 10px; font-weight: bold; font-size: 0.9rem; }
.res-usage { font-size: 0.8rem; color: #94a3b8; font-family: monospace; }

.kubelet {
    position: absolute; bottom: 10px; right: 10px;
    font-size: 0.6rem; background: #334155; padding: 2px 5px; border-radius: 4px;
}

/* Pod Slots */
.pod-slots {
    display: flex;
    gap: 10px;
    height: 60px; /* Platz für Pods */
    align-items: center;
}

.pod-unit {
    width: 50px;
    height: 50px;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pod-icon { font-size: 1.2rem; }
.pod-status { font-size: 0.5rem; color: #10b981; margin-top: 2px; }

@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

/* Packet Animation */
.k8s-packet {
    position: absolute;
    width: 12px; height: 12px;
    background: #10b981;
    border-radius: 50%;
    z-index: 100;
    box-shadow: 0 0 10px #10b981;
    transition: top 0.6s linear, left 0.6s linear;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 768px) {
    .cluster-grid { grid-template-columns: 1fr; }
    .admin-zone { flex-direction: column; }
    .controls-extra { flex-direction: row; width: 100%; }
    .controls-extra button { flex: 1; }
}

/* --- CHECKLIST PAGE --- */

.checklist-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.check-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.check-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-color: #475569;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
}

.card-icon { font-size: 1.5rem; }
.card-header h3 { margin: 0; font-size: 1.1rem; color: #f1f5f9; }
.card-desc { font-size: 0.8rem; color: #94a3b8; margin-bottom: 1rem; font-style: italic; }

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    margin-bottom: 1rem;
    position: relative;
}

/* Custom Checkbox Design */
.task-item input[type="checkbox"] {
    accent-color: var(--accent-green);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-right: 8px;
    transform: translateY(2px);
}

.task-item label {
    font-weight: bold;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.2s;
}

.task-item input:checked + label {
    color: var(--accent-green);
    text-decoration: line-through;
    opacity: 0.7;
}

.task-detail {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: 28px; /* Einrücken unter Label */
    margin-top: 2px;
    line-height: 1.4;
}

/* Tutorial Link Button */
.tut-link {
    float: right;
    font-size: 0.7rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    padding: 2px 6px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
}

.tut-link:hover {
    background: var(--accent-blue);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .checklist-container { grid-template-columns: 1fr; }
}

/* --- Special Cards --- */

/* Damit die Warnung oben über die ganze Breite geht */
.full-width {
    grid-column: 1 / -1;
}

.warning-box {
    background: rgba(245, 158, 11, 0.1); /* Leichtes Orange/Gelb */
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.warning-box .card-header h3 {
    color: #f59e0b !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.warning-box .task-detail {
    color: #cbd5e1; /* Hellerer Text für bessere Lesbarkeit in der Warnbox */
}

/* --- EXIT MODAL (External Link Warning) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none; /* Standardmäßig unsichtbar */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.modal-box {
    background: #1e293b;
    border: 1px solid #475569;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transform: scale(0.9);
    animation: popIn 0.2s forwards;
}

.modal-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-title { font-size: 1.2rem; font-weight: bold; color: #f1f5f9; margin-bottom: 10px; }
.modal-text { font-size: 0.9rem; color: #94a3b8; margin-bottom: 2rem; line-height: 1.5; }

.modal-actions { display: flex; gap: 10px; justify-content: center; }

@keyframes popIn {
    to { transform: scale(1); }
}
/* --- Legal Disclaimer Box --- */
.legal-box {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.5); /* Sehr dunkel */
    border: 1px solid #334155;
    border-radius: 8px;
    text-align: center;
    color: #64748b; /* Muted Textfarbe */
    font-size: 0.85rem;
}

.legal-box h4 {
    color: #94a3b8;
    margin-top: 0;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-box p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.legal-box strong {
    color: #cbd5e1; /* Wichtige Wörter etwas heller */
}