/* ==========================================================================
   TetraMc – Interaktiver Konzept-Codex (Design v2: TetraMc Brand & Minecraft UI)
   Markenpalette abgeleitet aus dem offiziellen TetraMc-Logo & Insel-Banner:
   - Mitternachts-Saphir (#030E1E / #05182E) & Abyssal-Petrol (#07223B)
   - TetraMc Kristall-Cyan (#26C0FC / #54F3FF) & Manastrom-Smaragd (#10D48E / #02AF9B)
   - Offizielle Ingame-Ressourcenfarben aus dem GUI-Leitfaden für Items/Tooltips
   100 % eigenständig, keine externen Requests (DSGVO-sauber).
   ========================================================================== */

:root {
  /* TetraMc Brand-Hintergründe (passend zum Insel-Banner #041533 / #012839) */
  --bg-deep: #030e1e;
  --bg-base: #05172d;
  --bg-surface: #08213b;
  --bg-card: #0b2948;
  --bg-card-hover: #0f3459;
  --bg-elevated: #133d68;

  /* TetraMc Marken-Akzente aus dem Logo */
  --brand-cyan: #26C0FC;
  --brand-ice: #6EE7FF;
  --brand-deep: #095280;
  --brand-emerald: #10D48E;
  --brand-teal: #02AF9B;

  /* Kanten & Leuchten */
  --border-subtle: rgba(38, 192, 252, 0.16);
  --border-default: rgba(38, 192, 252, 0.30);
  --border-strong: rgba(110, 231, 255, 0.62);

  /* Textfarben (Eisklar & gut lesbar auf Tiefblau) */
  --heading-ice: #ECF8FF;
  --text-main: #DBEBF8;
  --text-muted: #93B5D1;
  --text-dim: #5E84A6;

  /* Offizielle TetraMc Ingame-GUI-Farben (für Tooltips, Buch & Ressourcen) */
  --parchment: #F0D9A8;
  --lore-sand: #B9AC8E;
  --res-kronen: #FFC940;
  --res-mana: #4FA3FF;
  --res-player-xp: #9BE05A;
  --res-quest-xp: #C08CFF;
  --res-sp: #FFB347;

  --st-ok: #6BD66B;
  --st-warn: #FFA94D;
  --st-err: #FF6B6B;
  --st-action: #FFE066;
  --st-cyan: #3BC9DB;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-lg: 0 20px 50px rgba(1, 7, 16, 0.62);
  --shadow-tooltip: 0 14px 36px rgba(0, 0, 0, 0.78);

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --font-mono: "Consolas", "Cascadia Mono", "JetBrains Mono", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 10%, rgba(38, 192, 252, 0.16), transparent 38%),
    radial-gradient(circle at 82% 14%, rgba(2, 175, 155, 0.16), transparent 38%),
    radial-gradient(circle at 50% 85%, rgba(16, 212, 142, 0.09), transparent 44%),
    linear-gradient(180deg, #030e1e 0%, #051930 45%, #031122 100%);
  overflow-x: hidden;
}

/* Dezentes 16px Minecraft-Blockraster im Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(84, 243, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 243, 255, 0.028) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 35%, rgba(0, 0, 0, 0.85) 15%, transparent 82%);
  z-index: 0;
}

a {
  color: var(--brand-ice);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(6, 20, 38, 0.72);
  color: var(--brand-ice);
  padding: 0.12em 0.44em;
  border-radius: 4px;
  border: 1px solid rgba(56, 214, 255, 0.28);
}

/* Pixel-Art Icons */
[data-mc-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.mc-px-icon {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: middle;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.mc-px-lg {
  width: 28px;
  height: 28px;
}

.mc-px-xl {
  width: 34px;
  height: 34px;
}

/* Pixelige Block-Trennlinie (Manakristall & Smaragd) */
.mc-pixel-divider {
  height: 6px;
  margin: 2rem 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(38, 192, 252, 0.45) 0 12px,
    rgba(16, 212, 142, 0.45) 12px 24px,
    rgba(8, 33, 59, 0.5) 24px 36px
  );
  border-top: 1px solid rgba(110, 231, 255, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Top Navigation Header (mit echtem TetraMc T-Emblem)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 16, 33, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(38, 192, 252, 0.24);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.58rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(38, 192, 252, 0.45));
  transition: transform 0.2s ease;
}

.brand:hover .brand-logo-img {
  transform: scale(1.08) rotate(-2deg);
}

.brand-title {
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--heading-ice);
  letter-spacing: 0.015em;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(38, 192, 252, 0.35);
  white-space: nowrap;
}

