/* ============================================================
   Firedancer Gildenportal – Design-System
   Dunkles WoW-Fantasy-Theme, angelehnt an Battle.net / Arsenal.
   Aufbau: 1 Tokens · 2 Basis · 3 Layout · 4 Navigation · 5 Hero
           6 Komponenten (Buttons, Cards, Panels, Tabellen, Badges,
           Suche, Tooltip, Modal, Spinner, Empty State)
           7 Arsenal/Equipment · 8 Footer · 9 Responsive
   ============================================================ */

/* ── 1. Design-Tokens ── */
:root {
  /* Flächen */
  --bg-0: #0a0c11;            /* Seitenhintergrund */
  --bg-1: #11141d;            /* Panels */
  --bg-2: #181c28;            /* erhöhte Flächen, Hover */
  --bg-3: #20253493;          /* Tabellenzeilen-Hover */

  /* Gold-Akzente (Blizzard-Gold) */
  --gold: #c8aa6e;
  --gold-bright: #ffd166;
  --gold-dim: #8a7549;

  /* Text */
  --text: #e8e2d4;
  --text-muted: #9a937f;

  /* Ränder & Effekte */
  --border: rgba(200, 170, 110, 0.22);
  --border-strong: rgba(200, 170, 110, 0.45);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  --glow-gold: 0 0 18px rgba(255, 209, 102, 0.25);

  /* Fraktionen */
  --horde: #b30000;
  --horde-bright: #ff4d3d;
  --alliance: #0a3d91;
  --alliance-bright: #4da6ff;

  /* Itemqualitäten */
  --q-poor: #9d9d9d;  --q-common: #ffffff;  --q-uncommon: #1eff00;
  --q-rare: #0070dd;  --q-epic: #a335ee;    --q-legendary: #ff8000;
  --q-artifact: #e6cc80; --q-heirloom: #00ccff;

  /* Typografie */
  --font-display: 'Cinzel', 'Palatino Linotype', serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius: 6px;
  --nav-height: 64px;
}

/* ── 2. Basis ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(200, 170, 110, 0.07), transparent),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(80, 30, 30, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(20, 40, 90, 0.12), transparent),
    var(--bg-0);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
  margin: 0 0 0.5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

a { color: var(--gold-bright); text-decoration: none; transition: color 0.15s; }
a:hover { color: #ffe49a; }

p { margin: 0 0 0.8em; }
img { max-width: 100%; }

.muted { color: var(--text-muted); }
.text-gold { color: var(--gold-bright); }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--gold);
  color: #1a1408;
  padding: 8px 16px;
}
.skip-link:focus { left: 8px; }

/* ── 3. Layout ── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.page {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 56px;
  animation: fadeIn 0.35s ease both;
}

.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 0.15em; }
.page-head .muted { margin: 0; }

.grid {
  display: grid;
  gap: 18px;
}
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ── 4. Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 17, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--nav-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.35);
}
.brand:hover { color: #ffe49a; }
.brand-emblem { width: 28px; height: 28px; color: var(--gold); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.95rem;
  border-radius: var(--radius);
  position: relative;
  transition: color 0.15s, background 0.15s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s, transform 0.2s;
}
.nav-link:hover { color: var(--gold-bright); background: rgba(200, 170, 110, 0.07); }
.nav-link:hover::after, .nav-link.active::after { opacity: 1; transform: scaleX(1); }
.nav-link.active { color: var(--gold-bright); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  font-size: 0.85rem;
  color: var(--gold);
  border: 1px solid var(--border);
  background: var(--bg-1);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* Hamburger (nur Mobile sichtbar) */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ── 5. Hero (Startseite) ── */
