/* Gruvbox Dark Palette + Enhancements */
:root {
  --bg-dark: #121415;
  --term-bg: rgba(30, 32, 33, 0.65); /* Transparenz für Glassmorphism */
  --card-bg: rgba(40, 40, 40, 0.6);
  --card-hover: rgba(60, 56, 54, 0.8);
  --border-color: rgba(80, 73, 69, 0.6);
  --border-bright: rgba(254, 128, 25, 0.5);

  --fg-main: #ebdbb2;
  --fg-dim: #a89984;
  --fg-muted: #928374;

  --gruv-orange: #fe8019;
  --gruv-yellow: #fabd2f;
  --gruv-green: #b8bb26;
  --gruv-red: #fb4934;
  --gruv-aqua: #8ec07c;
  --gruv-blue: #83a598;

  --status-up-bg: rgba(184, 187, 38, 0.15);
  --status-down-bg: rgba(251, 73, 52, 0.15);
  --status-pause-bg: rgba(250, 189, 47, 0.15);

  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg-dark);
  color: var(--fg-main);
  font-family: Consolas, "Fira Code", Monaco, "Courier New", monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; }

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* Layout width: fluid, capped */
.navbar-container,
.content-wrapper {
  width: min(92vw, 1300px);
}

/* Navigation Bar */
.navbar-container {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
  padding: clamp(12px, 3vw, 24px) 0 0 0;
}

.navbar {
  width: 100%;
  background: rgba(30, 32, 33, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px clamp(14px, 3vw, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ascii-nav {
  color: var(--gruv-orange);
  font-size: 0.65rem;
  line-height: 1.05;
  font-weight: bold;
  white-space: pre;
  margin: 0;
  display: block;
}

.brand-compact {
  display: none;
  color: var(--gruv-orange);
  font-weight: bold;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.brand-cursor {
  animation: blinkCursor 0.9s infinite;
  color: var(--gruv-yellow);
}

.nav-links { display: flex; list-style: none; gap: 8px; flex-wrap: wrap; }
.nav-item {
  display: inline-block;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
  min-height: 36px;
  line-height: 20px;
}
.nav-item:hover, .nav-item.active {
  color: var(--gruv-yellow);
  background: rgba(250, 189, 47, 0.15);
}

/* Content Layout */
.content-wrapper {
  padding: clamp(16px, 3vw, 24px) 0;
  position: relative;
  z-index: 1;
}

/* Glassmorphism Terminal Window */
.terminal-container.glass-terminal {
  background-color: var(--term-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 25px;
}

.terminal-header {
  background-color: rgba(20, 22, 23, 0.7);
  padding: 12px clamp(12px, 3vw, 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
  flex-wrap: wrap;
}

.window-controls { display: flex; gap: 8px; }
.btn { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.btn.close { background: var(--gruv-red); }
.btn.min { background: var(--gruv-yellow); }
.btn.max { background: var(--gruv-green); }

.title {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-indicator {
  font-size: 0.75rem;
  color: var(--gruv-green);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.blink-dot {
  width: 8px; height: 8px;
  background-color: var(--gruv-green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

.fingerprint-bar {
  display: flex;
  gap: clamp(10px, 3vw, 20px);
  flex-wrap: wrap;
  padding: 8px clamp(12px, 3vw, 18px);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
}
.fp-item span { color: var(--gruv-aqua); font-weight: bold; }

.terminal-body { padding: clamp(16px, 4vw, 28px); }

.script-execution {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  border-left: 3px solid var(--gruv-blue);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.prompt { color: var(--gruv-aqua); font-weight: bold; }
.cmd { color: #fff; font-weight: bold; }
.exec-info { color: var(--fg-muted); font-size: 0.8rem; }

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.75rem;
  font-weight: bold;
  margin: 25px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; border-bottom: 5px dashed var(--border-color);
}
.divider span { padding: 0 12px; white-space: nowrap; }

/* Whoami panel */
.whoami-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.whoami-row {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}
.whoami-key {
  color: var(--gruv-yellow);
  font-weight: bold;
  font-size: 0.75rem;
  min-width: 70px;
  letter-spacing: 0.5px;
}
.whoami-val {
  color: var(--fg-main);
  font-size: 0.9rem;
}

/* Status Groups */
.group-section { margin-bottom: 28px; }
.group-section:last-child { margin-bottom: 0; }
.group-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--gruv-yellow);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

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

.card-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.type-tag {
  font-size: 0.65rem;
  color: var(--gruv-blue);
  background: rgba(131, 165, 152, 0.15);
  border: 1px solid rgba(131, 165, 152, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  width: fit-content;
  text-transform: uppercase;
  font-weight: bold;
}
.service-name {
  font-weight: bold;
  font-size: 0.95rem;
  color: var(--fg-main);
  overflow-wrap: anywhere;
}

.badge {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge.up {
  color: var(--gruv-green);
  background: var(--status-up-bg);
  border: 1px solid var(--gruv-green);
}

.badge.down {
  color: var(--gruv-red);
  background: var(--status-down-bg);
  border: 1px solid var(--gruv-red);
}

.badge.paused {
  color: var(--gruv-yellow);
  background: var(--status-pause-bg);
  border: 1px solid var(--gruv-yellow);
}

.quote-section {
  text-align: center;
  padding: 15px 10px;
}

.quote {
  font-style: italic;
  color: var(--fg-dim);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.quote-author { font-size: 0.85rem; color: var(--gruv-orange); font-weight: bold; }
.log-msg { color: var(--fg-muted); font-size: 0.85rem; }

/* Animations */
.cursor {
  color: var(--gruv-orange);
  font-weight: bold;
  animation: blinkCursor 0.8s infinite;
  margin-left: 2px;
}

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

.fade-in-line { animation: fadeInLine 0.3s ease-in forwards; }
@keyframes fadeInLine {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-pop-in { animation: cardPop 0.4s ease-out forwards; }
@keyframes cardPop {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

@media (max-width: 768px) {
  .ascii-nav { display: none; }
  .brand-compact { display: inline-block; }
  .nav-item { font-size: 0.78rem; padding: 8px 10px; }
  .title { display: none; }
  .whoami-row { flex-direction: column; gap: 2px; }
}