/* ══════════════════════════════════════════════════════════
   smokatv.de — gemeinsames Stylesheet
   Look wie die Overlays und Handbücher: Cyan/Magenta, Orbitron,
   dunkles Sci-Fi-Grid.
   ══════════════════════════════════════════════════════════ */

:root {
  --bg-base: #050810;
  --bg-panel: #0a1220;
  --bg-card: #0d1626;
  --cyan: #00e5ff;
  --cyan-soft: #4dd9e8;
  --cyan-dim: rgba(0, 229, 255, 0.15);
  --cyan-border: rgba(0, 229, 255, 0.35);
  --magenta: #9933ff;
  --sahne: #ffe9a8;
  --sahne-soft: #fff5d4;
  --gold: #ffcd3c;
  --silver: #d6deeb;
  --live: #ff3860;
  --text: #e0f4f8;
  --text-dim: #7a98a6;
  --grid: rgba(0, 229, 255, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at top, rgba(0, 229, 255, 0.08), transparent 60%),
              radial-gradient(ellipse at bottom, rgba(153, 51, 255, 0.05), transparent 60%);
  pointer-events: none; z-index: 0;
}

.scanline {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.3; z-index: 3; pointer-events: none;
  animation: scan 8s linear infinite;
}
@keyframes scan { 0% { transform: translateY(0); } 100% { transform: translateY(100vh); } }

.container {
  max-width: 1280px; margin: 0 auto;
  padding: 0 40px 80px;
  position: relative; z-index: 1;
}

/* ═══════════ KOPFLEISTE / NAVIGATION ═══════════ */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cyan-border);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 40px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.brand {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: 20px; letter-spacing: 0.08em; text-decoration: none;
  background: linear-gradient(180deg, var(--sahne-soft), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
/* Eigene Farbe statt opacity: ein Kind mit opacity bildet einen eigenen
   Stacking-Kontext, dadurch bliebe der geclippte Gradient-Text unsichtbar. */
.brand .tv {
  -webkit-text-fill-color: var(--cyan-soft);
  color: var(--cyan-soft);
  opacity: 0.85;
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan-soft); text-decoration: none;
  padding: 9px 14px; border: 1px solid transparent;
  transition: all 0.22s ease;
}
.nav a:hover { color: var(--cyan); border-color: var(--cyan-border); background: rgba(0, 229, 255, 0.06); }
.nav a.active { color: var(--cyan); border-color: var(--cyan-border); background: rgba(0, 229, 255, 0.1); }

/* Live-Anzeige in der Leiste */
.live-pill {
  display: none; align-items: center; gap: 7px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 3px;
  border: 1px solid rgba(255, 56, 96, 0.5);
  background: rgba(255, 56, 96, 0.12); color: #ff6b85;
  text-decoration: none;
}
.live-pill.on { display: inline-flex; }
.live-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 10px var(--live);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ═══════════ SEITENKOPF ═══════════ */

.page-head { padding: 56px 0 36px; position: relative; }
.page-head .eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cyan-soft); margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.page-head h1 {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: clamp(34px, 5.5vw, 60px); line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--sahne-soft) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.page-head .lead {
  font-size: 18px; font-weight: 500; color: var(--text-dim);
  max-width: 720px; line-height: 1.55;
}

/* ═══════════ ABSCHNITTE ═══════════ */

.section { margin-bottom: 56px; scroll-margin-top: 80px; }
.section-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 22px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(0, 229, 255, 0.14); padding-bottom: 12px;
}
.section-head h2 {
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  font-size: 22px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--sahne-soft);
}
.section-head .hint { font-size: 15px; color: var(--text-dim); }
.section-head .right { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); letter-spacing: 0.15em; }

/* ═══════════ KARTEN ═══════════ */

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative; background: var(--bg-card);
  border: 1px solid rgba(0, 229, 255, 0.12);
  padding: 22px 24px; overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: var(--cyan); opacity: 0.55;
}
.card:hover { border-color: var(--cyan-border); transform: translateY(-2px); }
.card h3 {
  font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 15px;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--sahne-soft); margin-bottom: 10px;
}
.card p { font-size: 15.5px; line-height: 1.6; }
.card p + p { margin-top: 10px; }
.card .label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan-soft); opacity: 0.85; margin-bottom: 6px;
}
.card.gold::before { background: var(--gold); }
.card.gold { border-color: rgba(255, 205, 60, 0.35); }
.card.silver::before { background: var(--silver); }
.card.silver { border-color: rgba(214, 222, 235, 0.3); }
.card.plain::before { display: none; }