.brand-title span {
  color: var(--brand-cyan);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

/* Minecraft-inspirierte Reiter mit feiner 3D-Kante */
.nav-btn {
  height: 36px;
  background: rgba(11, 41, 72, 0.45);
  color: var(--text-muted);
  border: 1px solid rgba(38, 192, 252, 0.14);
  padding: 0 0.72rem;
  border-radius: 7px;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  transition: all 0.16s ease;
}

.nav-btn:hover {
  color: var(--heading-ice);
  background: rgba(38, 192, 252, 0.14);
  border-color: rgba(38, 192, 252, 0.38);
}

.nav-btn.active {
  color: #031322;
  background: linear-gradient(180deg, #6EE7FF 0%, #26C0FC 100%);
  border-color: #A5F3FC;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(7, 89, 133, 0.65),
    0 0 18px rgba(38, 192, 252, 0.35);
  font-weight: 700;
}

.quick-search-btn {
  height: 36px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-default);
  padding: 0 0.72rem;
  border-radius: 7px;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.16s ease;
}

.quick-search-btn:hover {
  border-color: var(--brand-ice);
  color: var(--brand-ice);
  box-shadow: 0 0 14px rgba(38, 192, 252, 0.25);
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.22rem 0.36rem;
  border-radius: 4px;
  background: rgba(3, 14, 30, 0.7);
  border: 1px solid rgba(110, 231, 255, 0.25);
  color: var(--brand-ice);
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   Main Container & View Switching
   ========================================================================== */
.main-wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.85rem 1.25rem 4.5rem;
}

.view-section {
  display: none;
  animation: fadeSlideIn 0.24s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Typography, Badges, Minecraft-Bevel Buttons & Cards
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--brand-ice);
  background: linear-gradient(90deg, rgba(38, 192, 252, 0.16), rgba(16, 212, 142, 0.14));
  border: 1px solid rgba(84, 243, 255, 0.36);
  padding: 0.28rem 0.72rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.section-header {
  margin-bottom: 1.8rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  color: var(--heading-ice);
  margin: 0 0 0.5rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 18px rgba(38, 192, 252, 0.22);
}

.section-lead {
  font-size: 1.03rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0;
}

.lore-quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--parchment);
  border-left: 3px solid var(--brand-emerald);
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, rgba(16, 212, 142, 0.10), rgba(8, 33, 59, 0.4));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
}

/* Resource & Status Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.77rem;
  font-weight: 700;
  padding: 0.2rem 0.62rem;
  border-radius: 6px;
  white-space: nowrap;
}

.pill-kronen { color: var(--res-kronen); background: rgba(255, 201, 64, 0.14); border: 1px solid rgba(255, 201, 64, 0.36); }
.pill-mana { color: var(--res-mana); background: rgba(79, 163, 255, 0.15); border: 1px solid rgba(79, 163, 255, 0.4); }
.pill-pxp { color: var(--res-player-xp); background: rgba(155, 224, 90, 0.14); border: 1px solid rgba(155, 224, 90, 0.36); }
.pill-qxp { color: var(--res-quest-xp); background: rgba(192, 140, 255, 0.15); border: 1px solid rgba(192, 140, 255, 0.38); }
.pill-sp { color: var(--res-sp); background: rgba(255, 179, 71, 0.15); border: 1px solid rgba(255, 179, 71, 0.38); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
}

.status-ok { color: var(--st-ok); background: rgba(107, 214, 107, 0.14); border: 1px solid rgba(107, 214, 107, 0.34); }
.status-wip { color: var(--st-warn); background: rgba(255, 169, 77, 0.14); border: 1px solid rgba(255, 169, 77, 0.34); }
.status-later { color: var(--text-muted); background: rgba(147, 181, 209, 0.12); border: 1px solid rgba(147, 181, 209, 0.26); }
.status-scope { color: var(--brand-ice); background: rgba(38, 192, 252, 0.13); border: 1px solid rgba(38, 192, 252, 0.32); }

/* Karten mit dezenter Minecraft-Steintafel-Kante */
.card {
  background: linear-gradient(180deg, rgba(13, 45, 78, 0.92) 0%, rgba(8, 31, 56, 0.95) 100%);
  border: 2px solid rgba(38, 192, 252, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(165, 243, 252, 0.14),
    inset 0 -2px 0 rgba(2, 9, 20, 0.55),
    0 10px 28px rgba(2, 8, 18, 0.42);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--brand-ice);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(2, 9, 20, 0.65),
    0 14px 32px rgba(38, 192, 252, 0.20);
}

