/* ============================================================
   SpaceMMO – DarkOrbit-ähnliches Space-Theme
   Bewusst schlank: CSS-Variablen + ein paar Komponenten.
   ============================================================ */

:root {
  --bg: #05060f;
  --panel: rgba(13, 17, 34, 0.85);
  --border: #1e2547;
  --accent: #00d4ff;
  --accent-2: #7b2cff;
  --accent-3: #ff2d95;
  --text: #d7e3ff;
  --muted: #7c86a8;
  --danger: #ff4d6d;
  --success: #2dffb2;
  --radius: 12px;
}

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

html, body { height: 100%; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 15% -10%, #141a4d 0%, transparent 55%),
    radial-gradient(ellipse at 90% 110%, #2a1145 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ---------- Sternenhimmel ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 25% 15%, #fff, transparent),
    radial-gradient(1px 1px at 65% 35%, #cfe8ff, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent),
    radial-gradient(1px 1px at 80% 60%, #ffd9f2, transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, #fff, transparent),
    radial-gradient(1px 1px at 55% 90%, #cfe8ff, transparent),
    radial-gradient(1px 1px at 90% 15%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70% 85%, #ffd9f2, transparent),
    radial-gradient(1px 1px at 15% 45%, #fff, transparent),
    radial-gradient(1px 1px at 85% 45%, #cfe8ff, transparent);
}

/* ---------- Layout ---------- */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ---------- Kopfzeile ---------- */
.topbar {
  padding: 16px 0;
  border-bottom: 1px solid rgba(30, 37, 71, 0.6);
  background: rgba(5, 6, 15, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.logo b { color: var(--accent); }
.logo:hover { text-decoration: none; }

.nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.nav-user {
  color: var(--muted);
  font-size: 0.9rem;
  padding-right: 8px;
  border-right: 1px solid var(--border);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 26px rgba(0, 212, 255, 0.55); }

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: rgba(13, 17, 34, 0.5);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--text); }

.btn-lg { padding: 14px 30px; font-size: 1.05rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Landing (Hero) ---------- */
.hero {
  text-align: center;
  padding: 90px 0 60px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.15;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 34px;
  line-height: 1.6;
}

.hero-actions, .hero-loggedin { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-loggedin {
  flex-direction: column;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.hero-loggedin p { margin-bottom: 14px; color: var(--muted); }

/* ---------- Feature-Karten ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 30px 0 70px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card p { color: var(--muted); line-height: 1.5; font-size: 0.95rem; }

/* ---------- Auth-Seiten ---------- */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-card h2 { margin-bottom: 4px; }
.auth-hint { color: var(--muted); margin-bottom: 22px; font-size: 0.95rem; }

.auth-card label {
  display: block;
  margin: 16px 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-card input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0d1f;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.form-error {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.4);
  color: var(--danger);
  font-size: 0.9rem;
}

.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ---------- Interner Bereich / Spacemap ---------- */
.spacemap-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.spacemap-online, .spacemap-offline {
  width: min(560px, 100%);
  text-align: center;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}
.spacemap-online { border-color: rgba(45, 255, 178, 0.5); }
.spacemap-offline { border-color: rgba(255, 77, 109, 0.5); }

.spacemap-online h2, .spacemap-offline h2 { margin-bottom: 12px; }
.spacemap-online p, .spacemap-offline p { color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.spacemap-offline .btn { margin-top: 12px; }

.spacemap-loading {
  text-align: center;
  color: var(--muted);
}
.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fußzeile ---------- */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(30, 37, 71, 0.6);
  position: relative;
  z-index: 1;
}

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 600px) {
  .hero { padding: 60px 0 40px; }
  .topbar-inner { justify-content: center; }
  .nav { justify-content: center; }
}

/* ---------- Firmenauswahl (company.php) ---------- */
.company-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
}

.company-panel {
  width: min(820px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.company-panel h2 { margin-bottom: 4px; }
.company-user { color: var(--muted); margin-top: 6px; font-size: 0.9rem; }
.company-hint { color: var(--muted); margin: 12px auto 28px; max-width: 540px; line-height: 1.6; }

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 18px;
  background: #0a0d1f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.company-card:hover { transform: translateY(-3px); }

.company-card .company-tag { font-size: 1.7rem; font-weight: 800; letter-spacing: 1px; }
.company-card strong { font-size: 1rem; }
.company-card .company-desc { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.company-mmo .company-tag { color: #ff6b4a; }
.company-eic .company-tag { color: #4aa8ff; }
.company-vru .company-tag { color: #ffd166; }

.company-mmo:hover { border-color: #ff6b4a; box-shadow: 0 0 22px rgba(255, 107, 74, 0.25); }
.company-eic:hover { border-color: #4aa8ff; box-shadow: 0 0 22px rgba(74, 168, 255, 0.25); }
.company-vru:hover { border-color: #ffd166; box-shadow: 0 0 22px rgba(255, 209, 102, 0.25); }

/* ---------- Interne Navigation (nur im internen Bereich) ---------- */
.internav-bar {
  background: rgba(0, 0, 0, 0.45);   /* schwarz, transparent – volle Breite */
  border-top: 1px solid rgba(30, 37, 71, 0.5);
  margin-top: 14px;
  padding: 8px 0;
}

.internav {
  display: flex;
  justify-content: center;   /* Navigationspunkte zentriert */
  gap: 6px;
  flex-wrap: wrap;
}

.internav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.3px;
  transition: color 0.12s ease, background 0.12s ease;
}
.internav-link:hover {
  color: var(--text);
  background: rgba(13, 17, 34, 0.6);
  text-decoration: none;
}
.internav-link.active {
  color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
}

/* START – grüner „Launch"-Button */
.internav-start {
  background: linear-gradient(135deg, #2fdd6f, #1ea85a);
  color: #04180b;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(47, 221, 111, 0.35);
}
.internav-start:hover {
  color: #04180b;
  box-shadow: 0 0 18px rgba(47, 221, 111, 0.55);
}
.internav-start.active {
  box-shadow: 0 0 0 2px rgba(47, 221, 111, 0.6), 0 0 18px rgba(47, 221, 111, 0.5);
}

/* ---------- Platzhalter-Seiten (Inhalt folgt) ---------- */
.intern-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

.intern-placeholder {
  width: min(560px, 100%);
  text-align: center;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--panel);
  color: var(--muted);
}
.intern-placeholder h2 { color: var(--text); margin-bottom: 10px; }
.intern-placeholder p { line-height: 1.6; }

/* ---------- Home: 4-teiliges Dashboard ---------- */
.dashboard-wrap {
  padding: 30px 0 60px;
}

.dashboard-status {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.9rem;
  color: var(--muted);
}
.dashboard-status .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.dashboard-status.online .status-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dashboard-status.offline .status-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.dashboard-status strong { color: var(--text); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.panel-empty { color: var(--muted); font-size: 0.92rem; }

/* Pilot Bio */
.bio-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(30, 37, 71, 0.5);
}
.bio-row:last-child { border-bottom: none; }
.bio-row .label { color: var(--muted); font-size: 0.9rem; }
.bio-row .value { font-weight: 600; }

.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-mmo  { background: rgba(255, 107, 74, 0.16);  color: #ff6b4a; }
.badge-eic  { background: rgba(74, 168, 255, 0.16);  color: #4aa8ff; }
.badge-vru  { background: rgba(255, 209, 102, 0.16); color: #ffd166; }
.badge-premium  { background: rgba(255, 209, 102, 0.16); color: #ffd166; }
.badge-standard { background: rgba(124, 134, 168, 0.16); color: var(--muted); }

/* News */
.news-item {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(30, 37, 71, 0.5);
}
.news-item:last-child { border-bottom: none; }
.news-item h3 { font-size: 0.98rem; margin-bottom: 4px; color: var(--accent); }
.news-item p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.news-item time { display: block; margin-top: 6px; color: var(--muted); font-size: 0.78rem; }

/* Hall of Fame */
.hof-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(30, 37, 71, 0.5);
}
.hof-row:last-child { border-bottom: none; }
.hof-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.hof-rank.top1 { background: rgba(255, 209, 102, 0.2); color: #ffd166; }
.hof-rank.top2 { background: rgba(200, 210, 220, 0.16); color: #c8d2dc; }
.hof-rank.top3 { background: rgba(205, 127, 50, 0.18); color: #cd7f32; }
.hof-name { flex: 1; font-size: 0.92rem; }
.hof-name small { color: var(--muted); }
.hof-points { font-weight: 700; color: #ffd166; font-size: 0.88rem; }

/* Logbuch */
.log-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(30, 37, 71, 0.5);
  font-size: 0.88rem;
  color: var(--muted);
}
.log-row:last-child { border-bottom: none; }
.log-killer { color: var(--text); font-weight: 600; }
.log-victim { color: var(--danger); font-weight: 600; }
.log-ship { color: var(--muted); font-size: 0.8rem; }
.log-row time { margin-left: auto; font-size: 0.78rem; }

@media (max-width: 800px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ---------- Währungs-Leiste (unter der Navigation) ---------- */
.currency-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(13, 17, 34, 0.6);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.currency-item strong { font-weight: 700; }
.currency-item .c-id { color: var(--text); }
.currency-item .c-credits { color: #ffd166; }
.currency-item .c-uridium { color: #c58aff; }