.hero {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2.2fr) minmax(180px, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 40px 0 24px;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 12px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.35em;
  background: linear-gradient(180deg, #ffe9b0 0%, var(--gold-bright) 45%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 190, 80, 0.35);
  animation: heroGlow 4s ease-in-out infinite alternate;
}
.hero-title small {
  display: block;
  font-size: 0.38em;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
  margin-bottom: 0.6em;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 38ch;
  margin: 0 auto 1.6em;
}

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

/* Fraktionsbanner: hängende Banner mit Spitze unten */
.faction-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 340px;
  padding: 36px 16px 64px;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
  border-top: 3px solid var(--gold);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.faction-banner::before {
  /* Innenrahmen in Gold */
  content: '';
  position: absolute;
  inset: 10px;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
  border: 1px solid rgba(255, 215, 130, 0.35);
  pointer-events: none;
}
.faction-banner:hover { transform: translateY(6px) scale(1.02); }

.banner-horde {
  background:
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(255, 90, 60, 0.25), transparent),
    linear-gradient(180deg, #4a0a08 0%, #2a0505 60%, #1a0303 100%);
}
.banner-horde:hover { filter: drop-shadow(0 0 22px rgba(255, 70, 40, 0.45)); }

.banner-alliance {
  background:
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(90, 150, 255, 0.25), transparent),
    linear-gradient(180deg, #0a1f4a 0%, #06122e 60%, #040b1d 100%);
}
.banner-alliance:hover { filter: drop-shadow(0 0 22px rgba(70, 130, 255, 0.45)); }

.faction-emblem {
  width: clamp(90px, 10vw, 130px);
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.35s ease;
}
.faction-banner:hover .faction-emblem { transform: scale(1.08); animation: emblemFloat 2.6s ease-in-out infinite; }

.faction-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.banner-horde .faction-name { color: var(--horde-bright); text-shadow: 0 0 14px rgba(255, 77, 61, 0.5); }
.banner-alliance .faction-name { color: var(--alliance-bright); text-shadow: 0 0 14px rgba(77, 166, 255, 0.5); }

/* ── 6. Komponenten ── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s, color 0.15s;
}
.btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  color: #221a08;
  background: linear-gradient(180deg, #ffe082 0%, var(--gold-bright) 40%, #c89b3c 100%);
  border-color: #e8c372;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-gold:hover {
  color: #221a08;
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.5);
  filter: brightness(1.06);
}

.btn-ghost { background: transparent; border-color: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-danger { border-color: rgba(196, 30, 58, 0.6); }
.btn-danger:hover { color: #ff6b6b; border-color: #c41e3a; box-shadow: 0 0 18px rgba(196, 30, 58, 0.35); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* Panels & Cards */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 22px 24px;
}
/* Goldene Eck-Ornamente */
.panel::before, .panel::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold-dim);
  border-style: solid;
  pointer-events: none;
}
.panel::before { top: 5px; left: 5px; border-width: 1px 0 0 1px; }
.panel::after { bottom: 5px; right: 5px; border-width: 0 1px 1px 0; }

.panel-title {
  margin: -4px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent, var(--gold-dim));
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  border-left-color: var(--card-accent, var(--gold));
  box-shadow: var(--shadow), var(--glow-gold);
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}
.card-meta { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.card-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Stat-Karten (Dashboard) */
.stat-card { text-align: center; }
.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 16px rgba(255, 209, 102, 0.3);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-1);
}
.table th {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-align: left;
  padding: 12px 16px;
  background: rgba(200, 170, 110, 0.06);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(200, 170, 110, 0.1);
  vertical-align: middle;
}
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--bg-3); }
.table tbody tr:last-child td { border-bottom: none; }

.rank-cell {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  width: 56px;
  text-align: center;
}
tr:first-child .rank-cell { color: var(--gold-bright); text-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--gold-bright);
  white-space: nowrap;
}
.badge-ilvl {
  font-family: var(--font-display);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.15);
}
.badge-muted { color: var(--text-muted); border-color: var(--border); }
.badge-role-admin { color: var(--q-legendary); border-color: rgba(255, 128, 0, 0.6); }
.badge-role-raidlead { color: var(--gold-bright); border-color: var(--gold); }

