/* ================================================================
   MOST WANTED – Gilden-Raidplaner (TBC Anniversary)
   Schwarz/Gold, dick, fett, glühend. 💀⚔️
   ================================================================ */

:root {
  --bg: #050810;
  --bg-2: #080d18;
  --panel: #0b111e;
  --panel-2: #101a2c;
  --panel-3: #16233a;
  --border: #1c2a47;
  --border-soft: #16213a;
  --text: #f0f1f7;
  --dim: #9a9db4;
  --faint: #62657e;
  --gold: #f0c14b;
  --gold-2: #ffdf8e;
  --gold-deep: #b8892a;
  --gold-soft: rgba(240, 193, 75, 0.14);
  --green: #4cc46a;
  --amber: #e8a33d;
  --red: #e05c5c;
  --arcane: #4aa8ff;
  --tank: #4a90d9;
  --offtank: #7fb8e6;
  --heal: #4cc46a;
  --dd: #e05c5c;
  --range: #e8925c;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  --glow-gold: 0 0 22px rgba(240, 193, 75, 0.25);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, Inter, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  background:
    radial-gradient(900px 420px at 12% -80px, rgba(74, 168, 255, 0.13) 0%, transparent 60%),
    radial-gradient(1100px 520px at 88% -120px, rgba(240, 193, 75, 0.1) 0%, transparent 60%),
    radial-gradient(1400px 800px at 50% 120%, #0a1224 0%, transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font-family: inherit; }

::-webkit-scrollbar { width: 9px; height: 7px; }
::-webkit-scrollbar-thumb { background: #26263a; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

.ic { display: inline-flex; }
.ic svg { width: 1em; height: 1em; fill: currentColor; display: block; }

/* ---------- Glut-Partikel im Hintergrund ---------- */

.embers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.embers span {
  position: absolute;
  bottom: -12px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  filter: blur(0.5px);
  animation: emberRise linear infinite;
}
.embers span:nth-child(1) { left: 6%; animation-duration: 16s; animation-delay: 0s; }
.embers span:nth-child(2) { left: 14%; animation-duration: 21s; animation-delay: 4s; width: 3px; height: 3px; }
.embers span:nth-child(3) { left: 24%; animation-duration: 18s; animation-delay: 9s; background: var(--arcane); }
.embers span:nth-child(4) { left: 33%; animation-duration: 24s; animation-delay: 2s; width: 4px; height: 4px; }
.embers span:nth-child(5) { left: 41%; animation-duration: 15s; animation-delay: 12s; }
.embers span:nth-child(6) { left: 52%; animation-duration: 22s; animation-delay: 6s; width: 3px; height: 3px; background: var(--arcane); }
.embers span:nth-child(7) { left: 61%; animation-duration: 17s; animation-delay: 10s; }
.embers span:nth-child(8) { left: 69%; animation-duration: 25s; animation-delay: 1s; width: 4px; height: 4px; }
.embers span:nth-child(9) { left: 77%; animation-duration: 19s; animation-delay: 8s; }
.embers span:nth-child(10) { left: 85%; animation-duration: 23s; animation-delay: 5s; background: var(--arcane); width: 3px; height: 3px; }
.embers span:nth-child(11) { left: 92%; animation-duration: 16s; animation-delay: 13s; }
.embers span:nth-child(12) { left: 48%; animation-duration: 27s; animation-delay: 3s; width: 6px; height: 6px; }

@keyframes emberRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: 0.55; }
  60% { opacity: 0.3; }
  100% { transform: translateY(-105vh) translateX(30px); opacity: 0; }
}

main, header.appbar { position: relative; z-index: 1; }

/* ---------- App-Bar mit fettem Branding ---------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
  padding: 0 22px;
  background: rgba(8, 8, 14, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(240, 193, 75, 0.18);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand-logo {
  height: 48px;
  width: auto;
  border-radius: 8px;
  filter: drop-shadow(0 0 12px rgba(74, 168, 255, 0.5));
}
.brand-skull {
  font-size: 30px;
  filter: drop-shadow(0 0 10px rgba(240, 193, 75, 0.5));
  animation: skullPulse 3.2s ease-in-out infinite;
}
@keyframes skullPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(240, 193, 75, 0.35);
}
.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.mainnav {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s;
}
.nav-tab:hover { color: var(--text); border-color: #3a3a56; }
.nav-tab.active {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  border-color: var(--gold);
  color: #1c1305;
  box-shadow: var(--glow-gold), 0 4px 14px rgba(0, 0, 0, 0.4);
  text-shadow: none;
}
.nav-tab .ic { font-size: 15px; }

.appbar-right { display: flex; align-items: center; gap: 12px; }

/* ---------- Lofi-Musik-Steuerung ---------- */

.music {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  transition: border-color 0.15s, opacity 0.15s;
}
.music:hover { border-color: #333b50; }
.music.muted { opacity: 0.6; }

.music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 15px;
  transition: color 0.15s, background 0.15s;
}
.music-btn:hover { background: rgba(240, 193, 75, 0.12); }
.music-btn.off { color: var(--faint); }
.music-btn .ic svg { width: 16px; height: 16px; }

.music-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 74px;
  height: 16px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.music-vol::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: #23233a;
}
.music-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #0b0b12;
  margin-top: -4px;
  box-shadow: 0 0 6px rgba(240, 193, 75, 0.5);
}
.music-vol::-moz-range-track { height: 4px; border-radius: 2px; background: #23233a; }
.music-vol::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); border: 2px solid #0b0b12;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  cursor: default;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 196, 106, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(76, 196, 106, 0); }
}