/* Minecraft-Bevel Buttons in TetraMc Kristall-Blau & Schiefer */
.btn-primary {
  background: linear-gradient(180deg, #54F3FF 0%, #1CA8E8 55%, #0F7FB8 100%);
  color: #021324;
  border: 2px solid #041E36;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    inset 0 -3px 0 rgba(5, 55, 88, 0.75),
    0 6px 20px rgba(38, 192, 252, 0.32);
  font-weight: 800;
  font-size: 0.93rem;
  padding: 0.7rem 1.3rem;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
}

.btn-secondary {
  background: linear-gradient(180deg, #163E66 0%, #0D2B49 100%);
  color: var(--heading-ice);
  border: 2px solid rgba(56, 214, 255, 0.32);
  box-shadow:
    inset 0 2px 0 rgba(165, 243, 252, 0.18),
    inset 0 -3px 0 rgba(3, 12, 24, 0.65);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.66rem 1.18rem;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--brand-ice);
  background: linear-gradient(180deg, #1D4E7E 0%, #12375C 100%);
  color: #FFFFFF;
}

/* ==========================================================================
   VIEW 1: Hero mit TetraMc Insel-Banner & Minecraft-Serverliste + Hotbar-HUD
   ========================================================================== */
.hero-box {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  background:
    radial-gradient(circle at 76% 32%, rgba(2, 175, 155, 0.28), transparent 46%),
    radial-gradient(circle at 22% 80%, rgba(38, 192, 252, 0.18), transparent 48%),
    linear-gradient(135deg, #041533 0%, #012839 58%, #041930 100%);
  border: 2px solid rgba(84, 243, 255, 0.35);
  box-shadow: var(--shadow-lg), 0 0 42px rgba(2, 175, 155, 0.14);
  margin-bottom: 1.8rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-headline {
  font-size: clamp(1.95rem, 3.8vw, 2.95rem);
  color: var(--heading-ice);
  line-height: 1.12;
  margin: 0 0 0.8rem;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.55);
}

.hero-headline .accent-cyan {
  background: linear-gradient(90deg, #6EE7FF 0%, #26C0FC 55%, #10D48E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-motto {
  font-size: 1.14rem;
  color: var(--brand-ice);
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.hero-desc {
  color: var(--text-main);
  font-size: 0.98rem;
  margin: 0 0 1.35rem;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Rechtes Hero-Showcase: Schwebendes TetraMc-Insel-Banner + Kanon-Kurzbox */
.hero-art-col {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.hero-banner-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(84, 243, 255, 0.38);
  background: #041533;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.58), 0 0 28px rgba(38, 192, 252, 0.22);
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  animation: islandFloat 6s ease-in-out infinite;
}

@keyframes islandFloat {
  0%, 100% { transform: scale(1.01) translateY(0px); }
  50% { transform: scale(1.025) translateY(-4px); }
}

.hero-lore-panel {
  background: rgba(3, 14, 30, 0.72);
  border: 1px solid rgba(84, 243, 255, 0.26);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.hero-lore-panel h3 {
  margin: 0 0 0.5rem;
  color: var(--brand-ice);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-lore-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-lore-list li strong {
  color: var(--heading-ice);
}

/* --- Echter Minecraft Multiplayer-Serverlisten-Eintrag --- */
.mc-server-strip {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(84, 243, 255, 0.20);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.mc-server-row {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.68) 0 2px,
      rgba(12, 18, 28, 0.76) 2px 4px
    ),
    #111620;
  border: 2px solid #000000;
  outline: 2px solid rgba(84, 243, 255, 0.32);
  box-shadow: inset 0 0 0 2px #2b3344;
  padding: 0.6rem 0.8rem;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  font-family: var(--font-mono);
}

.mc-server-icon {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  border: 2px solid #000;
  background: #041533;
}

.mc-server-title-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 #1f1f1f;
  margin-bottom: 0.25rem;
}

.mc-motd-text {
  font-size: 0.84rem;
  line-height: 1.42;
  text-shadow: 2px 2px 0 #141414;
}

.mc-ping-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-left: 0.45rem;
}

.mc-ping-bars span {
  width: 3px;
  background: #55FF55;
  box-shadow: 1px 1px 0 #003b00;
}

/* --- Interaktive Minecraft-HUD & Hotbar-Vorschau (F vs. Shift+F) --- */
.mc-hud-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(38, 192, 252, 0.18), transparent 60%),
    linear-gradient(180deg, #071D35 0%, #041122 100%);
  border: 2px solid rgba(84, 243, 255, 0.32);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 2.2rem;
  box-shadow: var(--shadow-lg);
}

.mc-hud-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.mc-hud-stage {
  background:
    linear-gradient(180deg, rgba(4, 21, 51, 0.78) 0%, rgba(2, 12, 24, 0.94) 100%),
    url("./assets/tetra-emblem-bg.jpg") center / cover no-repeat;
  border: 2px solid #000;
  outline: 2px solid rgba(84, 243, 255, 0.35);
  border-radius: 8px;
  padding: 1rem 1.2rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 430px;
}

.mc-actionbar-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 #000000;
  min-height: 1.35rem;
  margin-bottom: 0.45rem;
  text-align: center;
}

.mc-status-bars {
  width: 364px;
  max-width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.mc-icon-row {
  display: flex;
  gap: 1px;
}

.mc-icon-row .mc-px-icon {
  width: 14px;
  height: 14px;
}

/* Die blaue TetraMc Mana-XP-Leiste */
.mc-mana-bar-wrap {
  position: relative;
  width: 364px;
  max-width: 100%;
  height: 10px;
  background: #0a1929;
  border: 2px solid #000000;
  margin-bottom: 8px;
  overflow: hidden;
}

.mc-mana-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #26C0FC 0 16px,
    #54F3FF 16px 18px,
    #0284C7 18px 20px
  );
  transition: width 0.25s ease;
}

.mc-mana-level-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.86rem;
  color: #54F3FF;
  text-shadow:
    2px 0 0 #000,
    -2px 0 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000;
  margin-bottom: -4px;
  z-index: 2;
}

/* Klassische 9er Minecraft-Hotbar */
.mc-hotbar-9 {
  display: grid;
  grid-template-columns: repeat(9, 40px);
  background: #8B8B8B;
  border: 2px solid #000000;
  padding: 2px;
  gap: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
}

.mc-hotbar-slot {
  width: 40px;
  height: 40px;
  background: #8B8B8B;
  border-top: 2px solid #373737;
  border-left: 2px solid #373737;
  border-right: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.mc-hotbar-slot.selected {
  outline: 3px solid #F8FAFC;
  outline-offset: -1px;
  z-index: 3;
  background: #9E9E9E;
}

.mc-hotbar-slot.menu-mode {
  background: #1B3654;
  border-top-color: #091728;
  border-left-color: #091728;
  border-right-color: #54F3FF;
  border-bottom-color: #54F3FF;
}

.mc-hotbar-slot .mc-px-icon {
  width: 24px;
  height: 24px;
}

.mc-hotbar-key {
  position: absolute;
  top: 1px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 1px 1px 0 #000;
}

/* 4 Iron Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-bottom: 2.2rem;
}

.pillar-card {
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--pillar-accent, var(--brand-cyan));
}

.pillar-icon {
  margin-bottom: 0.65rem;
  display: inline-flex;
  padding: 0.45rem;
  border-radius: 8px;
  background: rgba(3, 14, 30, 0.65);
  border: 1px solid rgba(84, 243, 255, 0.22);
}

.pillar-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--pillar-accent, var(--brand-cyan));
  margin-bottom: 0.25rem;
}

.pillar-title {
  font-size: 1.12rem;
  color: var(--heading-ice);
  margin: 0 0 0.5rem;
}

.pillar-text {
  font-size: 0.89rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.pillar-rule {
  font-size: 0.8rem;
  padding: 0.48rem 0.68rem;
  border-radius: 6px;
  background: rgba(3, 14, 30, 0.55);
  border: 1px solid rgba(84, 243, 255, 0.16);
  color: var(--text-main);
}

/* Resource Legend Strip */
.resource-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  margin-bottom: 2.2rem;
}

.resource-box {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.resource-box-head {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.resource-box-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Quick Entry Cards */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

/* ==========================================================================
   VIEW 2: Geführte Spielerreise (6 Etappen)
   ========================================================================== */
.tour-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.55rem;
  margin-bottom: 1.6rem;
}

.tour-step-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.75rem 0.7rem;
  text-align: left;
  color: var(--text-muted);
  transition: all 0.16s ease;
}

.tour-step-btn:hover {
  border-color: var(--border-default);
  color: var(--heading-ice);
}

.tour-step-btn.active {
  background: linear-gradient(180deg, rgba(38, 192, 252, 0.22), rgba(2, 175, 155, 0.16));
  border-color: var(--brand-ice);
  color: var(--heading-ice);
  box-shadow: 0 0 18px rgba(38, 192, 252, 0.2);
}

.tour-step-num {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-cyan);
  font-weight: 700;
  display: block;
}