/* Auswahlfelder (Selects) */
.select {
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}

/* Formulare (z. B. Gruppen anlegen/bearbeiten) */
.form-grid { display: grid; gap: 14px; max-width: 560px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; }
.form-grid label > span:first-child { font-size: 0.85rem; color: var(--text-muted); }
.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-inline label { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.form-inline .grow { flex: 1 1 280px; }

.form-grid input[type="text"],
.form-grid input[type="number"],
.form-grid select,
.form-grid textarea,
.form-inline select,
.form-inline input[type="text"],
.form-inline input[type="number"] {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-grid input[type="text"]:focus,
.form-grid input[type="number"]:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.form-inline select:focus,
.form-inline input[type="text"]:focus,
.form-inline input[type="number"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}
.form-grid textarea { resize: vertical; }

/* Hinweis-/Fehlerboxen in Formularen */
.form-error { color: #ff6b6b; margin: 0 0 12px; }
/* Einladungslink zum Kopieren */
.invite-link { font-family: monospace; word-break: break-all; user-select: all; }

/* Verlinkter Kartentitel (z. B. Gruppen-Übersicht) */
.card-title a { color: var(--gold-bright); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }

/* Abschnittsüberschrift (z. B. Kommende/Vergangene Raids) */
.section-head {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin: 0 0 12px;
}
.grid-cards.is-past { opacity: 0.7; }

/* Raid-Aufstellung */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.roster-head {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.roster-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.signup-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius);
}
.signup-entry:hover { background: var(--bg-1); }
.signup-info { display: flex; flex-direction: column; min-width: 0; }
.signup-name { font-weight: 600; }
.signup-meta { font-size: 0.78rem; color: var(--text-muted); }
.signup-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* Boss-Guides */
.boss-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.boss-item {
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.boss-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.boss-name { font-family: var(--font-display); font-size: 1.05rem; }
.boss-note { margin: 8px 0 0; font-size: 0.9rem; color: var(--text); }
.boss-edit-toggle { margin-top: 8px; }
.boss-edit-toggle summary { cursor: pointer; color: var(--text-muted); font-size: 0.85rem; }
.boss-edit-toggle summary:hover { color: var(--gold); }

/* Suchfeld */
.search {
  position: relative;
  max-width: 340px;
}
.search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}
.search input::placeholder { color: var(--text-muted); }
.search::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-58%);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  pointer-events: none;
}
.search::after {
  content: '';
  position: absolute;
  left: 25px;
  top: 58%;
  width: 7px;
  height: 2px;
  background: var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

/* WoW-Tooltip */
.wow-tooltip {
  position: fixed;          /* wird per JS positioniert */
  z-index: 150;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.97), rgba(6, 8, 18, 0.97));
  border: 1px solid #4a5a7a;
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  font-size: 0.88rem;
  line-height: 1.45;
  color: #fff;
  pointer-events: none;
  text-align: left;
}
.wow-tooltip p { margin: 0 0 2px; }
.tt-name { font-size: 1.02rem; font-weight: 600; margin-bottom: 4px; }
.tt-namedesc { color: var(--gold-bright); font-size: 0.82rem; }
.tt-ilvl { color: var(--gold-bright); }
.tt-split { display: flex; justify-content: space-between; gap: 12px; }
.tt-green { color: #1eff00; }
.tt-gold { color: var(--gold-bright); margin-top: 4px; }
.tt-socket { color: var(--text-muted); padding-left: 14px; position: relative; }
.tt-socket::before {
  content: '';
  position: absolute;
  left: 0; top: 5px;
  width: 9px; height: 9px;
  border: 1px solid #777;
  background: #222;
}
.tt-transmog { color: #ff80ff; margin-top: 4px; font-style: italic; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 5, 9, 0.75);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease both;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow-gold);
  padding: 22px;
  animation: modalIn 0.22s ease both;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.modal-close:hover { color: var(--gold-bright); border-color: var(--gold); }
/* Tooltip-Inhalt im Modal: normal anzeigen statt fixed */
.modal-body .wow-tooltip {
  position: static;
  display: block !important;
  width: auto;
  border: none;
  box-shadow: none;
  background: none;
  padding: 0;
  pointer-events: auto;
}

/* Spinner & Lade-Overlay */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(200, 170, 110, 0.2);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(3px);
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}
.loading-overlay[hidden] { display: none; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  color: var(--gold-dim);
  opacity: 0.8;
}
.empty-state h3 { color: var(--gold); }
.empty-state p { max-width: 46ch; margin-left: auto; margin-right: auto; }
.empty-state .btn { margin-top: 12px; }

/* ── 7. Arsenal / Equipment-Ansicht ── */

/* Charakterkopf */
.char-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-bottom: 24px;
}
.char-header .char-name {
  font-size: 2.1rem;
  margin: 0;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
}
.char-subline { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-muted); font-size: 0.95rem; }
.char-subline .sep { color: var(--gold-dim); }
.char-header .header-badges { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.faction-tag {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.faction-tag.horde { color: var(--horde-bright); }
.faction-tag.alliance { color: var(--alliance-bright); }

.ilvl-big {
  text-align: center;
  padding: 8px 18px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(200, 170, 110, 0.07);
  box-shadow: var(--glow-gold);
}
.ilvl-big .stat-value { font-size: 1.7rem; }
.ilvl-big .stat-label { font-size: 0.68rem; }

/* Arsenal-Raster: Slots links/rechts, Modell mittig, Waffen unten */
.armory {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.7fr) minmax(220px, 1fr);
  grid-template-areas:
    "left model right"
    "left weapons right";
  gap: 8px 22px;
  align-items: start;
}
.armory-left { grid-area: left; }
.armory-right { grid-area: right; }
.armory-model { grid-area: model; }
.armory-weapons {
  grid-area: weapons;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.slot-col { display: flex; flex-direction: column; gap: 6px; }

.slot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px;
  border-radius: var(--radius);
}
/* Rechte Spalte gespiegelt: Icon außen, Text innen */
.slot-right { flex-direction: row-reverse; text-align: right; }
.slot-right .slot-text { align-items: flex-end; }

.slot {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--bg-1);
  border: 2px solid #3a3528;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; display: block; }
.slot:hover, .slot:focus-visible { transform: scale(1.07); z-index: 5; }

/* Qualitätsrahmen + Glow */
.q-POOR      { border-color: var(--q-poor); }
.q-COMMON    { border-color: var(--q-common); }
.q-UNCOMMON  { border-color: var(--q-uncommon); }
.q-RARE      { border-color: var(--q-rare); }
.q-EPIC      { border-color: var(--q-epic); }
.q-LEGENDARY { border-color: var(--q-legendary); }
.q-ARTIFACT  { border-color: var(--q-artifact); }
.q-HEIRLOOM  { border-color: var(--q-heirloom); }
.q-RARE:hover, .q-RARE:focus-visible           { box-shadow: 0 0 14px rgba(0, 112, 221, 0.6); }
.q-EPIC:hover, .q-EPIC:focus-visible           { box-shadow: 0 0 14px rgba(163, 53, 238, 0.6); }
.q-LEGENDARY:hover, .q-LEGENDARY:focus-visible { box-shadow: 0 0 14px rgba(255, 128, 0, 0.6); }
.q-UNCOMMON:hover, .q-UNCOMMON:focus-visible   { box-shadow: 0 0 14px rgba(30, 255, 0, 0.45); }

.slot-empty { opacity: 0.45; cursor: default; border-style: dashed; }
.slot-fallback {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-dim);
}