/* Server nicht erreichbar (cmd-Fenster zu / Rechner aus) */
.live.off { color: var(--red); font-weight: 800; }
.live.off .live-dot {
  background: var(--red);
  animation: offPulse 1.1s ease-in-out infinite;
}
@keyframes offPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 92, 92, 0.7); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(224, 92, 92, 0); opacity: 0.45; }
}

/* ---------- Views ---------- */

.view { display: none; }
.view.active { display: block; }

main {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px 40px;
}

/* Hero-Header (Vortex / Roster) */
.hero {
  text-align: center;
  padding: 34px 16px 22px;
}
.hero h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(240, 193, 75, 0.3));
}
.hero p { margin: 8px 0 0; color: var(--dim); font-size: 14px; }

/* ---------- Raid- & Boss-Leiste ---------- */

.raidbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 2px 4px;
}

.raid-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.raid-pill:hover { color: var(--text); border-color: #3a3a56; }
.raid-pill.active {
  background: var(--gold-soft);
  border-color: rgba(240, 193, 75, 0.65);
  color: var(--gold);
  box-shadow: var(--glow-gold);
}
.raid-pill.add { border-style: dashed; color: var(--faint); font-weight: 600; }
.raid-pill.add:hover { color: var(--gold); border-color: rgba(240, 193, 75, 0.5); }
.raid-pill.locked { border-style: dashed; opacity: 0.75; }
.raid-pill.locked.active { border-color: rgba(224, 92, 92, 0.55); }
.lock-ic { font-size: 11px; line-height: 1; }
.pill-act.active-lock { color: var(--red); opacity: 1; }

.phase-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--faint);
  font-weight: 600;
}
.raid-pill.active .phase-tag { background: rgba(240, 193, 75, 0.18); color: var(--gold-deep); }

.pill-act {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 5px;
  color: inherit;
  opacity: 0.65;
  font-size: 11px;
  cursor: pointer;
}
.pill-act:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.pill-act.danger:hover { color: var(--red); }

.bossbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
}

.nav-btn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--dim);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover { background: var(--panel-3); color: var(--gold); border-color: rgba(240, 193, 75, 0.4); }

.boss-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  scrollbar-width: none;
}
.boss-tabs::-webkit-scrollbar { display: none; }

