/* ============================================================
   Farbpalette + Fonts 1:1 von der Hauptwebsite (chubby-otter-studios.com)
   ============================================================ */
:root {
  --bg: #1a1128;
  --panel: #21172f;
  --panel-soft: #271b38;
  --panel-border: rgba(201,184,232,0.14);
  --text: #f2eaff;
  --text-dim: #a894c4;
  --faint: #766088;
  --lavender: #c9b8e8;
  --accent: #e923ff;      /* magenta */
  --accent-glow: #f14dff;
  --cyan: #00e5ff;
  --purple: #c9b8e8;
  --danger: #ff5470;
  --success: #34d399;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .rank-badge, .stat-value, .btn-primary, .btn-secondary { font-family: "Oxanium", sans-serif; }

.scanline {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background: repeating-linear-gradient(0deg, rgba(233,35,255,0.015) 0px, rgba(233,35,255,0.015) 1px, transparent 1px, transparent 3px);
}

.hidden { display: none !important; }

/* ── Geteilte Site-Nav (1:1 wie Hauptseite) ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26,17,40,0.88);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(18px);
}
.nav {
  max-width: 1120px; margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: "Oxanium", sans-serif; font-size: 1rem; font-weight: 800;
  letter-spacing: 0.06em; color: var(--lavender); text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; color: var(--text-dim); font-size: 0.86rem; font-weight: 600; }
.nav-links a { text-decoration: none; color: inherit; transition: color 0.18s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-active { color: var(--cyan); }

/* Kompakte Pill-Buttons in Nav-Größe (wie .btn/.btn-primary auf der Hauptseite) —
   bewusst eigene Klassen, damit die großen Formular-Buttons (.btn-primary weiter
   unten) nicht mit betroffen sind. */
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0.6rem 1.2rem;
  border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg);
  font-family: "Oxanium", sans-serif; font-size: 0.85rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}
.nav-cta:hover { background: var(--accent-glow); transform: translateY(-1px); }

.home-btn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--panel-border);
  color: var(--text-dim); font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 12.5px;
  text-decoration: none; transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.home-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,229,255,0.06); }

/* ── Hunter-Subleiste (App-spezifisch, unter der Site-Nav) ── */
.hunter-bar { border-bottom: 1px solid var(--panel-border); background: rgba(39,27,56,0.5); }
.hunter-bar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 1.5rem;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.hunter-bar-title { flex: 1; font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 14px; color: var(--text-dim); min-width: 120px; }
.logo-img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 10px rgba(233,35,255,0.35); }

.hunter-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: var(--bg); font-weight: 800; box-shadow: 0 0 10px rgba(233,35,255,0.4);
}

.container { max-width: 1120px; margin: 0 auto; padding: 24px 1.5rem 100px; }

.panel {
  background: linear-gradient(160deg, var(--panel-soft) 0%, var(--panel) 100%);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.25);
}

.glow { color: var(--cyan); }

h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 17px; margin-top: 0; color: var(--text); font-weight: 800; }

input[type="text"], input[type="number"] {
  background: var(--bg); border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 15px; width: 100%; font-family: "Nunito", sans-serif;
}
input[type="text"]:focus, input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 8px rgba(233,35,255,0.35); }

.btn-primary {
  margin-top: 14px;
  background: var(--accent);
  color: var(--bg); font-weight: 700; border: 1px solid var(--accent); border-radius: 999px;
  padding: 12px 22px; font-size: 15px; cursor: pointer;
  box-shadow: 0 0 18px rgba(233,35,255,0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { background: var(--accent-glow); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent; border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  font-family: "Oxanium", sans-serif;
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }

#onboarding p { color: var(--text-dim); }
#onboarding input { margin: 14px 0; }

.onboarding-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab-btn {
  flex: 1; background: var(--bg); border: 1px solid var(--panel-border); color: var(--text-dim);
  border-radius: 999px; padding: 10px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: "Oxanium", sans-serif;
}
.tab-btn.active { color: var(--bg); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(233,35,255,0.35); }

.pair-result { margin-top: 18px; text-align: center; }
.pair-code {
  font-size: 40px; font-weight: 800; letter-spacing: 8px; color: var(--cyan);
  font-family: "Oxanium", sans-serif; margin-bottom: 14px;
}
.pair-qr { display: flex; justify-content: center; margin-bottom: 12px; background: #fff; padding: 10px; border-radius: 12px; width: fit-content; margin-left: auto; margin-right: auto; }
.pair-timer { font-size: 13px; color: var(--text-dim); }

.quest-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.deadline { color: var(--danger); font-size: 13px; font-weight: 700; }
.quest-desc { color: var(--text-dim); font-style: italic; font-size: 13px; }

.quest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 16px 0; }
.quest-item label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.quest-item .target { font-size: 11px; color: var(--faint); display: block; margin-top: 4px; }
.bar { height: 6px; background: var(--bg); border: 1px solid var(--panel-border); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width 0.3s ease; }

.quest-status { margin-top: 14px; font-weight: 700; font-size: 14px; }
.quest-status.complete { color: var(--success); }
.quest-status.incomplete { color: var(--text-dim); }

.bonus-status {
  margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 13px;
  color: var(--cyan); background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.3);
}

.rank-progress-text { margin-top: 14px; font-size: 13px; color: var(--text-dim); }
.rank-progress-bar { margin-top: 8px; height: 8px; }
.bonus-counter { margin-top: 10px; font-size: 13px; color: var(--cyan); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.stat-card { text-align: center; padding: 18px; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--cyan); }
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; font-family: "Nunito", sans-serif; }

