/*!
 * bh-fun.css – Bunkerhosting.de: Effekte & Tool-Seite
 * Bunkertür-Intro, Server-Rack, Status-Plakette, Winter-Modus, Adventskalender,
 * Bunker-Alarm (Konami-Code) und die Generatoren-Seite (/generatoren.php)
 */

:root {
  --bhf-red: #d43e29;
  --bhf-red-d: #b3311f;
  --bhf-red-soft: rgba(212, 62, 41, .14);
  --bhf-bg: #161616;
  --bhf-card: #232323;
  --bhf-card2: #2a2a2a;
  --bhf-line: rgba(255, 255, 255, .09);
  --bhf-line2: rgba(255, 255, 255, .16);
  --bhf-text: #e2e2e2;
  --bhf-mut: #9a9a9a;
  --bhf-ok: #3ea76a;
  --bhf-warn: #e0a030;
}

/* =====================================================================
   7) BUNKERTÜR-INTRO (nur Startseite, 1x pro Sitzung)
   a) Abdeckung vor dem ersten Bild (Head-Hook setzt html.bh-intro)
   b) animierte Tresortür (.bhd), aufgebaut von bh-fun.js
   ===================================================================== */
html.bh-intro::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #262626 0, #141414 60%, #0b0b0b 100%);
}
html.bh-intro body, html.bhd-lock body { overflow: hidden; }

.bhd {
  --bhd-red: #d43e29;
  --bhd-green: #3ecf7a;
  --bhd-vault: min(78vmin, 600px);
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  overflow: hidden;
  background: #070707;
  opacity: 0;
  transition: opacity .3s ease;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
.bhd.is-in { opacity: 1; }
.bhd.s-open { background: transparent; transition: background .35s ease, opacity .3s ease; }
.bhd.s-out { opacity: 0; transition: opacity .4s ease; }

/* Licht hinter der Tür */
.bhd-light {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, .95) 49.6%, #fff 50%, rgba(255, 255, 255, .95) 50.4%, transparent 53%),
    radial-gradient(ellipse 14% 85% at 50% 50%, rgba(255, 244, 238, .75), rgba(255, 150, 120, .25) 45%, transparent 75%);
  opacity: 0;
  transform: scaleX(.05);
}
.bhd.s-open .bhd-light { animation: bhdLight 1.1s cubic-bezier(.3, 0, .2, 1) forwards; }
@keyframes bhdLight {
  0% { opacity: 0; transform: scaleX(.05); }
  15% { opacity: 1; transform: scaleX(.3); }
  45% { opacity: .7; transform: scaleX(.9); }
  80% { opacity: 0; transform: scaleX(1.8); }
  100% { opacity: 0; transform: scaleX(2); }
}

/* Bühne mit Erschütterung */
.bhd-stage { position: absolute; inset: 0; }
.bhd.s-shake .bhd-stage { animation: bhdShake .32s linear; }
@keyframes bhdShake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-5px, 2px); }
  30% { transform: translate(4px, -3px); }
  45% { transform: translate(-3px, -1px); }
  60% { transform: translate(3px, 2px); }
  80% { transform: translate(-1px, 1px); }
}

