:root {
    --bg: #050a08;
    --card: #08120e;
    --input-bg: #040806;
    --border: #145338;
    --border-bright: #10b981;
    --neon: #10b981;
    --neon-bright: #34d399;
    --text: #d1fae5;
    --muted: #6ee7b7;
    --dim: #4b7c65;
    --danger: #ef4444;
    --warn: #f59e0b;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 2rem 1.2rem;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.10) 0%, transparent 60%),
        linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 28px 28px, 28px 28px;
    color: var(--text);
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.shell-wrap {
    width: 820px;
    max-width: 100%;
}
.shell-wrap.wide {
    width: 1520px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: 1.2rem;
    font-size: .82rem;
    letter-spacing: .8px;
}
.status-line {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--muted);
    font-weight: 700;
}
.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: blinkDot 2s infinite;
}
.dot.offline {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}
@keyframes blinkDot {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}
.nav-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.nav-tabs a {
    color: var(--neon-bright);
    text-decoration: none;
    padding: .35rem .65rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all .18s ease;
}
.nav-tabs a:hover, .nav-tabs a.active {
    border-color: var(--border-bright);
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}
.term-card {
    background: rgba(8, 18, 14, 0.94);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 32px rgba(16, 185, 129, 0.08), inset 0 0 24px rgba(16, 185, 129, 0.03);
    margin-bottom: 1.3rem;
}
h1.term-title {
    margin: 0 0 .7rem 0;
    font-size: 1.65rem;
    color: #ecfdf5;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.lead {
    color: #a7f3d0;
    font-size: .92rem;
    line-height: 1.6;
    margin: 0 0 1.6rem 0;
}
.sec-head {
    color: var(--neon-bright);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    padding-bottom: .45rem;
    margin: 1.6rem 0 1rem 0;
    text-transform: uppercase;
}
.term-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.term-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: .55rem;
    font-size: .88rem;
    line-height: 1.55;
    color: #d1fae5;
}
.term-list li::before {
    content: "▪";
    position: absolute;
    left: 0;
    color: var(--neon-bright);
}
label {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .35rem;
}
input, select, textarea {
    width: 100%;
    padding: .62rem .75rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: #ecfdf5;
    font-family: inherit;
    font-size: .88rem;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--neon-bright);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 680px) {
    .form-grid-2 { grid-template-columns: 1fr; }
}
/* Terminal Buttons (wie [ZUGANG BEANTRAGEN] / [ZUGRIFF ANFORDERN]) */
.btn-term {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--neon-bright);
    border-radius: 5px;
    color: var(--neon-bright);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all .2s ease;
}
.btn-term:hover {
    background: #10b981;
    color: #03150e;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.65);
}
/* Sanft pulsierender & schimmernder Hauptbutton FREE SHELL */
.btn-magic {
    padding: .95rem 2.1rem;
    font-size: 1.05rem;
    letter-spacing: 1.8px;
    animation: neonPulse 3s ease-in-out infinite;
}
.btn-magic::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(167, 243, 208, 0.35), transparent);
    transform: skewX(-25deg);
    animation: termShimmer 3.8s infinite;
}
@keyframes neonPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.25), inset 0 0 8px rgba(16, 185, 129, 0.15);
    }
    50% {
        box-shadow: 0 0 24px rgba(16, 185, 129, 0.65), inset 0 0 14px rgba(52, 211, 153, 0.35);
    }
}
@keyframes termShimmer {
    0% { left: -120%; }
    45%, 100% { left: 160%; }
}
/* Rot schimmerndes Feld wenn alle Server belegt sind */
.btn-closed {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .95rem 1.8rem;
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid #f87171;
    border-radius: 5px;
    color: #fecaca;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    user-select: none;
    animation: redTermPulse 2.8s ease-in-out infinite;
}
.btn-closed::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 202, 202, 0.25), transparent);
    transform: skewX(-25deg);
    animation: termShimmer 3.5s infinite;
}
@keyframes redTermPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.25); }
    50% { box-shadow: 0 0 24px rgba(248, 113, 113, 0.65); }
}
.btn-sm { padding: .42rem .75rem; font-size: .78rem; }
.btn-danger { border-color: #f87171; color: #fca5a5; background: rgba(127, 29, 29, 0.22); }
.btn-danger:hover { background: #dc2626; color: #fff; box-shadow: 0 0 16px rgba(220, 38, 38, 0.6); }
.btn-warn { border-color: #fbbf24; color: #fde68a; background: rgba(120, 53, 15, 0.22); }
.btn-warn:hover { background: #d97706; color: #050a08; box-shadow: 0 0 16px rgba(217, 119, 6, 0.6); }
.alert {
    padding: .85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: .86rem;
    border: 1px solid var(--neon-bright);
    background: rgba(16, 185, 129, 0.14);
    color: #ecfdf5;
}
.alert.err {
    border-color: #f87171;
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
}
.tag-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    margin-top: .6rem;
}
.tag {
    display: block;
    text-align: center;
    background: #040806;
    border: 1px solid var(--border);
    padding: 5px 4px;
    border-radius: 4px;
    font-size: .78rem;
    color: var(--neon-bright);
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: .8rem;
}
th, td {
    padding: .8rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: .84rem;
    vertical-align: middle;
}
th {
    color: var(--muted);
    text-transform: uppercase;
    font-size: .76rem;
    letter-spacing: .8px;
}
code {
    background: #040806;
    border: 1px solid #134e31;
    padding: .25rem .48rem;
    border-radius: 4px;
    color: var(--neon-bright);
    font-size: .8rem;
    white-space: nowrap;
    display: inline-block;
}
.footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: .8rem;
    color: var(--dim);
}
.footer a {
    color: var(--neon-bright);
    text-decoration: none;
}

/* === NEON-SCHIMMER & INTERAKTIONS-EFFEKTE === */
.btn-term::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(236, 253, 245, 0.55), transparent);
    transform: skewX(-25deg);
    transition: left 0.45s ease;
    pointer-events: none;
}
.btn-term:hover::after {
    left: 150%;
}
.btn-term:active {
    transform: scale(0.96);
    background: #34d399 !important;
    color: #02140d !important;
    box-shadow: 0 0 28px #34d399, 0 0 50px rgba(16, 185, 129, 0.85) !important;
}