.tour-step-label {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  margin-top: 0.2rem;
}

.tour-stage-card {
  background: linear-gradient(180deg, #0B2948 0%, #071E36 100%);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-lg);
}

.tour-stage-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 2rem;
}

.tour-timeline {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.tour-point {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.85rem;
  align-items: start;
  background: rgba(4, 16, 32, 0.52);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.9rem 1.05rem;
}

.tour-point-idx {
  width: 30px;
  height: 30px;
  margin-top: 0.1rem;
  border-radius: 6px;
  background: rgba(38, 192, 252, 0.18);
  border: 1px solid rgba(84, 243, 255, 0.4);
  color: var(--brand-ice);
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.tour-side-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.tour-side-box h4 {
  margin: 0 0 0.6rem;
  color: var(--heading-ice);
  font-size: 0.95rem;
}

.tour-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   VIEW 3: Interaktives System-Netzwerk
   ========================================================================== */
.flow-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.flow-chip {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-default);
  padding: 0.45rem 0.9rem;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.flow-chip:hover {
  color: var(--heading-ice);
  border-color: var(--brand-cyan);
}

.flow-chip.active {
  background: linear-gradient(180deg, rgba(38, 192, 252, 0.28), rgba(2, 175, 155, 0.22));
  color: #FFFFFF;
  border-color: var(--brand-ice);
  box-shadow: 0 0 14px rgba(38, 192, 252, 0.22);
}

.network-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.35rem;
  align-items: start;
}

.network-canvas-card {
  background:
    radial-gradient(circle at 50% 45%, rgba(2, 175, 155, 0.16) 0%, transparent 58%),
    radial-gradient(circle at 50% 50%, #092440 0%, #041224 100%);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.network-svg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

.net-edge {
  fill: none;
  stroke-width: 2.2;
  opacity: 0.28;
  transition: opacity 0.22s ease, stroke-width 0.22s ease;
}

.net-edge.highlighted {
  opacity: 0.96;
  stroke-width: 3.4;
  stroke-dasharray: 7 5;
  animation: dashFlow 18s linear infinite;
}

.net-edge.dimmed {
  opacity: 0.07;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -240; }
}

.net-node {
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.2s ease;
}

.net-node.dimmed {
  opacity: 0.35;
}

.net-node rect {
  transition: stroke 0.18s ease, fill 0.18s ease, stroke-width 0.18s ease;
}

.net-node:hover rect,
.net-node.selected rect {
  stroke: var(--brand-ice);
  stroke-width: 2.8;
  fill: #12385E;
}

.network-detail-panel {
  background: linear-gradient(180deg, #0B2948 0%, #071E36 100%);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  position: sticky;
  top: 76px;
  box-shadow: var(--shadow-lg);
}

.edge-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.edge-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.edge-item:hover {
  border-color: var(--brand-ice);
  background: var(--bg-card-hover);
}

/* ==========================================================================
   VIEW 4: Erlebnis-Labore (Echtes MC-Buch, MC-Truhen-GUI & 3x3 Job-Plot)
   ========================================================================== */
.lab-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.lab-tab-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 2px solid var(--border-default);
  padding: 0.7rem 1.15rem;
  border-radius: 9px;
  font-size: 0.93rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.16s ease;
}

.lab-tab-btn:hover {
  color: var(--heading-ice);
  border-color: var(--brand-cyan);
}

.lab-tab-btn.active {
  background: linear-gradient(180deg, #54F3FF 0%, #1CA8E8 100%);
  color: #021324;
  border-color: #A5F3FC;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    inset 0 -3px 0 rgba(7, 89, 133, 0.7),
    0 6px 20px rgba(38, 192, 252, 0.3);
}

.lab-panel {
  display: none;
}

.lab-panel.active {
  display: block;
  animation: fadeSlideIn 0.22s ease;
}

/* --- Lab 1: Gildenpass Written Book --- */
.book-lab-grid {
  display: grid;
  grid-template-columns: 365px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.mc-book {
  background: linear-gradient(160deg, #f8eed8 0%, #ecd7ad 52%, #dfc391 100%);
  color: #2b2114;
  border: 6px solid #6b4628;
  outline: 3px solid #1b1007;
  border-radius: 8px;
  padding: 1.4rem 1.35rem 1.1rem;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65), inset 0 0 28px rgba(120, 78, 32, 0.24);
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.55;
  position: relative;
}

.mc-book-page-num {
  text-align: right;
  font-size: 0.76rem;
  color: #7a6243;
  margin-bottom: 0.45rem;
}

.mc-book-content {
  flex: 1;
}

.mc-book-link {
  color: #006d77;
  font-weight: 800;
  cursor: pointer;
  display: inline-block;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
}

.mc-book-link:hover {
  background: rgba(0, 109, 119, 0.14);
  text-decoration: underline;
}

.mc-book-hover {
  border-bottom: 1px dashed rgba(90, 64, 34, 0.55);
  cursor: help;
}

.mc-book-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.65rem;
  border-top: 2px solid rgba(107, 70, 40, 0.24);
}

.mc-page-arrow {
  background: #7c5230;
  color: #fdf3dc;
  border: 2px solid #3c2411;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  padding: 0.32rem 0.75rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.82rem;
}

.mc-page-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rank-grid-13 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.rank-chip {
  background: #061527;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.42rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rank-chip.active {
  border-color: var(--brand-ice);
  background: #103255;
  box-shadow: 0 0 12px rgba(38, 192, 252, 0.25);
}

.chat-preview-bar {
  font-family: var(--font-mono);
  background: rgba(2, 8, 16, 0.92);
  border: 2px solid #000;
  outline: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  margin-top: 0.85rem;
  text-shadow: 2px 2px 0 #000;
}

/* --- Lab 2: Echtes Minecraft-Truhen-GUI (9x6) --- */
.skill-lab-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.4rem;
  align-items: start;
}

.archetype-sidebar {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  max-height: 650px;
  overflow-y: auto;
}

.arch-cat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-cyan);
  font-weight: 800;
  margin: 0.85rem 0 0.35rem;
}

