/* --- seitengeruest --- */

body {
  margin: 0;
  background-color: #333;
  font-family: 'Space Mono', monospace;
}

body.dark-mode {
  background-color: #0e0e0e;
}

body.dark-mode img.dark-img {
    filter: brightness(0.72) contrast(0.88) saturate(0.9);
}

body.dark-mode mark {
  background-color: #333;
  color: #fff;
  padding: 0 0.25em;
  border-radius: 3px;
}

.wrapper {
  width: 100%;
}

.site-header {
    background: #000;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #222;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.site-logo {
    max-width: 420px;
    width: 100%;
    height: auto;
}

.links {
  display: flex;
  gap: 20px;
}

.rechts {
  flex: 1;
}

.center {
  background: #000000;
  color: #fff;
  text-align: center;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  padding: 0 16px;
}

.content img.dark-img {
  margin: 12px 0;
  border-radius: 6px;
}

.content img {
  max-width: 100%;
  height: auto;
  display: block;
}

body.dark-mode .content {
  flex: 1;
  color: #e0e0e0;
}

body.dark-mode .content a {
  color: #ff6b6b;
}

.bilder {
  border-radius: 25px;
}

li code {
  display: block;
  margin-bottom: 6px;
}

hr {
  margin: 3.5rem 0 1.5rem;
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #222,
    transparent
  );
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* --- schriftarten --- */

h1 {
  color: #FFFFFF;
  font-family: 'Space Mono', monospace;
  font-size: 2em;
}

h2 {
  color: #FFFFFF;
  font-family: 'Space Mono', monospace;
  font-size: 1.5em;
}

p, a, strong, i, small, mark {
  color: inherit;
}

/* --- navigationsleiste --- */

.topnav .spacer {
  margin-left: auto;
}

body.dark-mode .topnav {
  display: flex;
  align-items: center;
  gap: 4px;

  position: sticky;
  top: 0;
  z-index: 1000;

  background-color: #0b0b0b;
  border-bottom: 1px solid #1f1f1f;
}

body.dark-mode .topnav a,
body.dark-mode .dropdown .dropbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  color: #cfcfcf;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.topnav .icon {
  display: none;
}

body.dark-mode .topnav a:hover,
body.dark-mode .dropdown:hover .dropbtn {
  background-color: #1a1a1a;
  color: #ffffff;
}

body.dark-mode .topnav a.active {
  background-color: #b81414;
  color: #ffffff;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;

  display: none;
  min-width: 160px;
  background-color: #f9f9f9;
  z-index: 2000;
}

.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: #ddd;
  color: black;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:focus-within .dropdown-content {
  display: block;
}

/* --- sidebar --- */

body.dark-mode .sidebar {
  background-color: #0b0b0b;
  flex-shrink: 0;
  width: 260px;
  padding: 16px 12px;
  padding-top: 20px;
  border-right: 1px solid #1f1f1f;
  color: #ccc;
}

body.dark-mode .sidebar h2 {
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9e9e9e;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 4px;
}

body.dark-mode .sidebar a {
  display: block;
  padding: 6px 8px;
  color: #b5b5b5;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.3;
}

body.dark-mode .sidebar a:hover {
  background-color: #1a1a1a;
  color: #ffffff;
}

body.dark-mode .sidebar a.active {
  background-color: #262626;
  color: #ffffff;
  font-weight: 500;
}

/* --- button copy --- */

button.copy {
  background: #b81414;
  color: #fff;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
}

button.copy:hover {
  background: #e01b1b;
}

body.dark-mode pre {
  background: #0b0b0b;
  padding: 12px 14px;
  border-left: 4px solid #b81414;
  overflow-x: auto;
  margin: 10px 0 4px 0;
  cursor: pointer;
  position: relative;
  white-space: pre-wrap;      /* erlaubt Umbruch */
  word-break: break-word;    /* bricht lange Tokens */
  overflow-x: auto;
  max-width: 100%;
}

