/* GLOBAL */

body {
  background: #111;
  color: #fff;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

/* ALERT-BANNER */

.alert-banner {
  width: 100%;
  text-align: center;
  padding: 12px 0;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.alert-warning {
  background: rgba(255, 165, 0, 0.15);
  color: #ffae33;
  animation: bannerPulseOrange 1.5s infinite;
}

.alert-danger {
  background: rgba(255, 0, 0, 0.2);
  color: #ff4d4d;
  animation: bannerPulseRed 1s infinite;
}

.alert-success {
  background: rgba(0, 255, 100, 0.15);
  color: #00ff66;
  animation: bannerPulseGreen 1.5s infinite;
}

@keyframes bannerPulseOrange {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

@keyframes bannerPulseRed {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

@keyframes bannerPulseGreen {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* CARD */

.card {
  background: #1b1b1f;
  padding: 24px 28px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  width: 420px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

/* PROGRESS BAR */

.bar-outer {
  background: #3a0000;
  border-radius: 999px;
  overflow: hidden;
  height: 26px;
  position: relative;
}

.bar-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.4);
  opacity: 0.6;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
}

.bar-inner {
  height: 100%;
  width: 0%;
  background-image: linear-gradient(
    135deg,
    #3b82f6 25%,
    #1d4ed8 25%,
    #1d4ed8 50%,
    #3b82f6 50%,
    #3b82f6 75%,
    #1d4ed8 75%,
    #1d4ed8 100%
  );
  background-size: 24px 24px;
  transition: width 0.2s linear;
  animation: slide 1s linear infinite;
}

@keyframes slide {
  from { background-position: 0 0; }
  to   { background-position: 24px 0; }
}

/* FUNKENREGEN */

.spark {
  position: absolute;
  width: 4px;
  height: 12px;
  background: linear-gradient(to bottom, #ffdd55, #ff8800);
  border-radius: 2px;
  animation: sparkFall 1.2s linear forwards;
}

@keyframes sparkFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(200px) rotate(180deg); opacity: 0; }
}

/* CONTROLS */

.controls {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.controls input {
  flex: 1;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
}

.controls button {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.controls button:hover {
  background: #1d4ed8;
}

/* ETA / WITHDRAW */

.eta, .withdraw {
  margin-top: 8px;
  font-size: 13px;
  color: #ccc;
}

/* BOOTSCREEN */

.boot-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  color: #ffeb7a;
  font-family: "Courier New", monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: scanlines 0.12s infinite;
}

.boot-logo {
  margin: 0 0 16px 0;
  text-align: center;
  font-size: 12px;
}

.boot-text {
  text-align: center;
  font-size: 14px;
}

/* Scanline-Effekt */
@keyframes scanlines {
  0% { opacity: 0.96; }
  50% { opacity: 1; }
  100% { opacity: 0.96; }
}

/* BRIEFING-POPUP */

.briefing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 900;
}

.briefing-window {
  background: #050505;
  border: 2px solid #ffeb7a;
  padding: 16px 20px;
  max-width: 520px;
  width: 90%;
  color: #ffeb7a;
  font-family: "Courier New", monospace;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.briefing-header {
  margin: 0 0 8px 0;
  font-size: 12px;
}

.briefing-content {
  white-space: pre-wrap;
  font-size: 13px;
  margin-bottom: 12px;
}

.briefing-button {
  padding: 6px 12px;
  border: 1px solid #ffeb7a;
  background: #111;
  color: #ffeb7a;
  cursor: pointer;
  font-family: "Courier New", monospace;
}

.briefing-button:hover {
  background: #222;
}

/* STATS-PANEL */

.stats-toggle {
  position: fixed;
  right: 16px;
  top: 16px;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  z-index: 500;
}

.stats-toggle:hover {
  background: #1d4ed8;
}

.stats-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: #05070a;
  color: #ffeb7a;
  font-family: "Courier New", monospace;
  box-shadow: -4px 0 16px rgba(0,0,0,0.8);
  transition: right 0.3s ease;
  z-index: 600;
  display: flex;
  flex-direction: column;
}

.stats-panel.open {
  right: 0;
}

.stats-panel-header {
  padding: 10px 12px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-close {
  background: transparent;
  border: none;
  color: #ffeb7a;
  cursor: pointer;
  font-size: 16px;
}

.stats-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
}

.stats-list-item {
  cursor: pointer;
  padding: 4px 0;
}

.stats-list-item:hover {
  color: #ffffff;
}

.stats-detail {
  padding: 8px 12px;
  font-size: 12px;
  white-space: pre-wrap;
}

/* SCROLLBAR */

.stats-list::-webkit-scrollbar {
  width: 6px;
}
.stats-list::-webkit-scrollbar-track {
  background: #111;
}
.stats-list::-webkit-scrollbar-thumb {
  background: #444;
}

/* LAYERING */

.card, #alert-banner {
  position: relative;
  z-index: 1;
}