/* Türflügel */
.bhd-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  transition: transform 1.3s cubic-bezier(.68, -0.04, .24, 1);
  will-change: transform;
}
.bhd-l { left: 0; z-index: 2; }
.bhd-r { right: 0; z-index: 1; }
.bhd-clip { position: absolute; inset: 0; overflow: hidden; }
.bhd.s-open .bhd-l { transform: translateX(-101%); }
.bhd.s-open .bhd-r { transform: translateX(101%); }
.bhd-plate {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .05), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 119px, rgba(0, 0, 0, .55) 119px 121px, rgba(255, 255, 255, .04) 121px 122px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #232323, #1a1a1a 50%, #121212);
}
.bhd-l .bhd-plate { box-shadow: inset -14px 0 30px rgba(0, 0, 0, .6), inset 6px 0 0 #0d0d0d; }
.bhd-r .bhd-plate { box-shadow: inset 14px 0 30px rgba(0, 0, 0, .6), inset -6px 0 0 #0d0d0d; }
/* Nietenreihen außen */
.bhd-plate::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  width: 14px;
  background: radial-gradient(circle at 7px 7px, #5c5c5c 0 3px, #0f0f0f 3.5px 4.5px, transparent 5px) 0 0 / 14px 40px;
}
.bhd-l .bhd-plate::before { left: 26px; }
.bhd-r .bhd-plate::before { right: 26px; }
/* Warnschild */
.bhd-plate::after {
  position: absolute;
  bottom: 14%;
  padding: 6px 12px;
  border: 2px solid rgba(212, 62, 41, .7);
  border-radius: 4px;
  color: rgba(212, 62, 41, .85);
  font: 700 11px/1 ui-monospace, Consolas, monospace;
  letter-spacing: .25em;
}
.bhd-l .bhd-plate::after { content: "SICHERHEITSBEREICH"; left: 70px; }
.bhd-r .bhd-plate::after { content: "ZUTRITT NUR F\00DC R BEFUGTE"; right: 70px; top: 14%; bottom: auto; }
@media (max-width: 700px) { .bhd-plate::after { display: none; } }

/* Tresorrad – sitzt mittig auf der Fuge, jede Hälfte zeigt ihren Teil */
.bhd-vault-wrap {
  position: absolute;
  top: 50%;
  width: var(--bhd-vault);
  height: var(--bhd-vault);
  margin-top: calc(var(--bhd-vault) / -2);
}
.bhd-l .bhd-vault-wrap { right: calc(var(--bhd-vault) / -2); }
.bhd-r .bhd-vault-wrap { left: calc(var(--bhd-vault) / -2); }
.bhd-vault { width: 100%; height: 100%; display: block; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .7)); overflow: visible; }
.bhd-spin { transform-origin: 0 0; }
.bhd.s-unlock .bhd-spin { animation: bhdSpin 1.25s cubic-bezier(.55, 0, .25, 1) forwards; }
.bhd.s-open .bhd-spin { animation-duration: .01s; }
@keyframes bhdSpin {
  0% { transform: rotate(0); }
  12% { transform: rotate(-14deg); }
  100% { transform: rotate(450deg); }
}
.bhd-bolt { transition: transform .28s cubic-bezier(.5, 0, .2, 1.4); transition-delay: calc(var(--i) * 30ms); }
.bhd.s-bolts .bhd-bolt { transform: translateY(30px); }
.bhd-led { fill: #2a1410; transition: fill .15s; }
.bhd-led.rot { fill: var(--bhd-red); }
.bhd-led.gruen { fill: var(--bhd-green); }
.bhd-knob, .bhd-hub, .bhd-key { transition: fill .4s, stroke .4s; }
.bhd.s-green .bhd-knob { fill: #2f9e5e; stroke: #134428; }
.bhd.s-green .bhd-hub { stroke: var(--bhd-green); }
.bhd.s-green .bhd-key { fill: var(--bhd-green); }

/* Zahnräder */
.bhd-gear { position: absolute; width: 120px; height: 120px; opacity: .9; }
.bhd-l .g1 { left: 9%; top: 11%; }
.bhd-l .g2 { left: calc(9% + 92px); top: calc(11% + 70px); width: 80px; height: 80px; }
.bhd-r .g1 { right: 9%; bottom: 11%; }
.bhd-r .g2 { right: calc(9% + 92px); bottom: calc(11% + 70px); width: 80px; height: 80px; }
.bhd.s-unlock .bhd-gear.g1 { animation: bhdGear 1.25s cubic-bezier(.55, 0, .25, 1) forwards; }
.bhd.s-unlock .bhd-gear.g2 { animation: bhdGearR 1.25s cubic-bezier(.55, 0, .25, 1) forwards; }
@keyframes bhdGear { to { transform: rotate(360deg); } }
@keyframes bhdGearR { to { transform: rotate(-540deg); } }
@media (max-width: 700px) { .bhd-gear { display: none; } }

/* Fuge */
.bhd-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  z-index: 3;
  background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 0 14px 2px rgba(212, 62, 41, .55);
  transition: box-shadow .5s, opacity .2s;
}
.bhd.s-green .bhd-seam { box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 0 18px 3px rgba(62, 207, 122, .65); }
.bhd.s-open .bhd-seam { opacity: 0; }

/* Warnstreifen oben/unten */
.bhd-hazard {
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 4;
  background: repeating-linear-gradient(-45deg, #d43e29 0 16px, #121212 16px 32px);
  box-shadow: 0 0 0 2px #0a0a0a, 0 6px 18px rgba(0, 0, 0, .6);
  transition: transform .6s cubic-bezier(.6, 0, .3, 1);
}
.bhd-hazard.top { top: 0; }
.bhd-hazard.bottom { bottom: 0; }
.bhd.s-unlock .bhd-hazard { animation: bhdHazard 1s linear infinite; }
@keyframes bhdHazard { to { background-position: 45px 0; } }
.bhd.s-open .bhd-hazard.top { transform: translateY(-110%); }
.bhd.s-open .bhd-hazard.bottom { transform: translateY(110%); }

/* Rundumleuchte */
.bhd-beacon {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 5;
  width: 46px;
  height: 22px;
  margin-left: -23px;
  border-radius: 0 0 24px 24px;
  background: radial-gradient(circle at 50% 0, #ff6a52, #9c2312 70%);
  box-shadow: 0 0 22px 6px rgba(212, 62, 41, .6);
  transition: background .4s, box-shadow .4s, opacity .3s;
}
.bhd-beacon i {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 260px;
  height: 260px;
  margin-left: -130px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(212, 62, 41, .32), transparent 14%, transparent 50%, rgba(212, 62, 41, .32) 50%, transparent 64%);
  -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 70%);
  mask: radial-gradient(circle, #000 0 30%, transparent 70%);
  animation: bhdBeacon 1.1s linear infinite;
  pointer-events: none;
}
@keyframes bhdBeacon { to { transform: rotate(360deg); } }
.bhd.s-green .bhd-beacon { background: radial-gradient(circle at 50% 0, #7dffb0, #1d7a45 70%); box-shadow: 0 0 22px 6px rgba(62, 207, 122, .6); }
.bhd.s-green .bhd-beacon i { background: conic-gradient(from 0deg, rgba(62, 207, 122, .3), transparent 14%, transparent 50%, rgba(62, 207, 122, .3) 50%, transparent 64%); }
.bhd.s-open .bhd-beacon { opacity: 0; }

/* Scan-Linie */
.bhd-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  height: 120px;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(212, 62, 41, .14) 70%, rgba(255, 120, 95, .9) 98%, transparent);
  mix-blend-mode: screen;
}
.bhd.s-scan .bhd-scan { animation: bhdScan 1.1s cubic-bezier(.45, 0, .55, 1) forwards; }
@keyframes bhdScan {
  0% { opacity: 0; transform: translateY(0); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(105vh); }
}

/* Dampf / Druckausgleich */
.bhd-steam { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.bhd-steam i {
  position: absolute;
  left: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 235, 235, .55), rgba(235, 235, 235, 0) 65%);
  filter: blur(6px);
  opacity: 0;
}
.bhd-steam i:nth-child(1) { top: 9%; --dx: -90px; }
.bhd-steam i:nth-child(2) { top: 9%; --dx: 90px; animation-delay: .06s !important; }
.bhd-steam i:nth-child(3) { top: 30%; --dx: -110px; animation-delay: .12s !important; }
.bhd-steam i:nth-child(4) { top: 30%; --dx: 110px; animation-delay: .04s !important; }
.bhd-steam i:nth-child(5) { top: 70%; --dx: -110px; animation-delay: .1s !important; }
.bhd-steam i:nth-child(6) { top: 70%; --dx: 110px; animation-delay: .02s !important; }
.bhd-steam i:nth-child(7) { top: 91%; --dx: -90px; animation-delay: .08s !important; }
.bhd-steam i:nth-child(8) { top: 91%; --dx: 90px; animation-delay: .14s !important; }
.bhd.s-steam .bhd-steam i { animation: bhdSteam 1.3s ease-out forwards; }
@keyframes bhdSteam {
  0% { opacity: 0; transform: translateX(0) scale(.2); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(var(--dx)) translateY(-40px) scale(2.2); }
}

/* Anzeige */
.bhd-hud {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  z-index: 5;
  width: min(460px, calc(100% - 40px));
  transform: translateX(-50%);
  padding: 14px 16px 16px;
  border: 1px solid rgba(212, 62, 41, .45);
  border-radius: 10px;
  background: rgba(8, 8, 8, .82);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 14px 40px rgba(0, 0, 0, .7), inset 0 0 30px rgba(212, 62, 41, .08);
  color: #e6e6e6;
  font: 600 13px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace;
  transition: opacity .35s, transform .35s, border-color .4s;
}
.bhd.s-green .bhd-hud { border-color: rgba(62, 207, 122, .55); }
.bhd.s-open .bhd-hud { opacity: 0; transform: translateX(-50%) translateY(14px); }
.bhd-hud-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #777; font-size: 10.5px; letter-spacing: .14em; }
.bhd-status { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; }
.bhd-txt { flex: 1; }
.bhd-txt::after { content: "_"; margin-left: 2px; animation: bhdBlink .8s steps(1) infinite; }
@keyframes bhdBlink { 50% { opacity: 0; } }
.bhd-pct { color: var(--bhd-red); font-variant-numeric: tabular-nums; transition: color .4s; }
.bhd.s-green .bhd-pct { color: var(--bhd-green); }
.bhd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bhd-red); box-shadow: 0 0 10px var(--bhd-red); animation: bhdBlink 1s steps(1) infinite; }
.bhd.s-green .bhd-dot { background: var(--bhd-green); box-shadow: 0 0 10px var(--bhd-green); animation: none; }
.bhd-bar { height: 6px; overflow: hidden; border-radius: 3px; background: #1d1d1d; }
.bhd-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #8f2414, var(--bhd-red)); box-shadow: 0 0 10px rgba(212, 62, 41, .7); }
.bhd.s-green .bhd-bar i { background: linear-gradient(90deg, #1d7a45, var(--bhd-green)); box-shadow: 0 0 10px rgba(62, 207, 122, .7); }

.bhd-skip {
  position: absolute;
  right: 18px;
  bottom: 34px;
  z-index: 6;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  color: #bbb;
  font: 600 12px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: opacity .3s, color .2s, border-color .2s;
}
.bhd-skip:hover { color: #fff; border-color: var(--bhd-red); }
.bhd.s-open .bhd-skip { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .bhd-skip { bottom: auto; top: 34px; } .bhd-hud { bottom: 5vh; } }

@media (prefers-reduced-motion: reduce) {
  html.bh-intro::before, .bhd { display: none !important; }
}

/* =====================================================================
   5) SERVER-RACK-ANIMATION im Startseiten-Kopfbereich
   ===================================================================== */
.bhf-rack-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  opacity: .9;
}

/* =====================================================================
   6) LIVE-STATUS-PLAKETTE im Header
   ===================================================================== */
.bhf-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  margin: 0 10px 0 0;
  border: 1px solid var(--bhf-line2);
  border-radius: 999px;
  color: var(--bhf-text) !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  background: rgba(255, 255, 255, .03);
  transition: border-color .2s, background-color .2s;
  vertical-align: middle;
}
.bhf-status:hover { border-color: currentColor; background: rgba(255, 255, 255, .06); }
.bhf-status i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bhf-ok);
  flex: 0 0 8px;
}
.bhf-status i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  color: var(--bhf-ok);
  opacity: 0;
  animation: bhfPing 2.4s ease-out infinite;
}
.bhf-status.wartung i, .bhf-status.wartung i::after { background-color: var(--bhf-warn); color: var(--bhf-warn); }
.bhf-status.stoerung i, .bhf-status.stoerung i::after { background-color: var(--bhf-red); color: var(--bhf-red); }
.bhf-status.wartung i::after, .bhf-status.stoerung i::after { background: transparent; }
@keyframes bhfPing {
  0% { transform: scale(.6); opacity: .8; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}
body:not(.dark-mode) .bhf-status { color: #2b2b2b !important; border-color: rgba(0, 0, 0, .15); background: #fff; }
@media (max-width: 1199.98px) { .bhf-status { display: none !important; } }

/* =====================================================================
   9) WINTER-MODUS (Schnee)
   ===================================================================== */
.bhf-snow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1020;
}
.bhf-snow-toggle {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 1021;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--bhf-line2);
  background: rgba(22, 22, 22, .85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .75;
  transition: opacity .2s, transform .2s;
}
.bhf-snow-toggle:hover { opacity: 1; transform: scale(1.06); }
.bhf-snow-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.bhf-snow-toggle.is-off { color: var(--bhf-mut); }
.bhf-snow-toggle.is-off svg { opacity: .5; }

/* =====================================================================
   8) ADVENTSKALENDER
   ===================================================================== */
.bhf-advent-btn {
  position: fixed;
  left: 14px;
  bottom: 62px;
  z-index: 1021;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--bhf-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(212, 62, 41, .4);
  animation: bhfWiggle 6s ease-in-out infinite;
}
.bhf-advent-btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bhf-advent-btn b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #fff;
  color: var(--bhf-red);
  font-size: 12px;
}
@keyframes bhfWiggle {
  0%, 92%, 100% { transform: rotate(0); }
  94% { transform: rotate(-4deg); }
  96% { transform: rotate(4deg); }
  98% { transform: rotate(-2deg); }
}
@media (max-width: 575.98px) {
  .bhf-advent-btn span { display: none; }
  .bhf-advent-btn { padding: 10px 12px; }
}