pre::after {
  content: "klick zum kopieren";
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 0.75em;
  color: #888;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

pre.copied::after {
  content: "copied ✓";
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 0.75em;
  color: #2ecc71;
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

pre:hover::after {
  opacity: 1;
}

pre.copied {
  border-left-color: #2ecc71;
  background-color: #0f1f16;
}

pre.copy-error {
  border-left-color: #e74c3c;
  background-color: #2a1212;
}

code {
  font-family: 'Space Mono', monospace;
  color: #e5e5e5;
  font-size: 0.95em;
}

/* --- auflösung bildschirm verhalten --- */

/* Mobile: Sidebar aus */

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  .layout {
    max-width: 100%;
    margin: 0;
    padding: 0.75rem;
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 900px) {
  .header-inner {
    justify-content: center;
  }
}

@media (max-width: 900px) {
    .site-logo {
        max-width: 240px;
    }
}

@media (max-width: 900px) {
    .site-header {
        padding: 0.75rem 0.75rem;
    }
}

@media (min-width: 901px) {
  .sidebar {
    position: sticky;
    top: 72px;              /* Header + Nav Höhe */
    align-self: flex-start;
    height: fit-content;
  }
}

/* =========================
   INDEX – CARDS (ADD-ON)
   kompatibel mit dark-mode
========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 2rem;
  margin-bottom: 3.5rem;
}

.card-grid::after {
  content: "";
  display: block;
  margin-top: 2.5rem;
}

/* Card Grundstil */
.card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 12px;

  background-color: #0b0b0b;
  border: 1px solid #1f1f1f;

  color: inherit;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

/* Titel */
.card h2 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  margin-bottom: 0.25rem;
}

/* Beschreibung */
.card p {
  font-size: 0.85rem;
  line-height: 1.35;
  color: #b0b0b0;
}

/* Hover-Effekt */
.card:hover {
  border-color: #b81414;
  box-shadow:
    0 0 0 1px rgba(184, 20, 20, 0.35),
    0 10px 25px rgba(0, 0, 0, 0.6);
}

/* Fokus (Tastatur!) */
.card:focus-visible {
  outline: none;
  border-color: #b81414;
}

/* --- Card SVG Icons --- */

.card-icon {
  width: 22px;
  height: 22px;
  margin-top: -0.35rem;
  margin-bottom: 0.15rem;
  color: #b81414;
  opacity: 0.75;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* =========================
   INDEX – OHNE SIDEBAR
========================= */

body.no-sidebar .sidebar {
  display: none;
}

body.no-sidebar .layout {
  justify-content: center;
}

body.no-sidebar .content {
  max-width: 900px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  margin-top: 2.5rem;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid #1f1f1f;
  color: #777;
  font-size: 0.85rem;
}

.site-footer span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  opacity: 0.7;
}

.site-footer p {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
/* =========================
   SERVER STATUS BOX
========================= */

.server-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  gap: 14px;

  padding: 16px 18px;
  background-color: #0b0b0b;
  border: 1px solid #1f1f1f;
  border-radius: 12px;

  color: #e0e0e0;
  font-size: 0.95rem;
}

/* =========================
   STATUS HEAD (Punkt + Text)
========================= */

.status-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Der eigentliche Punkt */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;

  background-color: #999; /* Default */
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
}

/* =========================
   STATUS TEXT
========================= */

.status-text {
  line-height: 1.35;
}

.status-text strong {
  font-weight: 600;
}

/* =========================
   STATUS FARBEN
========================= */

.server-status.online {
  border-color: rgba(46, 204, 113, 0.35);
}

.server-status.online .status-indicator {
  background-color: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.25);
}

.server-status.offline {
  border-color: rgba(231, 76, 60, 0.35);
}

.server-status.offline .status-indicator {
  background-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.25);
}

.server-status.info {
  border-color: rgba(241, 196, 15, 0.35);
}

.server-status.info .status-indicator {
  background-color: #f1c40f;
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.25);
}

/* =========================
   SERVER DETAILS
========================= */

.server-details {
  width: 100%;
  margin-top: 2px;
  padding: 12px 14px;
  overflow: hidden;

  background-color: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-radius: 10px;

  font-size: 0.85rem;
  color: #ccc;
}

/* Einzelne Zeilen */
.server-details .detail-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 3px 0;
}

/* Labels */
.server-details .label {
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}

/* Werte */
.server-details .value {
  font-family: "Space Mono", monospace;
  color: #e0e0e0;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Meta-Hinweis */
.server-details .detail-meta {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #1f1f1f;

  font-size: 0.7rem;
  color: #666;
  text-align: right;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 520px) {
  .server-details .detail-row {
    grid-template-columns: 1fr;
  }

  .server-details .label {
    font-size: 0.65rem;
  }
}

/* =========================
   MUTED TEXT (Index Abschluss)
========================= */

.muted {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #8e8e8e;
}