.rank-track { display: flex; justify-content: space-between; gap: 6px; margin-top: 10px; }
.rank-step {
  flex: 1; text-align: center; padding: 10px 4px; border-radius: 10px;
  border: 1px solid var(--panel-border); font-weight: 800; font-size: 15px;
  color: var(--text-dim); background: var(--bg); font-family: "Oxanium", sans-serif;
}
.rank-step small { font-weight: 500; font-size: 10px; color: var(--faint); }
.rank-step.reached { color: var(--bg); background: linear-gradient(135deg, var(--accent), var(--cyan)); box-shadow: 0 0 12px rgba(233,35,255,0.35); }
.rank-step.reached small { color: rgba(26,17,40,0.7); }

.leaderboard { width: 100%; border-collapse: collapse; font-size: 14px; }
.leaderboard th, .leaderboard td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--panel-border); }
.leaderboard th { color: var(--faint); font-weight: 700; font-size: 12px; text-transform: uppercase; font-family: "Oxanium", sans-serif; }
.leaderboard tr:first-child td { color: var(--cyan); font-weight: 700; }

.footer { text-align: center; color: var(--faint); font-size: 11px; padding: 24px; }

/* Nebenquests / Verzicht */
.quest-checklist { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quest-checklist li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--panel-border); border-radius: 10px;
}
.quest-checklist .qc-icon { font-size: 18px; }
.quest-checklist .qc-title { flex: 1; font-size: 14px; }
.quest-checklist li.done { border-color: var(--success); }
.quest-checklist li.done .qc-title { color: var(--success); text-decoration: line-through; }
.quest-checklist .qc-remove {
  background: none; border: none; color: var(--faint); cursor: pointer; font-size: 16px; padding: 2px 6px;
}
.quest-checklist .qc-remove:hover { color: var(--danger); }

.abstinence-list li { border-color: rgba(0,229,255,0.25); }
.abstinence-list .qc-streak { font-size: 13px; color: var(--cyan); font-weight: 700; white-space: nowrap; font-family: "Oxanium", sans-serif; }
.abstinence-list .qc-relapse {
  background: rgba(255, 84, 112, 0.1); border: 1px solid var(--danger); color: var(--danger);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; font-family: "Oxanium", sans-serif;
}
.abstinence-list .qc-relapse:hover { background: rgba(255, 84, 112, 0.2); }

.add-quest-row { display: flex; gap: 8px; margin-top: 10px; }
.add-quest-row input { flex: 1; }

/* ===== Live-Widget: 1:1 von der Hauptwebsite übernommen ===== */
.live-floating {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 320px;
  background: linear-gradient(160deg, #1f1530 0%, #170f24 100%);
  border: 1px solid rgba(201,184,232,0.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(233,35,255,0.05), 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(233,35,255,0.07);
  z-index: 200;
  transition: width 0.3s ease, height 0.3s ease;
}
.live-floating.collapsed .live-player-wrapper { display: none; }
.live-floating.collapsed .live-widget-footer { display: none; }
.live-floating.expanded { width: 480px; }

.live-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(201,184,232,0.12);
  cursor: pointer; user-select: none;
}
.live-widget-title {
  display: flex; align-items: center; gap: 9px;
  font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--lavender);
}
.live-widget-header-right { display: flex; align-items: center; gap: 10px; }
.live-status-label { font-size: 11px; font-weight: 600; color: #8a7fa3; letter-spacing: 0.03em; }
.live-collapse-btn { background: none; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; padding: 0 2px; transition: transform 0.25s; }
.live-floating.collapsed .live-collapse-btn { transform: rotate(180deg); }

.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(233,35,255,0.6);
  animation: pulse 1.6s ease-in-out infinite; flex-shrink: 0;
}
.live-dot.offline { background: #5a5068; box-shadow: none; animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.live-player-wrapper { position: relative; width: 100%; aspect-ratio: 16/9; background: #0d0815; }
.live-player-wrapper iframe { width: 100%; height: 100%; border: none; display: block; }

.live-widget-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.live-cta { font-family: "Oxanium", sans-serif; font-weight: 600; font-size: 12px; color: var(--cyan); text-decoration: none; display: flex; align-items: center; gap: 5px; transition: color 0.2s, transform 0.2s; }
.live-cta:hover { color: #7cf3ff; transform: translateX(2px); }
.live-mute-btn {
  font-family: "Nunito", sans-serif; font-weight: 600; font-size: 11px; color: var(--lavender);
  background: rgba(201,184,232,0.08); border: 1px solid rgba(201,184,232,0.25);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.live-mute-btn:hover { background: rgba(233,35,255,0.12); border-color: rgba(233,35,255,0.4); }

@media (max-width: 500px) {
  .live-floating { width: calc(100vw - 32px); right: 16px; bottom: 16px; }
  .live-floating.expanded { width: calc(100vw - 32px); }
}

@media (max-width: 520px) {
  .nav { padding: 0.9rem 1rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a:not(.btn-primary) { display: none; }
  .hunter-bar-inner { padding: 10px 16px; }
  .container { padding: 16px 12px 60px; }
}