.arch-cat-label:first-child {
  margin-top: 0;
}

.arch-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.44rem 0.58rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  transition: all 0.14s ease;
}

.arch-btn:hover {
  background: rgba(38, 192, 252, 0.1);
  color: var(--heading-ice);
}

.arch-btn.active {
  background: rgba(38, 192, 252, 0.2);
  border-color: var(--brand-ice);
  color: #FFFFFF;
  font-weight: 700;
}

/* Klassischer Minecraft-Container-Rahmen (Deepslate/Stone-Edition) */
.chest-window {
  background: #C6C6C6;
  color: #2b2b2b;
  border-top: 4px solid #FFFFFF;
  border-left: 4px solid #FFFFFF;
  border-right: 4px solid #555555;
  border-bottom: 4px solid #555555;
  outline: 2px solid #000000;
  border-radius: 4px;
  padding: 0.85rem 0.95rem 0.95rem;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65);
}

.chest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.chest-title {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  font-weight: 800;
  color: #262626;
}

/* Echtes 9x6 Minecraft-Slot-Gitter (#8B8B8B mit 3D-Muldenkante!) */
.chest-grid-9x6 {
  display: grid;
  grid-template-columns: repeat(9, minmax(42px, 1fr));
  gap: 0;
  background: #8B8B8B;
  border: 2px solid #373737;
  max-width: 540px;
}