.bhf-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .72);
  animation: bhfFade .2s ease;
}
@keyframes bhfFade { from { opacity: 0; } to { opacity: 1; } }
.bhf-modal-box {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--bhf-line);
  border-radius: 16px;
  background: radial-gradient(500px 200px at 100% 0, rgba(212, 62, 41, .18), transparent 70%), var(--bhf-card);
  color: var(--bhf-text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.bhf-modal-box h2 { margin: 0 40px 4px 0; font-size: 22px; font-weight: 800; color: #fff; }
.bhf-modal-box > p { margin: 0 0 18px; color: var(--bhf-mut); font-size: 14px; }
.bhf-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--bhf-line2);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.bhf-close:hover { border-color: var(--bhf-red); }

.bhf-doors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 575.98px) { .bhf-doors { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bhf-door {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--bhf-line2);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 18px, rgba(255, 255, 255, .04) 19px 20px, transparent 21px),
    linear-gradient(160deg, #2e2e2e, #1e1e1e);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.bhf-door:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--bhf-red); box-shadow: 0 8px 20px rgba(212, 62, 41, .25); }
.bhf-door[disabled] { cursor: not-allowed; opacity: .38; }
.bhf-door.is-today { border-color: var(--bhf-red); box-shadow: 0 0 0 2px rgba(212, 62, 41, .35); }
.bhf-door.is-open { background: linear-gradient(160deg, #3a1d18, #2a1612); border-color: rgba(212, 62, 41, .5); }
.bhf-door.is-open::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bhf-red);
}
.bhf-door-view { margin-top: 18px; animation: bhfFade .25s ease; }
.bhf-door-card {
  padding: 18px;
  border: 1px solid rgba(212, 62, 41, .4);
  border-radius: 12px;
  background: rgba(212, 62, 41, .07);
}
.bhf-door-card small { display: block; color: var(--bhf-red); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; margin-bottom: 4px; }
.bhf-door-card h3 { margin: 0 0 8px; font-size: 18px; color: #fff; }
.bhf-door-card p { margin: 0 0 10px; color: #cfcfcf; font-size: 14.5px; line-height: 1.55; }
.bhf-door-card p:last-child { margin-bottom: 0; }
.bhf-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 8px 8px 8px 14px;
  border: 1px dashed var(--bhf-red);
  border-radius: 10px;
  background: #151515;
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
}
.bhf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--bhf-red);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color .2s, box-shadow .2s;
}
.bhf-btn:hover { background: var(--bhf-red-d); box-shadow: 0 6px 18px rgba(212, 62, 41, .35); }
.bhf-btn.ghost { background: transparent; border: 1px solid var(--bhf-line2); color: var(--bhf-text) !important; }
.bhf-btn.ghost:hover { border-color: var(--bhf-red); box-shadow: none; }
.bhf-btn.sm { padding: 6px 10px; font-size: 13px; }
.bhf-quiz { display: grid; gap: 8px; margin-top: 6px; }
.bhf-quiz button {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--bhf-line2);
  border-radius: 9px;
  background: #1b1b1b;
  color: var(--bhf-text);
  cursor: pointer;
}
.bhf-quiz button:hover { border-color: var(--bhf-red); }
.bhf-quiz button.ok { border-color: var(--bhf-ok); background: rgba(62, 167, 106, .12); }
.bhf-quiz button.no { border-color: var(--bhf-red); background: var(--bhf-red-soft); }