/* Schimmern wenn RAM / Disk / CPU geändert wurde */
.res-input {
    text-align: center;
    padding: 0.35rem 0.25rem !important;
    font-size: 0.82rem !important;
    font-weight: 700;
}
.res-input.changed {
    border-color: #34d399 !important;
    background: rgba(16, 185, 129, 0.22) !important;
    color: #ffffff !important;
    animation: inputNeonPulse 1.6s ease-in-out infinite;
}
@keyframes inputNeonPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(52, 211, 153, 0.5), inset 0 0 6px rgba(52, 211, 153, 0.25);
    }
    50% {
        box-shadow: 0 0 20px rgba(52, 211, 153, 0.95), inset 0 0 12px rgba(16, 185, 129, 0.45);
    }
}

/* Aufleuchten der Tabellenzeile & Statusmeldung nach dem Speichern */
tr.row-flash {
    animation: rowSavedFlash 2.2s ease-out forwards;
}
@keyframes rowSavedFlash {
    0% {
        background: rgba(52, 211, 153, 0.32);
        box-shadow: inset 0 0 24px rgba(52, 211, 153, 0.55);
    }
    100% {
        background: transparent;
        box-shadow: none;
    }
}
.alert {
    animation: alertPop 0.45s ease-out, neonPulse 3s ease-in-out infinite;
}
@keyframes alertPop {
    0% { transform: translateY(-6px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* === AUGENSCHONENDES DARK-DROPDOWN FÜR <select> === */
html, select {
    color-scheme: dark;
}
select {
    background-color: #040806 !important;
    color: #d1fae5 !important;
    cursor: pointer;
}
select option {
    background-color: #040806 !important;
    color: #a7f3d0 !important;
    padding: 0.55rem 0.75rem;
}
select option:checked,
select option:hover,
select option:focus {
    background: #064e3b linear-gradient(0deg, #064e3b 0%, #064e3b 100%) !important;
    color: #ffffff !important;
}

/* Pulsierendes Neon-Gluehen fuer den Bastihase-Link im Copyright */
@keyframes bastihaseNeonPulse {
    0%, 100% {
        color: #34d399;
        text-shadow: 0 0 6px rgba(52, 211, 153, 0.55), 0 0 14px rgba(16, 185, 129, 0.35);
    }
    50% {
        color: #a7f3d0;
        text-shadow: 0 0 10px rgba(110, 231, 183, 0.9), 0 0 22px rgba(52, 211, 153, 0.65), 0 0 34px rgba(16, 185, 129, 0.4);
    }
}

.footer a.bastihase-neon,
a.bastihase-neon {
    color: #34d399 !important;
    font-weight: 600;
    text-decoration: none;
    animation: bastihaseNeonPulse 1.6s ease-in-out infinite !important;
}

.footer a.bastihase-neon:hover,
a.bastihase-neon:hover {
    color: #ffffff !important;
    text-decoration: underline;
}