/* =========================================================
   Projekt: HelionForge
   Datei: /public/css/header.css

   Ziel:
   - AAA Sci-Fi Feeling (clean, nicht zu düster)
   - Farben an HelionForge-Logo anpassen (Steel + Ember)
   - Header + globale UI-Basics (Buttons, Layout-Container, Background)
   - Logo groß & mittig, darf nach unten raus
   - Subline entfernen

   UPDATE (2026-01-04):
   - Logged-in Nav links: Username | Nachrichten (+Badge placeholder) | Dashboard
   - Rechts: Logout
   - Fix: Logo über Divider/Bar
   - Modernisierung: Header-Navi NICHT als klobige Buttons, sondern als moderne, minimalistische Nav-Links
   - Badge-Placeholder IMMER sichtbar (bei 0 als kleiner Dot)
========================================================= */

/* ------------------------------
   Reset / Base
------------------------------ */
:root{
  /* Steel / Deep Space */
  --bg0:#070a12;
  --bg1:#0b1020;

  /* Panels / Borders */
  --panel: rgba(255,255,255,.055);
  --panel2: rgba(255,255,255,.075);
  --border: rgba(255,255,255,.12);
  --border2: rgba(255,255,255,.18);

  /* Text */
  --text:#eef1ff;
  --muted: rgba(238,241,255,.72);

  /* HelionForge accents (Ember) */
  --ember:#ff7a1a;
  --ember2:#ffb14a;
  --steel:#cfd6e6;
  --gold:#f1c76d;

  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --radius: 18px;

  --w: 1160px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;

  font-family: "Rajdhani","Orbitron","Oxanium", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 500;
  color: var(--text);

  background:
    radial-gradient(1100px 680px at 18% 6%, rgba(255,122,26,.14), transparent 58%),
    radial-gradient(900px 600px at 82% 12%, rgba(255,177,74,.10), transparent 58%),
    radial-gradient(900px 780px at 50% 112%, rgba(241,199,109,.08), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));

  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
strong{ font-weight:800; }

/* ------------------------------
   Background layers
------------------------------ */
.bg-layer{
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 0;
}