.slot-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.slot-item-name {
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Charaktermodell / Portrait */
.armory-model {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, var(--class-glow, rgba(200, 170, 110, 0.18)), transparent 70%),
    linear-gradient(180deg, #121622 0%, #0a0c13 100%);
  box-shadow: var(--shadow), inset 0 0 60px rgba(0, 0, 0, 0.6);
}
.armory-model img {
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.7));
  animation: fadeIn 0.5s ease both;
}
.model-placeholder {
  align-self: center;
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}
.model-placeholder .placeholder-initial {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--class-color, var(--gold));
  text-shadow: 0 0 40px var(--class-glow, rgba(200, 170, 110, 0.4));
}

/* Reiter (Tabs) */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Untergeordnete Reiter (z. B. die einzelnen Raids im Raid-Bosse-Tab) */
.tabs-sub { margin-bottom: 12px; }
.tabs-sub .tab { font-size: 0.85rem; padding: 8px 12px; }

/* Sortierbare Tabellen-Überschriften */
th.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable-th:hover { color: var(--gold); }
th.sortable-th::after {
  content: "⇅";
  font-size: 0.75em;
  opacity: 0.35;
  margin-left: 5px;
}
th.sortable-th[data-dir="asc"]::after  { content: "▲"; opacity: 0.9; color: var(--gold); }
th.sortable-th[data-dir="desc"]::after { content: "▼"; opacity: 0.9; color: var(--gold); }

