@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 500 900;
  font-display: block;
  src: url('../fonts/orbitron.woff2') format('woff2');
}

@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/share-tech-mono.woff2') format('woff2');
}

:root {
  --bg: #05070a;
  --bg-panel: #0b0f16;
  --bg-panel-alt: #0e141d;
  --line: #1c2733;
  --line-bright: #2a3d4f;
  --cyan: #35f2e0;
  --cyan-dim: #1b8f88;
  --green: #6bff8c;
  --amber: #ffb347;
  --red: #ff5c5c;
  --text: #cfe7e9;
  --text-dim: #7f97a0;
  --font-display: 'Orbitron', 'Segoe UI', sans-serif;
  --font-mono: 'Share Tech Mono', 'Consolas', monospace;
  --glow: 0 0 8px rgba(53, 242, 224, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
}

/*
 * Hintergrundfarbe nur auf html, nicht auf body: body ist ein normales
 * In-Flow-Element und würde seinen eigenen Hintergrund über fixen
 * Elementen mit negativem z-index (.cyberpunk-bg, .bg-grid) malen und
 * sie damit komplett verdecken.
 */
html {
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) var(--bg);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan-dim), var(--cyan));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(53, 242, 224, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(53, 242, 224, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 242, 224, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* Cyberpunk-Hintergrundbild */
.cyberpunk-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5,7,10,0.40) 0%, rgba(5,7,10,0.60) 55%, rgba(5,7,10,0.85) 100%),
    url('../img/cyberpunk-bg.png') center center / cover no-repeat;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-shadow: var(--glow); }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: #eafcfb;
  margin: 0 0 0.6em;
}

h1 { font-size: 2rem; text-transform: uppercase; }
h2 { font-size: 1.35rem; text-transform: uppercase; color: var(--cyan); }
h3 { font-size: 1.05rem; color: var(--text); }

p { color: var(--text-dim); }

code, .mono { font-family: var(--font-mono); }

/* Header */
.site-header {
  position: relative;
  border-bottom: 1px solid var(--line-bright);
  background: linear-gradient(180deg, var(--bg-panel), var(--bg));
  overflow: hidden;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-call {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--cyan);
  text-shadow: var(--glow);
  letter-spacing: 0.08em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.main-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.main-nav a:hover {
  color: var(--cyan);
  border-color: var(--line-bright);
  background: rgba(53, 242, 224, 0.06);
}

.main-nav a.active {
  color: #05070a;
  background: var(--cyan);
  text-shadow: none;
  box-shadow: var(--glow);
}

.scanline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
  animation: scan 6s linear infinite;
}

@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Main */
.main-content { padding: 40px 20px 60px; min-height: 60vh; }

/* Panels / cards */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.panel::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 18px; height: 18px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}

.panel::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 18px; height: 18px;
  border-bottom: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
}

.hero {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: var(--glow);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-panel-alt);
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  border: 1px solid var(--cyan-dim);
  padding: 3px 10px;
  border-radius: 2px;
  margin: 2px 6px 2px 0;
}

.status-online {
  color: var(--green);
}
.status-online::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  margin-right: 6px;
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-offline {
  color: var(--red);
}
.status-offline::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 6px;
}

/* Grid layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--cyan-dim);
  transform: translateY(-2px);
}

.card h3 { margin-bottom: 8px; }
.card .meta { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.card img { width: 100%; border-radius: 3px; margin-bottom: 12px; border: 1px solid var(--line); }

/* Tables */
.table-wrap { overflow-x: auto; }

.log-scroll {
  max-height: 65vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.log-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  z-index: 1;
  box-shadow: 0 1px 0 var(--line-bright);
}

/* Neon-Scrollbars (Cyberpunk-Look) */
.log-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) var(--bg-panel-alt);
}

.log-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.log-scroll::-webkit-scrollbar-track {
  background: var(--bg-panel-alt);
  border-left: 1px solid var(--line);
}

.log-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan-dim), var(--cyan));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(53, 242, 224, 0.5);
}

.log-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line-bright);
}

tbody tr:hover { background: rgba(53, 242, 224, 0.04); }

/* Forms */
label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-panel-alt);
  border: 1px solid var(--line-bright);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 16px;
}

button, .btn {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  padding: 11px 20px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-block;
}

button:hover, .btn:hover {
  background: var(--cyan);
  color: #05070a;
  box-shadow: var(--glow);
}

.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #05070a; box-shadow: 0 0 8px rgba(255,92,92,0.55); }

.btn-ghost { color: var(--text-dim); border-color: var(--line-bright); }
.btn-ghost:hover { background: var(--line-bright); color: var(--text); box-shadow: none; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 3px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  border: 1px solid;
}
.alert-ok { color: var(--green); border-color: var(--green); background: rgba(107,255,140,0.06); }
.alert-err { color: var(--red); border-color: var(--red); background: rgba(255,92,92,0.06); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-dim { color: var(--line-bright); }
.footer-link { color: var(--text-dim); text-decoration: none; }
.footer-link:hover { color: var(--cyan); }

/* Admin */
.admin-shell .main-nav { }
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

/* WYSIWYG (Quill) im Dark-Theme */
.wysiwyg-editor { margin-bottom: 16px; }

.ql-toolbar.ql-snow {
  background: var(--bg-panel-alt);
  border: 1px solid var(--line-bright);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.ql-container.ql-snow {
  background: var(--bg-panel-alt);
  border: 1px solid var(--line-bright);
  border-radius: 0 0 3px 3px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  min-height: 160px;
  color: var(--text);
}

.ql-snow .ql-stroke { stroke: var(--text-dim); }
.ql-snow .ql-fill { fill: var(--text-dim); }
.ql-snow .ql-picker { color: var(--text-dim); }
.ql-toolbar.ql-snow .ql-formats { margin-right: 10px; }

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--cyan);
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill {
  fill: var(--cyan);
}
.ql-snow.ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active {
  color: var(--cyan);
}

.ql-editor.ql-blank::before { color: var(--text-dim); font-style: normal; }

/* Rich-Text-Inhalte auf öffentlichen Seiten */
.richtext :where(h1, h2, h3, h4) { margin-top: 1em; }
.richtext p { color: var(--text); }
.richtext a { text-decoration: underline; }
.richtext blockquote {
  border-left: 2px solid var(--cyan-dim);
  margin: 1em 0;
  padding-left: 1em;
  color: var(--text-dim);
}
.richtext code {
  background: var(--bg-panel-alt);
  padding: 2px 6px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.5rem; }
  th, td { white-space: normal; }
}