.boss-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.boss-tab:hover { color: var(--text); border-color: #3a3a56; }
.boss-tab.active {
  background: linear-gradient(180deg, #232338, #1a1a2c);
  border-color: rgba(240, 193, 75, 0.7);
  color: var(--text);
  box-shadow: var(--glow-gold);
}
.boss-tab.add { border-style: dashed; color: var(--faint); background: transparent; font-weight: 600; }
.boss-tab.add:hover { color: var(--gold); border-color: rgba(240, 193, 75, 0.5); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.ok { background: var(--green); box-shadow: 0 0 8px rgba(76, 196, 106, 0.7); }
.status-dot.wip { background: var(--amber); box-shadow: 0 0 8px rgba(232, 163, 61, 0.6); }

.tab-counter {
  flex-shrink: 0;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
}

/* ---------- Layout & Cards ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 16px;
  padding-top: 10px;
  align-items: start;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, #0d0d16 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 6px 22px rgba(0, 0, 0, 0.35);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(240, 193, 75, 0.03);
}
.card-head h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-add {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(240, 193, 75, 0.4);
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.card-add:hover { background: var(--gold-soft); }
body.editing .card-add { display: flex; }

.card-body { padding: 10px 14px 12px; }

/* ---------- Stage ---------- */

.stage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.boss-title { margin: 0; font-size: 19px; font-weight: 900; letter-spacing: 0.01em; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.badge.ok { background: rgba(76, 196, 106, 0.12); color: var(--green); border: 1px solid rgba(76, 196, 106, 0.4); }
.badge.wip { background: rgba(232, 163, 61, 0.12); color: var(--amber); border: 1px solid rgba(232, 163, 61, 0.4); }
.badge.anim { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(240, 193, 75, 0.35); }
.badge.still { background: rgba(74, 168, 255, 0.12); color: var(--arcane); border: 1px solid rgba(74, 168, 255, 0.35); }

.stage-raid { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 600; }

.boss-name-input {
  background: #0c0c15;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  padding: 6px 12px;
  min-width: 0;
  flex: 0 1 320px;
}
.boss-name-input:focus { outline: none; border-color: rgba(240, 193, 75, 0.65); }

.canvas-wrap {
  position: relative;
  aspect-ratio: 8 / 5;
  background: #05050a;
}
#arenaCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
}
body.editing .canvas-wrap { box-shadow: inset 0 0 0 2px rgba(240, 193, 75, 0.45); }

.playback {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-top: 1px solid var(--border-soft);
}
body.editing .playback { opacity: 0.35; pointer-events: none; }

.pb-btn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--dim);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.pb-btn:hover { background: var(--panel-3); color: var(--text); }
.pb-btn:active { transform: scale(0.94); }
.pb-btn.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  border-color: var(--gold);
  color: #1c1305;
  box-shadow: var(--glow-gold);
}
.pb-btn.speed { width: auto; border-radius: 10px; padding: 0 12px; font-size: 11.5px; font-weight: 800; }
/* Namen-Schalter: gedimmt, wenn Namen ausgeblendet sind */
.pb-btn.off { opacity: 0.45; text-decoration: line-through; }

.timeline { position: relative; flex: 1; height: 28px; display: flex; align-items: center; }

.timeline input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.timeline input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) 0 var(--p, 0%), #23233a var(--p, 0%));
}
.timeline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold-2);
  border: 2px solid #0b0b12;
  margin-top: -4.5px;
  box-shadow: 0 0 10px rgba(240, 193, 75, 0.6);
}
.timeline input[type="range"]::-moz-range-track { height: 7px; border-radius: 4px; background: #23233a; }
.timeline input[type="range"]::-moz-range-progress { height: 7px; border-radius: 4px; background: var(--gold); }
.timeline input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold-2); border: 2px solid #0b0b12;
}

.phase-ticks { position: absolute; inset: 0; pointer-events: none; }
.phase-ticks .tick {
  position: absolute;
  top: 50%;
  width: 2px; height: 13px;
  background: rgba(240, 241, 247, 0.4);
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.time {
  flex-shrink: 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 88px;
  text-align: right;
}

/* ---------- Sidebar-Inhalte ---------- */

.sidebar { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.empty-hint { color: var(--faint); font-style: italic; font-size: 12px; padding: 2px 0; }

.group-head { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.group-head:first-child { margin-top: 2px; }
.group-title { font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.09em; color: var(--dim); }
.group-count { font-size: 10.5px; color: var(--faint); font-weight: 700; }

.role-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  color: #0b0b12;
  flex-shrink: 0;
}
.role-ic .ic svg { width: 12px; height: 12px; }
.role-ic.tank { background: var(--tank); }
.role-ic.offtank { background: var(--offtank); }
.role-ic.heal { background: var(--heal); }
.role-ic.melee { background: var(--dd); }
.role-ic.range { background: var(--range); }

.assign-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0 3px 28px; min-width: 0; }
.p-name { font-weight: 800; font-size: 13px; flex-shrink: 0; }
/* Gruppen-Marker (kein konkreter Spieler) */
.p-group {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--dim);
  font-style: italic;
}
.p-group::before {
  content: "◻ ";
  font-style: normal;
  color: var(--faint);
}
.p-note { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kill-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.kill-num {
  width: 21px; height: 21px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  color: #1c1305;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
  flex-shrink: 0;
}

.zone-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; min-width: 0; }
.zone-label { font-weight: 800; flex-shrink: 0; }
.zone-arrow { color: var(--faint); flex-shrink: 0; }
.zone-value { color: var(--dim); }

