@charset "UTF-8";

/* --- GRUNDEINSTELLUNGEN & VARIABLEN --- */
:root {
  --bg0: #0a0d13;
  --bg1: #0f1420;
  --panel: rgba(20, 25, 40, .85);
  --border: #2a2f44;
  --text: #dfe4ef;
  --muted: #a7b2c6;
  --cyan: #00e0ff;
  --cyan-d: #0bbcd6;
  --red: #d83a34;
  --yellow: #ffcc00;
  --shadow-cyan: 0 0 14px rgba(0, 224, 255, .35), 0 0 28px rgba(0, 224, 255, .12);
  --radius: 16px;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 70% -10%, #11233a 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #0c1b2e 0%, transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Exo 2", Arial, sans-serif;
}

/* --- HEADER & LOGOS --- */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(10, 13, 19, .95), rgba(10, 13, 19, .65));
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-cyan);
  backdrop-filter: blur(4px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  position: relative;
}

.logo {
  display: block;
  width: 960px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(0, 224, 255, .35));
}

.partner-fixed {
  position: fixed;
  right: 16px;
  top: 10px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.partner {
  height: 45px; 
  width: auto;
  filter: invert(1) brightness(1.15) contrast(1.1) drop-shadow(0 0 24px rgba(0, 224, 255, .55)) drop-shadow(0 0 36px rgba(0, 224, 255, .25));
  opacity: .96;
  transition: transform .15s, filter .2s, opacity .2s;
  mix-blend-mode: screen;
}

.partner:hover {
  transform: translateY(-1px) scale(1.04);
  filter: invert(1) brightness(1.25) contrast(1.15) drop-shadow(0 0 32px rgba(0, 224, 255, .75)) drop-shadow(0 0 48px rgba(0, 224, 255, .35));
  opacity: 1;
}

/* --- LAYOUT CONTAINER & BOXEN --- */
.container {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 16px;
}

h1 {
  font-family: "Orbitron", system-ui;
  font-weight: 800;
  letter-spacing: .5px;
  margin: 16px 0 8px;
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.subtitle {
  color: var(--muted);
  margin-bottom: 14px;
}

.box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .03);
  margin-bottom: 16px;
}

.box h3 {
  margin: 4px 0 10px;
  font-family: "Orbitron";
  letter-spacing: .5px;
}

.box.start {
  box-shadow: var(--shadow-cyan);
}

.box.ziel {
  box-shadow: 0 0 16px rgba(216, 58, 52, .35);
}

/* --- GRID SYSTEM --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- FORMULARE & BUTTONS --- */
label {
  font-size: .9rem;
  color: #cfe8ff;
  display: block;
  margin-bottom: 6px;
}

select, button {
  background: #121826;
  color: var(--text);
  border: 1px solid #2f3854;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 1rem;
  outline: none;
  transition: box-shadow .2s, transform .05s, border-color .2s;
}

select:focus {
  box-shadow: 0 0 0 3px rgba(0, 224, 255, .25);
  border-color: var(--cyan-d);
}

button {
  font-family: "Orbitron";
  letter-spacing: .6px;
}

.btn-primary {
  background: linear-gradient(180deg, #18243b, #111827);
  border-color: var(--cyan);
  box-shadow: var(--shadow-cyan);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(0, 224, 255, .45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* --- INFO BOXEN --- */
.info {
  font-size: .95rem;
  line-height: 1.45;
  color: #daecff;
  background: rgba(0, 224, 255, .06);
  border: 1px solid rgba(0, 224, 255, .18);
  border-radius: 12px;
  padding: 10px;
  min-height: 5.6em;
}

.info.right {
  background: rgba(216, 58, 52, .06);
  border-color: rgba(216, 58, 52, .18);
}

/* --- CONTROLS & STATS (Index) --- */
.controls {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.controls .block {
  min-width: 220px;
}

.ship-stats {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 4px;
}

.ship-stats b {
  color: var(--cyan);
}

/* --- TABELLEN --- */
table {
  border-collapse: collapse;
  width: 100%;
  background: rgba(10, 14, 20, .6);
}

th, td {
  border: 1px solid #2b3550;
  padding: 10px;
}

th {
  background: linear-gradient(180deg, #121a2a, #0f1522);
  color: #a8dfff;
  font-family: "Orbitron";
  text-align: left;
}

/* Sticky Header nur für systems.html wichtig */
th {
  position: sticky;
  top: 0;
}

tbody tr:hover {
  background: rgba(0, 224, 255, .08);
}

td.right {
  text-align: right;
}

/* --- SUMMARY & STATUS --- */
.summary {
  margin: 10px 0 6px;
  color: #c8f3ff;
  text-shadow: var(--shadow-cyan);
}

.err {
  color: #ff9a9a;
}

.warn {
  color: #ff9a9a;
  font-weight: bold;
}

/* Badge für Tankstopps */
.refuel-badge {
  display: inline-block;
  background: rgba(255, 204, 0, 0.15);
  border: 1px solid var(--yellow);
  color: var(--yellow);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: bold;
  margin-left: 8px;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}

.dbg {
  margin-top: 8px;
  color: #9dd6ff;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* --- SWAP BUTTON --- */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.header-row h3 {
  margin: 0;
}

.btn-swap {
  background: rgba(0, 224, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--cyan);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding-bottom: 3px;
}

.btn-swap:hover {
  background: var(--cyan);
  color: var(--bg0);
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 224, 255, 0.4);
  transform: rotate(180deg);
}

/* --- LEGEND (Systems.html) --- */
.legend p {
  margin: 6px 0;
}

/* --- NEU: TEILEN BUTTON --- */
.btn-share {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 224, 255, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-share:hover {
  background: var(--cyan);
  color: var(--bg0);
  box-shadow: 0 0 12px rgba(0,224,255,0.4);
}

/* --- NEU: MAP HUD (Info-Box) --- */
#mapTooltip {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none; /* Wird per JS eingeblendet */
  background: rgba(10, 13, 19, 0.9);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 15px rgba(0, 224, 255, 0.15);
  backdrop-filter: blur(6px);
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  text-align: left;
  pointer-events: none;
  z-index: 100;
  min-width: 220px;
  max-width: 300px;
  line-height: 1.6;
}

#mapTooltip b {
  color: var(--cyan);
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
  font-size: 1.1rem;
  display: block;
  border-bottom: 1px solid rgba(0, 224, 255, 0.3);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

#mapTooltip .label {
  color: var(--muted);
  font-size: 0.8rem;
  display: inline-block;
  width: 80px; 
}

#mapTooltip .coord {
  color: #8899aa;
  font-size: 0.8rem;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  display: block;
  font-family: monospace;
  text-align: right;
}

/* --- HISTORY LIST --- */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* ÄNDERUNG: Höherer Wert für ca. 5 Items */
  max-height: 480px;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 4px;
}

/* Scrollbar für Webkit */
.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.history-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.history-item {
  background: rgba(0, 224, 255, 0.03);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.history-item:hover {
  background: rgba(0, 224, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 224, 255, 0.1);
}

.hist-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hist-route {
  color: var(--cyan);
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
}

.hist-ship {
  font-size: 0.8em;
  color: var(--muted);
}

.hist-stats {
  text-align: right;
  font-size: 0.85em;
  color: var(--text);
  line-height: 1.4;
}

.hist-stats span {
  display: block;
}