.bg-stars{
  opacity:.34;
  background-image:
    radial-gradient(2px 2px at 15% 20%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 35% 65%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(1px 1px at 62% 32%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(2px 2px at 78% 72%, rgba(255,255,255,.20), transparent 60%),
    radial-gradient(1px 1px at 88% 28%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(1px 1px at 22% 82%, rgba(255,255,255,.16), transparent 60%);
  background-size: 100% 100%;
  filter: blur(.1px);
}

.bg-glow{
  opacity: .95;
  background:
    radial-gradient(740px 560px at 15% 0%, rgba(255,122,26,.10), transparent 62%),
    radial-gradient(740px 560px at 85% 0%, rgba(255,177,74,.08), transparent 62%),
    radial-gradient(980px 760px at 50% 115%, rgba(241,199,109,.06), transparent 62%);
}

/* ------------------------------
   Global layout shell
------------------------------ */
.page{
  position: relative;
  z-index: 1;
}

.page-shell{
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 18px 48px;
}

/* ------------------------------
   Buttons (global – bleiben fürs Rest-UI)
------------------------------ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  height: 42px;
  padding: 0 16px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);

  color: var(--text);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;

  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease, filter .12s ease;
  user-select:none;
  white-space:nowrap;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
}
.btn:active{ transform: translateY(0); }

.btn-primary{
  border-color: rgba(255,122,26,.42);
  background: linear-gradient(180deg, rgba(255,122,26,.26), rgba(255,122,26,.12));
  box-shadow:
    0 0 0 1px rgba(255,122,26,.10),
    0 18px 45px rgba(255,122,26,.12);
}

.btn-primary:hover{
  border-color: rgba(255,177,74,.52);
  box-shadow:
    0 0 0 1px rgba(255,177,74,.14),
    0 22px 60px rgba(255,122,26,.16);
}

.btn-ghost{ background: rgba(255,255,255,.02); }

/* ------------------------------
   Header
------------------------------ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  background:
    radial-gradient(900px 260px at 50% -80px, rgba(255,122,26,.14), transparent 60%),
    linear-gradient(180deg, rgba(10,14,26,.78), rgba(10,14,26,.55));

  border-bottom: 1px solid rgba(255,255,255,.10);

  isolation: isolate;
  overflow: visible;
}

.header-shell{
  max-width: var(--w);
  margin: 0 auto;
  padding: 16px 18px 34px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;

  position: relative;
  z-index: 2;
}

.header-side{
  display:flex;
  align-items:center;
  min-height: 64px;

  position: relative;
  z-index: 3;
}

.header-left{ justify-content:flex-start; }
.header-right{ justify-content:flex-end; }

.header-center{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  height: 64px;

  position: relative;
  z-index: 4;
}

/* BRAND: bleibt wie gehabt */
.brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;

  position: relative;
  transform: translateY(34px);

  z-index: 999;
}

.brand:hover{ filter: brightness(1.04); }

.brand-logo{
  width: 300px;
  height: auto;
  max-width: 360px;

  position: relative;
  z-index: 1000;

  filter:
    drop-shadow(0 18px 35px rgba(0,0,0,.58))
    drop-shadow(0 0 26px rgba(255,122,26,.14))
    drop-shadow(0 0 18px rgba(255,177,74,.10));
}

/* Subline komplett raus */
.brand-subline{ display:none !important; }
.chip{ display:none !important; }
.header-center .dot{ display:none !important; }

/* Divider: absolut unten, garantiert unter dem Logo */
.header-divider{
  height: 2px;
  background:
    linear-gradient(90deg,
      transparent,
      rgba(255,122,26,.55),
      rgba(241,199,109,.35),
      rgba(207,214,230,.18),
      transparent
    );
  opacity: .92;

  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 1;
  pointer-events: none;
}

/* ------------------------------
   Header Nav (AAA / Modern Minimal)
   - keine Umrandung
   - keine klobigen Buttons
   - clean hover + underline glow
------------------------------ */
.header-actions{
  display:flex;
  align-items:center;
  gap: 18px;

  /* keine Bar / keine Umrandung */
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.header-actions--left{
  gap: 18px;
}

/* Header: Buttons werden zu NAV-Links (Override nur im Header!) */
.site-header .btn{
  height: auto;
  padding: 8px 2px;

  border: 0;
  background: transparent;
  box-shadow: none;

  border-radius: 0;

  text-transform: none;
  letter-spacing: .01em;
  font-weight: 800;
  font-size: 15px;

  color: rgba(238,241,255,.88);

  position: relative;
  transform: none;
}

/* Hover: moderne underline + leichter glow */
.site-header .btn::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -6px;

  height: 2px;
  border-radius: 2px;

  background: linear-gradient(90deg,
    transparent,
    rgba(255,122,26,.55),
    rgba(241,199,109,.30),
    transparent
  );

  opacity: 0;
  transform: translateY(2px);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events:none;
}

.site-header .btn:hover{
  color: rgba(255,255,255,.96);
  filter: none;
}

.site-header .btn:hover::after{
  opacity: 1;
  transform: translateY(0);
}

.site-header .btn:focus-visible{
  outline: none;
  color: rgba(255,255,255,.98);
}
.site-header .btn:focus-visible::after{
  opacity: 1;
  transform: translateY(0);
}

/* Dashboard: als “AAA CTA” aber modern und nicht fett */
.site-header .btn-primary{
  padding: 9px 14px;
  border-radius: 999px;

  background: linear-gradient(180deg, rgba(255,122,26,.18), rgba(255,122,26,.06));
  border: 1px solid rgba(255,122,26,.22);

  color: rgba(255,255,255,.96);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 18px 44px rgba(255,122,26,.10);
}

.site-header .btn-primary::after{
  /* underline bei CTA aus */
  display:none;
}

.site-header .btn-primary:hover{
  border-color: rgba(255,177,74,.32);
  background: linear-gradient(180deg, rgba(255,177,74,.16), rgba(255,122,26,.06));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 22px 60px rgba(255,122,26,.14);
}

/* Ghost im Header = gleich wie Link */
.site-header .btn-ghost{
  background: transparent;
}

/* Username leicht “stärker” */
.header-link--user{
  color: rgba(238,241,255,.95);
}

/* Logout rechts: minimal “muted”, wird beim Hover hell */
.header-link--logout{
  color: rgba(238,241,255,.72);
}
.header-link--logout:hover{
  color: rgba(255,255,255,.96);
}

/* ------------------------------
   Nachrichten Badge (Placeholder immer da)
   - Bei 0: kleiner Dot
   - Bei >0: Zahl als Badge
------------------------------ */
.nav-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin-left: 8px;

  min-width: 18px;
  height: 16px;
  padding: 0 6px;

  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;

  color: rgba(8,10,16,.95);
  background: linear-gradient(180deg, rgba(255,177,74,.92), rgba(255,122,26,.82));
  border: 1px solid rgba(255,255,255,.18);

  box-shadow:
    0 0 0 1px rgba(255,122,26,.08),
    0 10px 22px rgba(255,122,26,.14);

  transform: translateY(-1px);
  position: relative;
}

/* Placeholder bei 0: DOT statt "0" */
.nav-badge[data-unread-count="0"]{
  min-width: 12px;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: none;

  color: transparent; /* Text (0) unsichtbar */
}

.nav-badge[data-unread-count="0"]::before{
  content:"";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
}

/* ------------------------------
   Responsive
------------------------------ */
@media (max-width: 860px){
  .header-shell{
    grid-template-columns: 1fr;
    padding: 14px 14px 30px;
  }

  .header-left{ display:none; }

  .header-center{ height: 56px; }

  .brand{ transform: translateY(26px); }

  .brand-logo{
    width: 240px;
    max-width: 300px;
  }

  .header-right{
    justify-content:center;
    min-height:auto;
    margin-top: 12px;
  }

  .header-actions{
    flex-wrap: wrap;
    justify-content:center;
    gap: 14px;
  }

  .site-header .btn{
    padding: 10px 4px;
  }

  .site-header .btn-primary{
    padding: 10px 16px;
  }
}

@media (max-width: 420px){
  .brand{ transform: translateY(20px); }

  .brand-logo{
    width: 200px;
    max-width: 250px;
  }
}