/* =====================================================================
   10) BUNKER-ALARM (Konami-Code / 7x aufs Logo tippen)
   ===================================================================== */
.bhf-alarm-light {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  background: conic-gradient(from 0deg at 50% -10%, transparent 0 40deg, rgba(212, 62, 41, .35) 50deg 70deg, transparent 80deg 280deg, rgba(212, 62, 41, .35) 290deg 310deg, transparent 320deg);
  mix-blend-mode: screen;
  animation: bhfSpin 1.1s linear infinite, bhfFade .2s ease;
}
.bhf-alarm-vignette {
  position: fixed;
  inset: 0;
  z-index: 99989;
  pointer-events: none;
  box-shadow: inset 0 0 160px 40px rgba(212, 62, 41, .55);
  animation: bhfBlink .55s steps(2, end) infinite;
}
@keyframes bhfSpin { to { transform: rotate(360deg); } }
@keyframes bhfBlink { 50% { box-shadow: inset 0 0 120px 20px rgba(212, 62, 41, .2); } }
html.bh-alarm body { animation: bhfShake .35s linear 3; }
@keyframes bhfShake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -1px); }
}
.bhf-alarm-box {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 99995;
  width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  padding: 26px 24px 22px;
  border: 2px solid var(--bhf-red);
  border-radius: 16px;
  background: #141414;
  color: var(--bhf-text);
  text-align: center;
  box-shadow: 0 0 0 6px rgba(212, 62, 41, .18), 0 30px 80px rgba(0, 0, 0, .7);
  animation: bhfPop .35s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes bhfPop { from { transform: translate(-50%, -50%) scale(.7); opacity: 0; } }
.bhf-alarm-box .bhf-siren {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 28px 28px 8px 8px;
  background: radial-gradient(circle at 50% 70%, #ff8a7a, var(--bhf-red) 60%);
  box-shadow: 0 0 30px 8px rgba(212, 62, 41, .7);
  animation: bhfBlink2 .5s steps(2, end) infinite;
}
@keyframes bhfBlink2 { 50% { box-shadow: 0 0 10px 2px rgba(212, 62, 41, .3); filter: brightness(.7); } }
.bhf-alarm-box h2 { margin: 0 0 6px; font-size: 22px; font-weight: 900; letter-spacing: .06em; color: #fff; }
.bhf-alarm-box p { margin: 0 0 14px; color: #cfcfcf; font-size: 14.5px; }

@media (prefers-reduced-motion: reduce) {
  .bhf-alarm-light, html.bh-alarm body, .bhf-alarm-vignette, .bhf-alarm-box .bhf-siren,
  .bhf-advent-btn, .bhf-status i::after { animation: none !important; }
}

/* =====================================================================
   GENERATOREN-SEITE (/generatoren.php)
   ===================================================================== */
.bht {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 0 56px;
  color: var(--bhf-text);
}
.bht * { box-sizing: border-box; }
.bht [hidden] { display: none !important; }
.bht-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 30px 28px;
  border: 1px solid var(--bhf-line);
  border-radius: 18px;
  background: radial-gradient(600px 240px at 100% 0, rgba(212, 62, 41, .16), transparent 70%), linear-gradient(160deg, #2a2a2a, #1f1f1f);
}
.bht-hero h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 900; color: #fff; }
.bht-hero p { margin: 0; max-width: 680px; color: var(--bhf-mut); }
.bht-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border: 1px solid rgba(212, 62, 41, .45);
  border-radius: 999px;
  color: var(--bhf-red);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bht-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.bht-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--bhf-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--bhf-text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.bht-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bht-tab:hover { border-color: var(--bhf-red); }
.bht-tab[aria-selected="true"] { background: var(--bhf-red); border-color: var(--bhf-red); color: #fff; }
.bht-tabs-grp {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--bhf-line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bhf-card2), var(--bhf-card));
}
.bht-grp + .bht-grp { padding-top: 16px; border-top: 1px solid var(--bhf-line); }
.bht-grp-name { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 2px; color: var(--bhf-mut); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.bht-grp-name::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--bhf-red); }
.bht-grp-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.bht-tabs-grp .bht-tab {
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-height: 78px;
  padding: 12px 6px;
  border-radius: 12px;
  border-color: var(--bhf-line);
  background: rgba(255, 255, 255, .025);
  font-size: 13.5px;
  line-height: 1.2;
  text-align: center;
}
.bht-tabs-grp .bht-tab svg { width: 22px; height: 22px; color: var(--bhf-red); transition: color .2s; }
.bht-tabs-grp .bht-tab:hover { border-color: var(--bhf-red); background: var(--bhf-red-soft); transform: translateY(-1px); }
.bht-tabs-grp .bht-tab[aria-selected="true"] { background: var(--bhf-red); border-color: var(--bhf-red); color: #fff; box-shadow: 0 6px 18px rgba(212, 62, 41, .3); }
.bht-tabs-grp .bht-tab[aria-selected="true"] svg { color: #fff; }
@media (max-width: 991.98px) { .bht-grp-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  .bht-tabs-grp { padding: 14px; }
  .bht-grp-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .bht-tabs-grp .bht-tab { min-height: 70px; padding: 10px 4px; font-size: 12px; hyphens: auto; }
  .bht-tabs-grp .bht-tab svg { width: 20px; height: 20px; }
}
body:not(.dark-mode) .bht-tabs-grp .bht-tab { background: #fff; }
/* eingebettete Prüf-Tools aus bh-extras.js: eigene Tab-Leiste ausblenden */
.bht-bhx > .bhx-tabs { display: none !important; }
.bht-panel { display: none; }
.bht-panel.is-on { display: block; animation: bhfFade .25s ease; }
.bht-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .bht-grid { grid-template-columns: 1fr; } }
.bht-card {
  padding: 22px;
  border: 1px solid var(--bhf-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bhf-card2), var(--bhf-card));
}
.bht-card h2 { margin: 0 0 4px; font-size: 19px; font-weight: 800; color: #fff; }
.bht-card h3 { margin: 18px 0 10px; font-size: 14px; font-weight: 700; color: var(--bhf-mut); text-transform: uppercase; letter-spacing: .08em; }
.bht-card > p.bht-sub { margin: 0 0 16px; color: var(--bhf-mut); font-size: 14px; }
.bht-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bht-fields .full { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .bht-fields { grid-template-columns: 1fr; } }
.bht label { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 600; color: var(--bhf-mut); }
.bht input[type=text], .bht input[type=email], .bht input[type=url], .bht input[type=tel], .bht input[type=password], .bht select, .bht textarea {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--bhf-line2);
  border-radius: 9px;
  background: #161616;
  color: #fff;
  font: inherit;
  font-size: 15px;
}
.bht textarea { height: auto; min-height: 90px; resize: vertical; }
.bht input:focus, .bht select:focus, .bht textarea:focus { outline: none; border-color: var(--bhf-red); box-shadow: 0 0 0 3px var(--bhf-red-soft); }
.bht input[type=color] {
  width: 100%;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--bhf-line2);
  border-radius: 9px;
  background: #161616;
  cursor: pointer;
}
.bht input[type=range] { width: 100%; accent-color: var(--bhf-red); }
.bht .bht-check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--bhf-text); cursor: pointer; }
.bht .bht-check input { accent-color: var(--bhf-red); width: 17px; height: 17px; }
.bht-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.bht-seg button {
  padding: 8px 12px;
  border: 1px solid var(--bhf-line2);
  border-radius: 8px;
  background: transparent;
  color: var(--bhf-text);
  font-size: 14px;
  cursor: pointer;
}
.bht-seg button[aria-pressed="true"] { border-color: var(--bhf-red); background: var(--bhf-red-soft); color: #fff; }
.bht-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bht-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--bhf-red);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, .03);
  color: var(--bhf-mut);
  font-size: 13.5px;
  line-height: 1.55;
}
.bht-note a { color: var(--bhf-red); }
.bht-note b { color: var(--bhf-text); }
.bht-preview-light {
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  color: #222;
  overflow-x: auto;
}
.bht-qr-wrap { display: flex; justify-content: center; padding: 18px; border-radius: 12px; background: repeating-conic-gradient(#202020 0 25%, #1a1a1a 0 50%) 0 0 / 20px 20px; }
.bht-qr-wrap canvas { max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 6px; }
.bht-fav-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 18px; border-radius: 12px; background: repeating-conic-gradient(#202020 0 25%, #1a1a1a 0 50%) 0 0 / 20px 20px; }
.bht-fav-row figure { margin: 0; text-align: center; }
.bht-fav-row figcaption { margin-top: 6px; font-size: 12px; color: var(--bhf-mut); }
.bht-fav-row canvas { display: block; margin: 0 auto; }
.bht-tabmock {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 10px 10px 0 0;
  background: #e8e8e8;
  color: #222;
  font-size: 13px;
}
.bht-tabmock canvas { width: 16px; height: 16px; }
.bht pre.bht-code {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--bhf-line);
  border-radius: 9px;
  background: #121212;
  color: #d6d6d6;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-all;
}
.bht-warn { color: var(--bhf-warn); font-size: 13px; margin-top: 8px; }

/* Speed-Test */
.bht-speed-form { display: flex; gap: 10px; }
.bht-speed-form input { flex: 1 1 auto; }
.bht-speed-form .bhf-btn { white-space: nowrap; }
@media (max-width: 575.98px) { .bht-speed-form { flex-direction: column; } }
.bht-speed-res { margin-top: 20px; }
.bht-score {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.bht-grade {
  flex: 0 0 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  background: conic-gradient(var(--g-col) calc(var(--g-val) * 1%), rgba(255, 255, 255, .08) 0);
  position: relative;
}
.bht-grade::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bhf-card); }
.bht-grade span { position: relative; }
.bht-metrics { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bht-metrics th, .bht-metrics td { padding: 9px 6px; border-top: 1px solid var(--bhf-line); text-align: left; vertical-align: top; }
.bht-metrics th { color: var(--bhf-mut); font-weight: 500; width: 46%; }
.bht-metrics td b { color: #fff; }
.bht-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.bht-pill.gut { color: var(--bhf-ok); background: rgba(62, 167, 106, .14); }
.bht-pill.mittel { color: var(--bhf-warn); background: rgba(224, 160, 48, .14); }
.bht-pill.schlecht { color: #ff8a7a; background: var(--bhf-red-soft); }
.bht-tips { margin: 6px 0 0; padding-left: 20px; color: #cfcfcf; font-size: 14.5px; line-height: 1.6; }
.bht-tips li { margin-bottom: 6px; }
.bht-spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bhfSpin .8s linear infinite;
}
.bht-err { margin-top: 14px; padding: 12px 14px; border-radius: 9px; background: var(--bhf-red-soft); color: #ffb3a8; font-size: 14px; }

/* Helles Design */
body:not(.dark-mode) .bht, body:not(.dark-mode) .bhf-modal-box { --bhf-text: #222; --bhf-mut: #5e5e5e; --bhf-card: #fff; --bhf-card2: #fafafa; --bhf-line: rgba(0, 0, 0, .08); --bhf-line2: rgba(0, 0, 0, .16); }
body:not(.dark-mode) .bht-hero { background: radial-gradient(600px 240px at 100% 0, rgba(212, 62, 41, .1), transparent 70%), #fff; }
body:not(.dark-mode) .bht-hero h1, body:not(.dark-mode) .bht-card h2, body:not(.dark-mode) .bhf-modal-box h2, body:not(.dark-mode) .bhf-door-card h3 { color: #161616; }
body:not(.dark-mode) .bht input[type=text], body:not(.dark-mode) .bht input[type=email], body:not(.dark-mode) .bht input[type=url], body:not(.dark-mode) .bht input[type=tel], body:not(.dark-mode) .bht input[type=password], body:not(.dark-mode) .bht select, body:not(.dark-mode) .bht textarea, body:not(.dark-mode) .bht input[type=color] { background: #fff; color: #161616; }
body:not(.dark-mode) .bht-grade::before { background: #fff; }
body:not(.dark-mode) .bht-grade { color: #161616; }
body:not(.dark-mode) .bht-metrics td b { color: #161616; }

@media (prefers-reduced-motion: reduce) {
  .bht-panel.is-on, .bhf-modal, .bhf-door-view { animation: none !important; }
}