.chest-slot {
  aspect-ratio: 1 / 1;
  background: #8B8B8B;
  border-top: 2px solid #373737;
  border-left: 2px solid #373737;
  border-right: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  position: relative;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  user-select: none;
  transition: filter 0.1s ease;
}

.chest-slot .mc-px-icon {
  width: 72%;
  height: 72%;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.38));
}

.chest-slot.filler {
  background: #6E6E6E;
}

.chest-slot.filler .mc-px-icon {
  opacity: 0.42;
  filter: none;
}

.chest-slot.slot-hidden,
.chest-slot.slot-blocked,
.chest-slot.slot-learnable,
.chest-slot.slot-nopoints,
.chest-slot.slot-maxed,
.chest-slot.slot-special {
  cursor: pointer;
}

.chest-slot:not(.filler):hover {
  background-color: #B4D8E8;
  z-index: 2;
}

.chest-slot.slot-learnable {
  background: #9B9368;
}

.chest-slot.slot-maxed {
  background: #739973;
}

.chest-slot.slot-nopoints {
  background: #6D95A3;
}

.chest-slot.slot-special {
  background: #7B8FA6;
}

.chest-slot.slot-arrow-open {
  color: #FFFBEB;
  font-weight: 900;
  text-shadow: 2px 2px 0 #1f2937;
}