.role-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; min-width: 0; }
.role-label { font-weight: 800; color: var(--gold-2); flex-shrink: 0; }
.role-player { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-empty { color: var(--faint); font-style: italic; font-size: 12px; }

.todo-item { padding: 6px 0; }
.todo-item + .todo-item { border-top: 1px dashed var(--border-soft); }
.todo-title { font-weight: 800; font-size: 12.5px; color: var(--gold-2); }
.todo-text { color: var(--dim); font-size: 12px; margin-top: 1px; }

/* ---------- VORTEX-Liste ---------- */

.vortex-wrap { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* Kopf einer Material-Liste: Titel + Herkunfts-Hinweis + Plus */
.mat-card .card-head { gap: 10px; }
.mat-hint {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mat-card .card-add { margin-left: 8px; }

.vx-row {
  display: grid;
  grid-template-columns: 48px 1.15fr 1.5fr 1.35fr;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s;
}
.vx-row:last-child { border-bottom: none; }
.vx-row:hover { background: rgba(255, 255, 255, 0.02); }
.vx-row.done { opacity: 0.55; }

.vx-rank {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 900;
  background: var(--panel-3);
  color: var(--dim);
  border: 1px solid var(--border);
}
.vx-rank.r1 {
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  color: #1c1305;
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}
.vx-rank.r2 { background: linear-gradient(180deg, #e8e8f0, #9a9db4); color: #1a1a24; border-color: #c0c0d0; }
.vx-rank.r3 { background: linear-gradient(180deg, #e0a06a, #9a6236); color: #1c1305; border-color: #c08050; }

.vx-player { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vx-player .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.vx-player b { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vx-item { color: var(--dim); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.vx-prog { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vx-nums { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--dim); flex-shrink: 0; min-width: 52px; text-align: right; }
.vx-nums b { color: var(--gold); font-size: 17px; font-weight: 900; }
.vx-row.done .vx-nums b { color: var(--green); }

.vx-bar {
  flex: 1;
  height: 11px;
  border-radius: 6px;
  background: #1a1a2a;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  min-width: 60px;
}
.vx-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--gold-2));
  box-shadow: 0 0 10px rgba(240, 193, 75, 0.5);
  transition: width 0.3s;
}
.vx-row.done .vx-bar i { background: linear-gradient(90deg, #2a7a44, var(--green)); box-shadow: 0 0 10px rgba(76, 196, 106, 0.5); }

.vx-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 0.05em;
}

/* Vortex-Bearbeitung */
.vx-edit-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.vx-edit-row:last-child { border-bottom: none; }

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #0c0c15;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
}
.stepper button {
  width: 24px; height: 24px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.stepper button:hover { background: var(--panel-3); color: var(--gold); }
.stepper .val {
  min-width: 26px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stepper-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin: 0 2px 0 6px; }

/* ---------- ROSTER ---------- */

.roster-grid { max-width: 1100px; margin: 0 auto; }

.roster-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 2px 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.roster-sec-head:first-child { margin-top: 0; }
.roster-sec-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.roster-sec-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
}

.roster-sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.resi-row { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
.resi-chip {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
}
.resi-chip.nr { background: rgba(76, 196, 106, 0.14); color: var(--green); border: 1px solid rgba(76, 196, 106, 0.45); }
.resi-chip.fr { background: rgba(74, 168, 255, 0.14); color: var(--arcane); border: 1px solid rgba(74, 168, 255, 0.45); }
.resi-chip.none { background: rgba(120, 128, 150, 0.12); color: var(--faint); border: 1px solid var(--border); }

/* 3-Wege-Segmentwahl (Kein Resi / NR / FR) im Bearbeiten-Modus */
.resi-seg {
  display: flex;
  margin-top: 4px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.resi-seg:empty { display: none; }
.resi-seg-btn {
  flex: 1;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 4px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--faint);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.resi-seg-btn:last-child { border-right: none; }
.resi-seg-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--dim); }
.resi-seg-btn.none.active { background: rgba(120, 128, 150, 0.2); color: var(--text); }
.resi-seg-btn.nr.active { background: rgba(76, 196, 106, 0.2); color: var(--green); }
.resi-seg-btn.fr.active { background: rgba(74, 168, 255, 0.2); color: var(--arcane); }

.pcard {
  background: linear-gradient(180deg, var(--panel) 0%, #0d0d16 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pcard:hover { transform: translateY(-2px); border-color: rgba(240, 193, 75, 0.35); box-shadow: var(--glow-gold); }

.pavatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #10192b, #0a1120);
  border: 2.5px solid currentColor;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 16px -4px currentColor;
}
.pavatar .ic { width: 30px; height: 30px; }
.pavatar .ic svg { width: 30px; height: 30px; filter: drop-shadow(0 0 4px currentColor); }
.pcard .pname { font-size: 15.5px; font-weight: 800; }
.pcard .pclass { font-size: 11.5px; color: var(--dim); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.pcard .pclass .ic { width: 14px; height: 14px; }
.pcard .pclass .ic svg { width: 14px; height: 14px; }

.pcard .inp, .pcard .sel { width: 100%; text-align: center; }
.pcard .pcard-del {
  position: absolute;
  top: 8px; right: 8px;
}

.pcard.add-card {
  border-style: dashed;
  cursor: pointer;
  color: var(--faint);
  justify-content: center;
  min-height: 150px;
  font-weight: 700;
}
.pcard.add-card:hover { color: var(--gold); border-color: rgba(240, 193, 75, 0.5); }
.pcard.add-card .big-plus { font-size: 30px; }

/* ---------- Klassen-Guides ---------- */

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto 6px;
}
.class-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--dim);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.15s;
}
.class-tile:hover { color: var(--text); border-color: var(--cc); }
.class-tile.active {
  color: var(--cc);
  border-color: var(--cc);
  background: color-mix(in srgb, var(--cc) 12%, transparent);
  box-shadow: 0 0 14px -4px var(--cc);
}
.class-tile .ic { width: 20px; height: 20px; color: var(--cc); flex-shrink: 0; }
.class-tile .ic svg { width: 20px; height: 20px; filter: drop-shadow(0 0 4px var(--cc)); }

.spec-bar { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1100px; margin: 14px auto 4px; }
.spec-tab {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--dim); cursor: pointer; transition: all 0.15s;
}
.spec-tab b { font-size: 13.5px; font-weight: 800; }
.spec-tab span { font-size: 11px; color: var(--faint); }
.spec-tab:hover { color: var(--text); border-color: #333b50; }
.spec-tab.active { color: var(--gold); border-color: rgba(240, 193, 75, 0.6); box-shadow: var(--glow-gold); }
.spec-tab.active span { color: var(--gold-deep); }

.guide-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 14px auto 0;
  align-items: start;
}
.guide-card { min-width: 0; }

/* Bearbeiten-Zeile Consumables: Name bekommt eine eigene volle Zeile
   (Namen wie "Elixier der erheblichen Beweglichkeit" brauchen Platz),
   darunter Gruppe/Effekt/ID/Beruf/Löschen in einer zweiten Zeile. */
.consum-item {
  padding: 7px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.consum-item:first-child { padding-top: 0; }
.consum-item .name { width: 100%; margin-bottom: 5px; font-weight: 700; }
.consum-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.consum-row2 .grp { max-width: 108px; }
.consum-row2 .eff { flex: 1 1 110px; min-width: 90px; }
.consum-row2 .id { width: 56px; flex: 0 0 56px; text-align: center; }

.edit-row.wrap { flex-wrap: wrap; }
.sel.slot { max-width: 132px; }
.inp.id { max-width: 64px; flex: 0 0 64px; text-align: center; }

.cg { margin-bottom: 12px; }
.cg:last-child { margin-bottom: 0; }
.cg-head {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--arcane); margin-bottom: 5px;
}
.cg-or { font-size: 12px; font-style: italic; color: var(--faint); margin: 2px 0 4px; }
.cg-pre { font-size: 12.5px; font-weight: 700; color: var(--dim); flex-shrink: 0; }
.cg-note { font-size: 12px; font-weight: 700; color: var(--red); margin-top: 8px; }
.cg-row, .ench-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 4px 0; min-width: 0;
}
.cg-row .wh-link { flex: 1; min-width: 0; }
.cg-eff { font-size: 12px; color: var(--faint); white-space: nowrap; flex-shrink: 0; }
.cg-row.craft .wh-link { color: var(--green); }

.wh-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wh-link:hover { color: var(--gold); }
/* Icon, das die Wowhead-Tooltip-Bibliothek in den Link einfügt */
.wh-link img, .wh-link .iconsmall, .wh-link .iconmedium {
  width: 18px !important; height: 18px !important;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 2px;
  flex-shrink: 0;
}
.wh-link .iconsmall, .wh-link .iconmedium { display: inline-block; }
.wh-link .ic { flex-shrink: 0; opacity: 0.5; }
.wh-link .ic svg { width: 11px; height: 11px; }
.wh-link:hover .ic { opacity: 1; }

.ench-slot { font-size: 11px; font-weight: 700; color: var(--dim); min-width: 78px; flex-shrink: 0; }
.ench-badge { font-size: 10.5px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.ench-badge.yes { color: var(--green); }
.ench-badge.no { color: var(--faint); }
.ench-row .wh-link { flex: 1; min-width: 0; }

.ench-toggle {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800;
  padding: 5px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; transition: all 0.15s;
}
.ench-toggle.yes { color: var(--green); border-color: rgba(76, 196, 106, 0.5); background: rgba(76, 196, 106, 0.12); }
.ench-toggle.no { color: var(--faint); }

/* ---------- Formulare ---------- */

.edit-row { display: flex; align-items: center; gap: 6px; margin: 5px 0; min-width: 0; }

.inp, .sel {
  background: #0c0c15;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  padding: 7px 9px;
  min-width: 0;
}
.inp { flex: 1; }
.inp:focus, .sel:focus { outline: none; border-color: rgba(240, 193, 75, 0.65); }
.inp::placeholder { color: var(--faint); }
.sel { max-width: 130px; }
.sel.role { max-width: 96px; }

.mini-btn {
  flex-shrink: 0;
  width: 25px; height: 25px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--faint);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.mini-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.mini-btn.del:hover { color: var(--red); background: rgba(224, 92, 92, 0.12); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: all 0.15s;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  border-color: var(--gold);
  color: #1c1305;
  box-shadow: var(--glow-gold);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #e97070; }

/* ---------- Save-Bar ---------- */

.savebar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(90px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(12, 12, 20, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(240, 193, 75, 0.55);
  border-radius: 16px;
  box-shadow: var(--shadow), var(--glow-gold);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.2s;
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
}
body.editing .savebar {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.savebar-hint { font-size: 11.5px; color: var(--dim); font-weight: 600; }

.dirty { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--faint); white-space: nowrap; }
.dirty.on { color: var(--gold); }
.dirty.on::before { content: "●"; font-size: 9px; }

/* ---------- Toasts & Modals ---------- */

#toastRoot {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 120;
  pointer-events: none;
}

.toast {
  background: var(--panel-2);
  border: 1px solid rgba(76, 196, 106, 0.55);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast.err { border-color: rgba(224, 92, 92, 0.65); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all 0.35s; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: none; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 8, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s ease;
  padding: 16px;
}
@keyframes fadeIn { from { opacity: 0; } }

.modal-card {
  width: min(94vw, 400px);
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid rgba(240, 193, 75, 0.35);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow), var(--glow-gold);
  animation: modalIn 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.modal-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 900; }
.modal-desc { margin: 0 0 12px; font-size: 12.5px; color: var(--dim); }

.modal-field { display: block; margin-bottom: 11px; }
.modal-field > span {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--dim);
  margin-bottom: 4px;
}
.modal-field .inp, .modal-field .sel { width: 100%; max-width: none; }

.modal-error { min-height: 17px; font-size: 12px; color: var(--red); font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.modal-card.shake { animation: shake 0.3s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* ---------- Sonstiges ---------- */

.secret-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(2, 2, 5, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: secretFade 0.4s ease;
}
.secret-media {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(240, 193, 75, 0.25);
}
@keyframes secretFade { from { opacity: 0; } to { opacity: 1; } }

.foot {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 22px 16px 30px;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(240, 193, 75, 0.02), transparent 60%);
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.foot-logo {
  height: 34px;
  width: auto;
  border-radius: 7px;
  opacity: 0.85;
  filter: drop-shadow(0 0 8px rgba(74, 168, 255, 0.35));
}

.foot-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }

.foot-brand {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-copy { font-size: 10.5px; color: var(--faint); letter-spacing: 0.02em; }

@media (max-width: 480px) {
  .foot-inner { flex-direction: column; gap: 8px; }
  .foot-text { align-items: center; }
}

.fatal {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70vh;
  color: var(--dim);
  font-size: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .brand-sub { display: none; }
  .mainnav { justify-content: flex-end; }
  .nav-tab { padding: 8px 14px; }
}

@media (max-width: 720px) {
  .sidebar { grid-template-columns: 1fr; }
  .music-vol { width: 52px; }
  .appbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .vx-row { grid-template-columns: 40px 1fr; }
  .vx-item, .vx-prog { grid-column: 2; }
  .savebar-hint { display: none; }
  .hero h2 { font-size: 26px; }
}