a.card { text-decoration: none; color: inherit; display: block; }

/* Verlinkte Kacheln */
.tile { display: flex; align-items: center; gap: 16px; }
.tile .ico { font-size: 26px; line-height: 1; flex-shrink: 0; }
.tile .tx h3 { margin-bottom: 4px; }
.tile .tx p { font-size: 14.5px; color: var(--text-dim); }

/* ═══════════ THRON ═══════════ */

.throne-name {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  /* skaliert mit der Breite, damit auch lange Namen wie "DrGurkenwasser91"
     auf schmalen Displays in einer Zeile bleiben */
  font-size: clamp(18px, 5.2vw, 26px);
  letter-spacing: 0.02em; line-height: 1.2;
  overflow-wrap: anywhere;
}
.card.gold .throne-name { color: var(--gold); text-shadow: 0 0 16px rgba(255, 205, 60, 0.45); }
.card.silver .throne-name { color: var(--silver); text-shadow: 0 0 16px rgba(214, 222, 235, 0.35); }
.throne-crown { font-size: 24px; }
.card.silver .throne-crown { filter: grayscale(1) brightness(1.7); }
.throne-stats {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
}
.throne-stats .s-bits { color: var(--cyan); }
.throne-stats .s-subs { color: var(--magenta); }
.throne-stats .s-kofi { color: #ff7a5c; }

/* ═══════════ ZIEL-BALKEN ═══════════ */

.goal-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.goal-num {
  font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 38px; line-height: 1;
  background: linear-gradient(92deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.goal-target { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 17px; opacity: 0.55; }
.goal-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; position: relative; }
.goal-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  border-radius: 4px; transition: width 0.8s cubic-bezier(0.25, 1, 0.3, 1);
}
.goal-reached .goal-num { background: linear-gradient(92deg, var(--gold), #ffb347); -webkit-background-clip: text; background-clip: text; }
.goal-reached .goal-fill { background: linear-gradient(90deg, var(--gold), #ffe0a0); }

/* ═══════════ EVENTS ═══════════ */

.event {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 18px 22px; background: var(--bg-card);
  border: 1px solid rgba(0, 229, 255, 0.12); border-left: 3px solid var(--cyan-border);
  margin-bottom: 12px; transition: border-color 0.25s ease;
}
.event:hover { border-color: var(--cyan-border); }
.event.now { border-left-color: var(--live); background: linear-gradient(90deg, rgba(255, 56, 96, 0.08), var(--bg-card)); }
.event.past { opacity: 0.45; }
.event .when {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--cyan-soft); letter-spacing: 0.06em;
  min-width: 130px; flex-shrink: 0; padding-top: 2px;
}
.event .body { flex: 1; min-width: 0; }
.event h3 { font-family: 'Orbitron', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 0.03em; color: var(--sahne-soft); margin-bottom: 5px; }
.event p { font-size: 14.5px; color: var(--text-dim); line-height: 1.5; }
.event .cd {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700;
  color: var(--sahne); white-space: nowrap; padding-top: 2px;
}
.event.now .cd { color: #ff6b85; }
.badge-now {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 3px 8px; margin-left: 8px; vertical-align: middle;
  background: rgba(255, 56, 96, 0.15); color: #ff6b85;
  border: 1px solid rgba(255, 56, 96, 0.45);
}

/* ═══════════ REFERRAL ═══════════ */

.ref-box {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06), rgba(153, 51, 255, 0.06));
  border: 1px solid var(--cyan-border); border-left: 4px solid var(--cyan);
  padding: 26px 30px; margin: 20px 0;
}
.ref-box h3 { font-family: 'Orbitron', sans-serif; font-size: 16px; letter-spacing: 0.05em; color: var(--cyan); margin-bottom: 10px; text-transform: uppercase; }
.ref-code {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 19px;
  letter-spacing: 0.08em; color: var(--sahne);
  background: rgba(0, 0, 0, 0.35); border: 1px dashed rgba(255, 233, 168, 0.4);
  padding: 12px 18px; margin: 14px 0 10px; cursor: pointer;
  transition: all 0.2s ease;
}
.ref-code:hover { border-color: var(--sahne); background: rgba(255, 233, 168, 0.08); }
.ref-code .copy { font-size: 11px; letter-spacing: 0.15em; color: var(--text-dim); text-transform: uppercase; }
.ref-code.copied .copy { color: var(--cyan); }

/* ═══════════ BUTTONS ═══════════ */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 12px 22px; border: 1px solid var(--cyan-border);
  background: rgba(0, 229, 255, 0.07); color: var(--cyan);
  transition: all 0.22s ease;
}
.btn:hover { background: rgba(0, 229, 255, 0.15); border-color: var(--cyan); transform: translateY(-1px); }
.btn.primary { background: rgba(153, 51, 255, 0.12); border-color: rgba(153, 51, 255, 0.5); color: #c78dff; }
.btn.primary:hover { background: rgba(153, 51, 255, 0.22); border-color: var(--magenta); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ═══════════ AUFKLAPPBAR ═══════════ */

details.explain {
  background: rgba(13, 22, 38, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.14);
  margin-bottom: 12px; transition: border-color 0.25s ease;
}
details.explain[open] { border-color: var(--cyan-border); }
details.explain summary {
  cursor: pointer; list-style: none; padding: 15px 20px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.07em;
  color: var(--cyan-soft); display: flex; align-items: center; gap: 12px; user-select: none;
}
details.explain summary::-webkit-details-marker { display: none; }
details.explain summary::before { content: '+'; font-size: 18px; line-height: 1; color: var(--cyan); width: 14px; flex-shrink: 0; }
details.explain[open] summary::before { content: '−'; }
details.explain summary:hover { color: var(--cyan); background: rgba(0, 229, 255, 0.05); }
details.explain .body {
  padding: 16px 22px 20px 46px; font-size: 15px; line-height: 1.65;
  border-top: 1px dashed rgba(0, 229, 255, 0.12);
}
details.explain .body p + p { margin-top: 12px; }
details.explain .body ul { margin: 10px 0 0 20px; }
details.explain .body li { margin-bottom: 7px; }

/* ═══════════ TABELLE ═══════════ */

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan-soft);
  text-align: left; padding: 11px 14px; font-weight: 500;
  border-bottom: 1px solid var(--cyan-border);
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid rgba(0, 229, 255, 0.08); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(0, 229, 255, 0.04); }
.tbl .num { font-family: 'JetBrains Mono', monospace; color: var(--sahne); white-space: nowrap; }
.tbl .dim { color: var(--text-dim); font-size: 13.5px; }

/* ═══════════ HINWEIS ═══════════ */

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px; margin: 16px 0; font-size: 15px; line-height: 1.55;
  background: rgba(255, 233, 168, 0.05);
  border: 1px solid rgba(255, 233, 168, 0.2); border-left: 3px solid var(--sahne);
}
.notice .ico { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.notice strong { color: var(--sahne); }
.notice.cyan { background: rgba(0, 229, 255, 0.05); border-color: rgba(0, 229, 255, 0.2); border-left-color: var(--cyan); }
.notice.cyan strong { color: var(--cyan); }

/* Verbindungsstatus */
.offline-hint {
  display: none; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--text-dim); padding: 10px 14px; margin-bottom: 14px;
  border: 1px dashed rgba(122, 152, 166, 0.35);
}
.offline-hint.show { display: block; }

/* ═══════════ FUSSZEILE ═══════════ */

.footer {
  margin-top: 70px; padding: 28px 0; border-top: 1px solid var(--cyan-border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim);
}
.footer .brand-line { color: var(--cyan); }
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { color: var(--cyan); }
.footer .links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ═══════════ HILFSKLASSEN ═══════════ */

.cy { color: var(--cyan); }
.gd { color: var(--gold); }
.dim { color: var(--text-dim); }
.mono { font-family: 'JetBrains Mono', monospace; }
.center { text-align: center; }
.skeleton { color: var(--text-dim); opacity: 0.5; }

/* ═══════════ MOBIL ═══════════ */

@media (max-width: 760px) {
  .container { padding: 0 18px 60px; }
  .topbar-inner { padding: 12px 18px; gap: 14px; }
  .brand { font-size: 17px; }
  .nav { width: 100%; margin-left: 0; gap: 4px; }
  .nav a { padding: 8px 10px; font-size: 10px; }
  .page-head { padding: 36px 0 26px; }
  .page-head .lead { font-size: 16px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .event { flex-direction: column; gap: 8px; }
  .event .when { min-width: 0; }
  .section-head .right { display: none; }
  details.explain .body { padding-left: 20px; }
  .tbl { font-size: 14px; }
  .tbl th, .tbl td { padding: 10px 8px; }
  .ref-box { padding: 20px; }
  .ref-code { font-size: 16px; flex-wrap: wrap; }
  .footer { flex-direction: column; align-items: flex-start; }
}