.chest-slot.slot-arrow-locked {
  color: #4B5563;
  font-weight: 800;
}

.chest-slot.slot-error-flash {
  background: #C94A4A !important;
}

.slot-stack {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 #222222;
  pointer-events: none;
}

.slot-num-tag {
  position: absolute;
  top: 1px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #F8FAFC;
  text-shadow: 1px 1px 0 #000000;
  pointer-events: none;
}

/* Minecraft Advancement Toast */
.mc-advancement-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #212121;
  border: 3px solid #555555;
  outline: 2px solid #000000;
  box-shadow: inset 0 2px 0 #888888, 0 10px 24px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.8rem;
  font-family: var(--font-mono);
}

/* Originalgetreuer Minecraft Item-Tooltip (#100010 mit lila Rahmen) */
.mc-tooltip-box {
  background: rgba(16, 0, 16, 0.96);
  border: 3px solid #2c0863;
  outline: 2px solid #100010;
  border-radius: 4px;
  padding: 0.95rem 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.52;
  box-shadow: var(--shadow-tooltip);
  min-height: 235px;
  text-shadow: 1px 1px 0 #000;
}

.skill-chest-split {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(260px, 1fr);
  gap: 1.15rem;
  align-items: start;
}

/* --- Lab 3: 10 Zünfte & 3x3 Schicht-Plot (Minecraft Gras-/Stein-Parzellen) --- */
.job-lab-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.4rem;
  align-items: start;
}

.job-inner-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.plot-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 390px;
  background: #061826;
  padding: 10px;
  border-radius: 8px;
  border: 3px solid #000;
  outline: 2px solid rgba(16, 212, 142, 0.45);
}

.plot-cell {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.76rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  transition: all 0.16s ease;
}

