/* ============================================================
   Divergence Character Card — Stylesheet
   divergence-coaching.de  v2.0.0
   ============================================================ */

:root {
  --dc-bg:       #0b0813;
  --dc-bg2:      #0f0c1c;
  --dc-card:     #1c1628;
  --dc-border:   #2a1f42;
  --dc-accent:   #a855f7;
  --dc-accent2:  #7c3aed;
  --dc-text:     #e2d9f3;
  --dc-muted:    #7c6d9a;
  --dc-radius:   16px;
  --dc-font:     'Outfit', system-ui, sans-serif;
  --dc-mono:     'Space Mono', 'Courier New', monospace;
  --dc-font-display: 'Cinzel', serif;
  --dc-klarheit: #60a5fa;
  --dc-kraft:    #f87171;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.dc-character-wrapper {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  font-family: var(--dc-font);
  box-sizing: border-box;
}

.dc-character-wrapper *,
.dc-character-wrapper *::before,
.dc-character-wrapper *::after {
  box-sizing: border-box;
}

/* ── Loading-Dots ────────────────────────────────────────── */
.dc-loading {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.dc-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dc-accent);
  animation: dc-pulse 1.2s ease-in-out infinite;
}
.dc-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.dc-loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dc-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1.2); }
}

/* ── Karte gesamt ────────────────────────────────────────── */
.dc-card {
  background: var(--dc-card);
  border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius);
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.dc-card.dc-animate-in {
  animation: dc-fade-in 0.3s ease forwards;
}
@keyframes dc-fade-in {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Header ──────────────────────────────────────────────── */
.dc-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--dc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  transition: background 0.4s ease;
}
.dc-header-label {
  font-family: var(--dc-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 3px;
  transition: color 0.4s ease;
}
.dc-header-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--dc-text);
  line-height: 1.1;
}
.dc-header-tagline {
  width: 100%;
  background: rgba(18, 9, 32, 0.5);
  border: 1px solid var(--dc-border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 18px;
  color: var(--dc-muted);
  line-height: 1.4em;
  font-style: italic;
  text-align: center;
  font-family: "Crimson Pro";
}
.header-tagline-backup {
  font-size: 18px;
  color: var(--dc-muted);
  margin-top: 2px;
  line-height: 1.2em;
  font-family: var(--dc-font-display);
}
.dc-header-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.dc-badge {
  border-radius: 8px;
  padding: 4px 11px;
  font-family: var(--dc-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.4s, border-color 0.4s, color 0.4s;
}

/* ── Body Layout ─────────────────────────────────────────── */
.dc-body {
  display: flex;
  flex-wrap: wrap;
  padding: 20px 24px;
  gap: 20px;
}

/* ── Linke Spalte: Avatar ────────────────────────────────── */
.dc-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 140px;
  flex-shrink: 0;
}
.dc-avatar-frame {
  width: 140px;
  height: 168px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.dc-avatar-grid {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(var(--dc-current-color, #a855f7) 1px, transparent 1px),
    linear-gradient(90deg, var(--dc-current-color, #a855f7) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.dc-avatar-emoji {
  font-size: 58px;
  line-height: 1;
  margin-bottom: 6px;
  transition: filter 0.4s;
}
.dc-avatar-stufe {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
  padding: 3px 10px;
  font-family: var(--dc-mono);
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: background 0.4s, border-color 0.4s, color 0.4s;
}
.dc-bio {
  display: none;
}

/* ── XP Bar ──────────────────────────────────────────────── */
.dc-xp-wrap { width: 100%; }
.dc-xp-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.dc-xp-label-l {
  font-family: var(--dc-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dc-muted);
}
.dc-xp-label-r {
  font-family: var(--dc-mono);
  font-size: 11px;
  transition: color 0.4s;
}
.dc-xp-track {
  height: 5px;
  background: #1f1535;
  border-radius: 3px;
  overflow: hidden;
}
.dc-xp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s;
}

/* ── Stufen-Track ────────────────────────────────────────── */
.dc-stufen-label {
  font-family: var(--dc-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dc-muted);
  text-align: center;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.dc-stufen-track {
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
}
.dc-stufe-pip {
  height: 8px;
  border-radius: 4px;
  border: 1px solid;
  transition: all 0.4s ease;
}
.dc-stufen-connector {
  width: 5px;
  height: 1px;
  opacity: 0.4;
}

/* ── Radar-Chart ─────────────────────────────────────────── */
.dc-radar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 180px;
  min-width: 180px;
}
.dc-radar-title {
  font-family: var(--dc-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--dc-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}
.dc-radar-svg { overflow: visible; }
.dc-radar-note {
  font-size: 10px;
  color: var(--dc-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
  max-width: 200px;
}

/* ── Ring-Toggles (Klarheit / Kraft / Profil) ────────────── */
.dc-ring-toggles {
  display: flex !important;
  gap: 6px !important;
  justify-content: center !important;
  margin-top: 10px !important;
  flex-wrap: wrap !important;
}
.dc-ring-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: transparent !important;
  border: 1.5px solid var(--dc-border) !important;
  border-radius: 14px !important;
  padding: 3px 10px !important;
  font-family: var(--dc-mono) !important;
  font-size: 10px !important;
  letter-spacing: 1px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: var(--dc-muted) !important;
  text-transform: uppercase !important;
  line-height: 1.4 !important;
}
.dc-ring-toggle:hover {
  background: rgba(255,255,255,0.04) !important;
}
.dc-ring-toggle-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  transition: background 0.2s ease !important;
  flex-shrink: 0 !important;
}
.dc-ring-toggle:not(.dc-ring-toggle-active) {
  opacity: 0.5 !important;
}

/* ── Rechte Spalte: Quests ───────────────────────────────── */
.dc-right-col {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}
.dc-section-label {
  font-family: var(--dc-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--dc-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ── Quest-Rows (kompakt, klickbar) ──────────────────────── */
.dc-quest-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  background: rgba(18, 9, 32, 0.4) !important;
  border: 1px solid var(--dc-border) !important;
  border-radius: 9px !important;
  padding: 8px 10px !important;
  cursor: pointer !important;
  transition: background 0.2s, border-color 0.2s, transform 0.15s !important;
  margin-bottom: 4px !important;
}
.dc-quest-row:hover {
  filter: brightness(1.3) !important;
  transform: translateX(2px) !important;
}
.dc-quest-row--done {
  opacity: 0.7 !important;
}
.dc-quest-row--done:hover {
  opacity: 1 !important;
}
.dc-quest-row-icon {
  font-size: 14px !important;
  flex-shrink: 0 !important;
  margin-top: 1px !important;
  line-height: 1 !important;
}
.dc-quest-row-body {
  flex: 1 !important;
  min-width: 0 !important;
}
.dc-quest-row-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--dc-text) !important;
  line-height: 1.3 !important;
}
.dc-quest-row-title--done {
  text-decoration: line-through !important;
  text-decoration-color: var(--dc-muted) !important;
  opacity: 0.8 !important;
}
.dc-quest-row-meta {
  font-family: var(--dc-mono) !important;
  font-size: 9px !important;
  letter-spacing: 0.8px !important;
  margin-top: 2px !important;
  color: var(--dc-muted) !important;
}

/* ── Quest-Fortschritt ───────────────────────────────────── */
.dc-quest-track {
  height: 4px;
  background: #1f1535;
  border-radius: 2px;
}
.dc-quest-fill {
  height: 100%;
  border-radius: 2px;
  opacity: 0.7;
  transition: background 0.4s, width 0.6s ease;
}
.dc-quest-progress {
  font-size: 10px;
  color: var(--dc-muted);
  margin-top: 5px;
}

/* (dc-quest-completed-item styles removed — replaced by dc-quest-row--done) */

/* ── Quest-Statistik ─────────────────────────────────────── */
.dc-quest-stats {
  display: flex !important;
  gap: 16px !important;
  margin-top: 8px !important;
  padding: 8px 0 !important;
  border-top: 1px solid var(--dc-border) !important;
}
.dc-quest-stat {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
}
.dc-quest-stat-val {
  font-size: 18px !important;
  font-weight: 800 !important;
}
.dc-quest-stat-lbl {
  font-family: var(--dc-mono) !important;
  font-size: 10px !important;
  color: var(--dc-muted) !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

/* ── Badges (Fallback wenn kein Quest-Plugin) ────────────── */
.dc-badges-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dc-badge-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(18, 9, 32, 0.4);
  border: 1px solid var(--dc-border);
  border-radius: 9px;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.dc-badge-item:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.08);
}
.dc-badge-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.dc-badge-name { font-size: 15px; font-weight: 700; color: var(--dc-text); }
.dc-badge-desc { font-size: 13px; color: var(--dc-muted); margin-top: 2px; line-height: 1.4; display: none; }
.dc-badge-item:hover .dc-badge-desc { display: block; }

.dc-quest-box {
  border-radius: 11px;
  padding: 13px 14px;
  transition: background 0.4s, border-color 0.4s;
}
.dc-quest-label {
  font-family: var(--dc-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 7px;
  transition: color 0.4s;
}
.dc-quest-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--dc-text);
  line-height: 1.45;
  margin-bottom: 8px;
}

/* ── Footer ──────────────────────────────────────────────── */
.dc-footer {
  border-top: 1px solid var(--dc-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 7, 21, 0.4);
  flex-wrap: wrap;
  gap: 10px;
}
.dc-stats-row { display: flex; gap: 20px; }
.dc-stat-item { text-align: center; }
.dc-stat-icon { font-size: 14px; }
.dc-stat-val  { font-size: 14px; font-weight: 800; color: var(--dc-text); }
.dc-stat-lbl  { font-family: var(--dc-mono); font-size: 11px; color: var(--dc-muted); letter-spacing: 1px; text-transform: uppercase; }

.dc-cta-btn {
  border-radius: 10px;
  padding: 9px 18px;
  color: var(--dc-text);
  font-family: var(--dc-font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid;
}

/* ── Demo-Typen-Wähler ───────────────────────────────────── */
.dc-demo-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}
.dc-demo-btn {
  background: transparent;
  border: 1.5px solid var(--dc-border);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--dc-muted);
  font-family: var(--dc-font);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dc-demo-btn:hover { border-color: var(--dc-accent); color: var(--dc-accent); }
.dc-demo-btn.dc-active { color: #fff; }

/* ── Demo-Fortschrittsleiste ─────────────────────────────── */
.dc-demo-progress {
  height: 2px;
  background: var(--dc-border);
  border-radius: 1px;
  margin-bottom: 14px;
  overflow: hidden;
}
.dc-demo-progress-fill {
  height: 100%;
  border-radius: 1px;
  transition: width linear;
  background: var(--dc-accent);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .dc-body { flex-direction: column; }
  .dc-avatar-col { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .dc-avatar-frame { width: 120px; height: 140px; }
  .dc-radar-col { min-width: 100%; }
  .dc-right-col { min-width: 100%; }
  .dc-header { flex-direction: column; align-items: flex-start; }
  .dc-header-badges { align-items: flex-start; }
  .dc-ring-toggles { justify-content: center !important; }
}