/* Mythic+: Wertungsbox im Charakterkopf */
.mplus-big .stat-value { font-size: 1.7rem; }

/* Mythic+: beste Keys (Panel unter dem Arsenal) */
.mplus-panel { margin-top: 22px; }
.mplus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mplus-run {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius);
}
.mplus-run.timed { border-left-color: var(--q-uncommon); }
.mplus-level {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 2.6em;
}
.mplus-dungeon { flex: 1; font-size: 0.9rem; }
.mplus-timed { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* ── 8. Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.8);
  padding: 22px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer p { margin: 0 0 4px; }

/* ── 9. Animationen ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroGlow {
  from { text-shadow: 0 0 24px rgba(255, 190, 80, 0.25); }
  to   { text-shadow: 0 0 44px rgba(255, 190, 80, 0.5); }
}
@keyframes emblemFloat {
  0%, 100% { transform: scale(1.08) translateY(0); }
  50%      { transform: scale(1.08) translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── 10. Responsive ── */
@media (max-width: 980px) {
  /* Arsenal: Modell oben, Slot-Spalten darunter nebeneinander */
  .armory {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "model model"
      "left right"
      "weapons weapons";
  }
  .armory-model { min-height: 460px; }
}

@media (max-width: 820px) {
  /* Hero: Text zuerst, Banner darunter nebeneinander */
  .hero { grid-template-columns: 1fr 1fr; padding-top: 16px; }
  .hero-center { grid-column: 1 / -1; grid-row: 1; }
  .faction-banner { min-height: 240px; }

  /* Navigation: Hamburger */
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 20px 20px;
    background: rgba(10, 12, 17, 0.98);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  }
  .nav-menu.open { display: flex; animation: fadeIn 0.2s ease both; }
  .nav-links { flex-direction: column; gap: 2px; }
  .nav-link { padding: 12px 14px; }
  .nav-link::after { display: none; }
  .nav-link.active { background: rgba(200, 170, 110, 0.1); }
  .nav-user { justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--border); }
}

@media (max-width: 560px) {
  .armory { grid-template-columns: 1fr; grid-template-areas: "model" "left" "right" "weapons"; }
  .slot-right { flex-direction: row; text-align: left; }
  .slot-right .slot-text { align-items: flex-start; }
  .char-header .header-badges { margin-left: 0; }
  .hero { grid-template-columns: 1fr; }
  .faction-banner { min-height: 200px; }
  h1 { font-size: 1.6rem; }
}