.plot-cell.center-guild {
  background: linear-gradient(180deg, #164e63 0%, #0f2942 100%);
  border: 2px solid var(--res-kronen);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25);
  color: var(--heading-ice);
  font-weight: 800;
}

.plot-cell.frag-open {
  background: linear-gradient(180deg, #1b4d3e 0%, #12352c 100%);
  border-top: 3px solid #34d399;
  border-color: rgba(16, 212, 142, 0.55);
  color: var(--heading-ice);
}

.plot-cell.frag-locked {
  background: #091726;
  border-color: rgba(148, 163, 184, 0.14);
  color: var(--text-dim);
}

/* ==========================================================================
   VIEW 5: Kompendium
   ========================================================================== */
.compendium-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.compendium-grid {
  display: grid;
  gap: 1rem;
}

.concept-accordion {
  background: linear-gradient(180deg, rgba(11, 41, 72, 0.92), rgba(7, 29, 53, 0.95));
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.concept-accordion.open {
  border-color: var(--brand-ice);
}

.concept-acc-head {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  padding: 1.15rem 1.35rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.concept-acc-head:hover {
  background: rgba(38, 192, 252, 0.06);
}

.concept-acc-body {
  display: none;
  padding: 0 1.35rem 1.35rem;
  border-top: 1px solid var(--border-subtle);
}

.concept-accordion.open .concept-acc-body {
  display: block;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.detail-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.95rem 1.05rem;
}

.detail-block h4 {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--brand-ice);
}

.detail-block ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.87rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.35rem;
}

.detail-block li strong {
  color: var(--heading-ice);
}

/* ==========================================================================
   VIEW 6: Team-Einblick & Begriffs-Lexikon
   ========================================================================== */
.team-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.baustellen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}

.baustelle-card {
  background: var(--bg-card);
  border: 2px solid rgba(255, 169, 77, 0.32);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.glossary-search-input {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: 7px;
  font-size: 0.92rem;
}

.glossary-search-input:focus {
  outline: none;
  border-color: var(--brand-ice);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.glossary-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.glossary-term {
  font-weight: 700;
  color: var(--heading-ice);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.glossary-def {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Quick Search Modal (Strg+K)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 9, 20, 0.82);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 1rem 2rem;
}

.modal-backdrop.open {
  display: flex;
}

.search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 2px solid var(--brand-ice);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-modal-input {
  width: 100%;
  background: var(--bg-surface);
  border: none;
  border-bottom: 1px solid var(--border-default);
  color: var(--heading-ice);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
}

.search-modal-input:focus {
  outline: none;
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.6rem;
}

.search-hit {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0.7rem 0.9rem;
  text-align: left;
  color: var(--text-main);
  display: block;
}

.search-hit:hover {
  background: rgba(38, 192, 252, 0.14);
  border-color: var(--border-default);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1260px) {
  .topbar-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 0.55rem;
    column-gap: 0.9rem;
  }
  .brand {
    order: 1;
  }
  .quick-search-btn {
    order: 2;
    margin-left: auto;
  }
  .nav-tabs {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .mc-server-strip,
  .mc-hud-grid,
  .tour-stage-layout,
  .network-layout,
  .book-lab-grid,
  .skill-lab-layout,
  .skill-chest-split,
  .job-lab-grid,
  .job-inner-split,
  .team-grid-2 {
    grid-template-columns: 1fr;
  }
  .mc-hud-stage {
    min-width: 0;
    width: 100%;
  }
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .resource-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .tour-stepper {
    grid-template-columns: repeat(3, 1fr);
  }
  .network-detail-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .pillars-grid,
  .entry-grid,
  .resource-strip,
  .tour-stepper {
    grid-template-columns: 1fr;
  }
  .mc-server-row {
    grid-template-columns: 48px 1fr;
  }
  .mc-server-icon {
    width: 48px;
    height: 48px;
  }
  .mc-hotbar-9 {
    grid-template-columns: repeat(9, 32px);
  }
  .mc-hotbar-slot {
    width: 32px;
    height: 32px;
  }
  .mc-status-bars,
  .mc-mana-bar-wrap {
    width: 292px;
  }
}
