/* ==========================================================================
   TNTWARS - Design-System
   Dunkel ist Standard, hell per data-theme="light". Alle Farben laufen ueber Tokens.
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #07070a;
  --bg-elevated: #0e0e13;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-solid: #121218;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-2: #a4a4b0;
  --text-3: #6e6e7b;
  --accent: #ffa31a;
  --accent-text: #ffb23d;
  --accent-soft: rgba(255, 163, 26, 0.12);
  --on-accent: #1b0f00;
  --grad: linear-gradient(120deg, #ffe066 0%, #ffae1f 38%, #ff6b00 72%, #ff3d00 100%);
  --glass: rgba(9, 9, 13, 0.6);
  --glass-strong: rgba(9, 9, 13, 0.82);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(255, 163, 26, 0.35), 0 12px 40px -10px rgba(255, 120, 0, 0.45);
  --success: #3ddc84;
  --danger: #ff5c63;
  --warning: #ffc53d;
  --info: #5eb0ff;
  --rank-DEFAULT: #9b9ba8;
  --rank-VIP: #55f06a;
  --rank-PRO: #c56bff;
  --rank-GOD: #ffb020;
  --rank-MOD: #2fd47a;
  --rank-ADMIN: #ff5c63;
  --backdrop-a: rgba(255, 122, 0, 0.16);
  --backdrop-b: rgba(255, 196, 0, 0.08);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --surface: rgba(12, 12, 24, 0.028);
  --surface-2: rgba(12, 12, 24, 0.055);
  --surface-solid: #ffffff;
  --border: rgba(12, 12, 24, 0.09);
  --border-strong: rgba(12, 12, 24, 0.18);
  --text: #111116;
  --text-2: #55555f;
  --text-3: #8a8a96;
  --accent: #f28c00;
  --accent-text: #c96a00;
  --accent-soft: rgba(242, 140, 0, 0.12);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 50px -28px rgba(20, 20, 40, 0.28);
  --shadow-soft: 0 10px 28px -16px rgba(20, 20, 40, 0.22);
  --glow: 0 0 0 1px rgba(242, 140, 0, 0.35), 0 12px 32px -12px rgba(242, 120, 0, 0.35);
  --success: #139a52;
  --danger: #d9363e;
  --warning: #b77900;
  --info: #1f78d1;
  --rank-DEFAULT: #6e6e7b;
  --rank-VIP: #16953a;
  --rank-PRO: #8a2be2;
  --rank-GOD: #c27400;
  --rank-MOD: #0f7f41;
  --rank-ADMIN: #d9363e;
  --backdrop-a: rgba(255, 150, 30, 0.14);
  --backdrop-b: rgba(255, 210, 60, 0.12);
  color-scheme: light;
}

:root {
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --nav-h: 68px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ---------- Grundlagen ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

img {
  max-width: 100%;
  display: block;
}

/* Icons ohne eigene Groesse - die Komponenten unten setzen genauere Werte */
svg:not([width]) {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.eyebrow svg,
.command svg,
.mode-tag svg,
.meta .player svg {
  width: 14px;
  height: 14px;
}

.file-chip.chosen {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.post-bio {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.45;
  max-width: 150px;
  overflow-wrap: anywhere;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.2s;
}

.breadcrumb:hover {
  color: var(--text);
}

.breadcrumb svg {
  width: 15px;
  height: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 700;
}

p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

.noscript {
  padding: 40px;
  text-align: center;
}

/* Ruhige Lichtflecken hinter allem */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.backdrop span {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift 26s ease-in-out infinite alternate;
}

.backdrop span:first-child {
  top: -30vmax;
  left: -18vmax;
  background: radial-gradient(circle, var(--backdrop-a), transparent 65%);
}

.backdrop span:last-child {
  bottom: -36vmax;
  right: -22vmax;
  background: radial-gradient(circle, var(--backdrop-b), transparent 65%);
  animation-delay: -12s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}

/* ---------- Layout ---------- */

main {
  flex: 1;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.container-narrow {
  max-width: 820px;
}

.page {
  padding-top: calc(var(--nav-h) + clamp(28px, 5vw, 56px));
  padding-bottom: clamp(56px, 8vw, 96px);
  animation: page-in 0.55s var(--ease) both;
}

.page-flush {
  padding-top: 0;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.page-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 750;
  letter-spacing: -0.035em;
  margin-top: 8px;
}

.page-sub {
  color: var(--text-2);
  max-width: 620px;
  margin-top: 10px;
  font-size: 16px;
}

.section {
  padding-block: clamp(64px, 10vw, 120px);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-title {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 750;
  letter-spacing: -0.035em;
  margin-top: 10px;
}

.section-sub {
  color: var(--text-2);
  font-size: 17px;
  margin-top: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-sm { gap: 8px; }
.stack-lg { gap: 28px; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.row-between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 8px 0;
}

/* ---------- Scroll-Einblendung ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled,
.nav.solid {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-bottom-color: var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo: der TNT-Block als Pixelgrafik */
.logo {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  transition: transform 0.35s var(--ease-spring);
}

.logo-block {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  border-radius: 4px;
  filter: drop-shadow(0 6px 14px rgba(216, 50, 30, 0.35));
}

.logo:hover {
  transform: rotate(-8deg) scale(1.08);
}

.logo:active {
  transform: scale(0.94);
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  margin-inline: auto;
}

.nav-link {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-2);
  transition: color 0.25s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  opacity: 0;
  transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-spring), opacity 0.3s;
}

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

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--text-2);
  transition: background-color 0.2s, color 0.2s;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s;
}

.user-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.nav-burger {
  display: none;
}

.nav-sheet {
  position: fixed;
  inset: var(--nav-h) 0 auto;
  z-index: 49;
  padding: 12px clamp(16px, 4vw, 32px) 24px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transform-origin: top;
  animation: sheet-in 0.35s var(--ease) both;
}

.nav-sheet a {
  display: block;
  padding: 14px 4px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--grad);
  background-size: 160% 100%;
  background-position: 0% 50%;
  /* Der Verlauf beginnt unter dem (unsichtbaren) Rand - sonst wiederholt der Browser dort sein dunkles Ende,
     und links erscheint ein duenner dunkler Streifen. Muss nach "background:" stehen, das setzt es sonst zurueck */
  background-origin: border-box;
  background-repeat: no-repeat;
  color: var(--on-accent);
  box-shadow: 0 8px 24px -10px rgba(255, 120, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 14px 34px -12px rgba(255, 120, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 32%, transparent);
}

.btn-success:hover {
  background: var(--success);
  color: #04130a;
}

.btn-shop {
  background: var(--text);
  color: var(--bg);
}

.btn-shop:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow);
}

.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }

.btn[disabled],
.btn.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.boot {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

/*
 * Text der Seite im ausgelieferten HTML (fuer Suchmaschinen und falls die App nicht startet). Besucher sehen wie
 * bisher nur den Lade-Kreis: der Text liegt darunter und wird erst nach 6 Sekunden sichtbar - bis dahin hat die
 * App ihn laengst durch die richtige Seite ersetzt.
 */
.boot { position: relative; }
.boot-text {
  position: absolute;
  top: calc(50% + 48px);
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 32px));
  text-align: center;
  color: var(--text-2);
  line-height: 1.6;
  opacity: 0;
  animation: boot-text-in 0.4s ease 6s forwards;
}
.boot-text h1 { font-size: 1.3rem; margin: 0 0 10px; color: var(--text); }
.boot-text p { margin: 0 0 8px; font-size: 0.9rem; }
.boot-text nav { font-size: 0.85rem; }
@keyframes boot-text-in { to { opacity: 1; } }

/* ---------- Karten und Kleinteile ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease), transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background-color 0.3s;
}

.card-pad {
  padding: clamp(18px, 3vw, 28px);
}

.card-hover:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.rank {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--rank-color);
  background: color-mix(in srgb, var(--rank-color) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--rank-color) 28%, transparent);
  line-height: 1;
  vertical-align: middle;
}

.name {
  font-weight: 600;
  color: var(--rank-color, var(--text));
}

.name-default {
  color: var(--text);
}

.player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Weitere Konten im Kontomenue */
.account-list:empty {
  display: none;
}

.account-list-title {
  display: block;
  padding: 6px 14px 2px;
}

.account-item .account-name {
  font-weight: 600;
}

/* Spieler fuehren zu ihrem Profil */
.player-link,
a.player-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.player-link:hover .name,
.player-link:focus-visible .name,
.player-link.name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-avatar-link {
  display: inline-block;
  border-radius: 16px;
  transition: transform 0.2s var(--ease);
}

.post-avatar-link:hover {
  transform: scale(1.04);
}

.locked-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Spielerliste im Admin-Panel */
.pl-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pl-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) 0.6fr 1.2fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
}

.pl-head {
  padding-top: 0;
  padding-bottom: 0;
}

.pl-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pl-sort:hover,
.pl-sort:focus-visible,
.pl-sort.active {
  color: var(--text);
  outline: none;
}

.pl-sort.active {
  font-weight: 700;
}

.pl-sort-arrow {
  color: var(--accent-text);
}

.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.pl-day {
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: inherit;
  text-decoration: none;
}

a.pl-link {
  border-radius: 8px;
  padding: 2px 4px;
}

a.pl-link:hover {
  background: var(--surface-2);
}

.pl-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.pl-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
}

@media (min-width: 900px) {
  .pl-wide {
    grid-column: span 2;
  }
}

.pl-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.pl-kv > span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.pl-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pl-trow {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 0.6fr 0.8fr 1fr 0.9fr;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}

.pl-report {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
}

.pl-scroll {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pl-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.pl-game {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-game summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pl-game-part {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}

.pl-with {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.pl-with-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 760px) {
  .pl-row {
    grid-template-columns: 1fr 1fr;
  }

  .pl-row > .player {
    grid-column: 1 / -1;
  }

  /* Auf dem Handy bleiben die Ueberschriften als Sortier-Knoepfe */
  .pl-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
  }

  .pl-cell::before {
    content: attr(data-label) ": ";
    color: var(--text-3);
    font-size: 12px;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.pill svg { width: 14px; height: 14px; }
.pill-success { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.pill-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.pill-warning { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.pill-accent { color: var(--accent-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: ping 1.8s var(--ease) infinite;
}

.live-dot.off,
.live-dot.off::after {
  background: var(--text-3);
  animation: none;
}

@keyframes ping {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(2.8); opacity: 0; }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  image-rendering: pixelated;
  background: var(--surface-2);
  flex-shrink: 0;
  object-fit: cover;
}

.avatar-xs { width: 22px; height: 22px; border-radius: 6px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 8px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 14px; }
.avatar-xl { width: 104px; height: 104px; border-radius: 22px; }

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(36px, 6vw, 64px) 20px;
  text-align: center;
  color: var(--text-2);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text-3);
  margin-bottom: 6px;
}

.empty-icon svg { width: 26px; height: 26px; }
.empty h3 { font-size: 18px; color: var(--text); }

kbd,
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), background-color 0.2s;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--surface-2);
}

.textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.select option {
  background: var(--surface-solid);
}

.hint {
  font-size: 12.5px;
  color: var(--text-3);
}

.form-error {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  animation: shake 0.4s var(--ease);
}

@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 46px;
}

.input-wrap .icon-button {
  position: absolute;
  right: 3px;
  top: 3px;
}

.switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 46px;
  height: 28px;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  transition: background-color 0.3s var(--ease), border-color 0.3s;
  pointer-events: none;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s var(--ease-spring), background-color 0.3s;
}

.switch input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(18px);
  background: #fff;
}

.switch input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: background-color 0.25s var(--ease), color 0.25s, box-shadow 0.25s;
}

.segmented button svg { width: 16px; height: 16px; }

.segmented button:hover {
  color: var(--text);
}

.segmented button.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-soft), 0 0 0 1px var(--border);
}

/* Spieler-Tracker auf der Stats-Seite */
.tracker { display: flex; flex-direction: column; gap: 16px; }
.tracker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tracker-head .card-title { display: flex; align-items: center; gap: 8px; }
.tracker-head .card-title svg { width: 18px; height: 18px; }
.tracker-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.tracker-pager { display: flex; align-items: center; gap: 10px; }
.tracker-pager[hidden] { display: none; }
.tracker-pager .icon-button:disabled { opacity: 0.35; cursor: default; }
.tracker-period { min-width: 190px; text-align: center; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tracker-figures { display: flex; gap: 28px; flex-wrap: wrap; }
.tracker-figures div { display: flex; flex-direction: column; gap: 2px; }
.tracker-figures span { font-size: 12.5px; color: var(--text-3); }
.tracker-figures strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.tracker-chart { position: relative; min-height: 220px; touch-action: pan-y; transition: opacity 0.2s; }
.tracker-chart.loading { opacity: 0.45; }
.tracker-chart svg { display: block; max-width: 100%; }
.tracker-grid { stroke: var(--border); stroke-width: 1; }
.tracker-axis { fill: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tracker-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tracker-stop-a { stop-color: var(--accent); stop-opacity: 0.26; }
.tracker-stop-b { stop-color: var(--accent); stop-opacity: 0; }
.tracker-guide { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tracker-dot { fill: var(--accent); stroke: var(--surface-solid); stroke-width: 2; }
.tracker-tip {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
}
.tracker-tip[hidden] { display: none; }
.tracker-tip span { color: var(--text-3); }

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.3s var(--ease);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.dropzone.dragover {
  transform: scale(1.01);
}

.dropzone svg { width: 24px; height: 24px; color: var(--accent-text); }
.dropzone input { display: none; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  animation: pop-in 0.35s var(--ease-spring) both;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb .progress {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
}

.thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.thumb-remove svg { width: 14px; height: 14px; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  animation: pop-in 0.35s var(--ease-spring) both;
}

.file-chip-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  flex-shrink: 0;
}

.file-chip-icon svg { width: 18px; height: 18px; }

.progress {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  border-radius: inherit;
  transition: width 0.3s var(--ease);
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: -4% 0 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 108%;
  object-fit: cover;
  transform: scale(1.06);
  animation: hero-zoom 2.4s var(--ease) both;
  will-change: transform;
}

@keyframes hero-zoom {
  from { transform: scale(1.18); filter: saturate(0.6) brightness(0.7); }
  to { transform: scale(1.06); filter: none; }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 7, 10, 0.55) 0%, rgba(7, 7, 10, 0.15) 30%, rgba(7, 7, 10, 0.4) 62%, var(--bg) 100%),
    radial-gradient(120% 70% at 20% 100%, rgba(7, 7, 10, 0.75), transparent 60%);
}

[data-theme="light"] .hero::before {
  background:
    linear-gradient(180deg, rgba(10, 10, 16, 0.45) 0%, rgba(10, 10, 16, 0.1) 32%, rgba(10, 10, 16, 0.35) 64%, var(--bg) 100%),
    radial-gradient(120% 70% at 20% 100%, rgba(10, 10, 16, 0.55), transparent 60%);
}

.hero-content {
  position: relative;
  width: 100%;
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: clamp(56px, 9vw, 110px);
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: rise 0.9s var(--ease) 0.1s both;
}

.hero-title {
  margin-top: 18px;
  font-size: clamp(64px, 14vw, 188px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.86;
  display: flex;
  flex-wrap: wrap;
}

.hero-title span {
  display: inline-block;
  animation: letter 1s var(--ease) both;
  animation-delay: calc(0.15s + var(--i) * 0.045s);
}

.hero-title .hot {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(255, 110, 0, 0.35));
}

@keyframes letter {
  from { opacity: 0; transform: translateY(0.4em) rotate(4deg); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: var(--letter-glow, none); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-tagline {
  max-width: 560px;
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  animation: rise 0.9s var(--ease) 0.55s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  animation: rise 0.9s var(--ease) 0.7s both;
}

.ip-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 8px 0 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  color: #fff;
  transition: transform 0.35s var(--ease), background-color 0.3s, border-color 0.3s;
}

.ip-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

.ip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-align: left;
  line-height: 1.2;
}

.ip-address {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ip-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: #fff;
  color: #0b0b0f;
  font-size: 14px;
  font-weight: 700;
}

.ip-copy svg { width: 16px; height: 16px; }

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.hero-scroll::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: #fff;
  animation: scroll-hint 2s var(--ease) infinite;
}

@keyframes scroll-hint {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Zahlenleiste ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.stats-strip .stat {
  padding: 26px 24px;
  border-right: 1px solid var(--border);
}

.stats-strip .stat:last-child {
  border-right: 0;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- Spielmodi ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.mode-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}

.mode-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.mode-card.wide {
  grid-column: span 3;
}

.mode-card.feature {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
}

.mode-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

/* Modus ohne Screenshot: Verlauf mit grossem Icon */
.mode-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
    radial-gradient(circle at 75% 85%, color-mix(in srgb, var(--success) 30%, transparent), transparent 55%),
    var(--surface-2);
  color: var(--accent-text);
}

.mode-art svg {
  width: 30%;
  height: auto;
  max-width: 120px;
  opacity: 0.85;
}

.mode-card.feature .mode-media {
  aspect-ratio: auto;
  min-height: 380px;
}

.mode-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 0.6s;
}

.mode-card:hover .mode-media img {
  transform: scale(1.07);
}

.mode-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.mode-media.bright img {
  filter: brightness(1.9) contrast(1.1) saturate(1.2);
}

.collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
}

.collage img:first-child {
  grid-row: span 2;
}

.mode-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mode-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  flex: 1;
}

.mode-card.feature .mode-body {
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
  gap: 16px;
}

.mode-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mode-card.feature .mode-title {
  font-size: clamp(28px, 3.4vw, 40px);
}

.mode-text {
  color: var(--text-2);
  font-size: 14.5px;
}

.mode-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.command {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feature {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.5s var(--ease), border-color 0.3s, background-color 0.3s;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 18px;
  transition: transform 0.5s var(--ease-spring);
}

.feature:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
}

.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 14.5px; }

/* ---------- Raenge ---------- */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rank-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.5s var(--ease);
}

.rank-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--rank-color);
  opacity: 0.9;
}

.rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rank-color) 20%, transparent) 0%, color-mix(in srgb, var(--rank-color) 7%, transparent) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.rank-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--rank-color) 45%, var(--border));
  box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--rank-color) 60%, transparent);
}

.rank-card:hover::after {
  opacity: 1;
}

.rank-card-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--rank-color);
}

.rank-card-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
}

.perks li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.perks svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--rank-color, var(--accent));
  flex-shrink: 0;
}

/* ---------- Galerie ---------- */

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 560px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px clamp(16px, 4vw, 32px) 20px;
  scrollbar-width: none;
  cursor: grab;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: center;
  background: var(--surface-2);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.gallery figure:hover img {
  transform: scale(1.05);
}

.gallery figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
}

.gallery-controls {
  display: flex;
  gap: 8px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-in 0.3s var(--ease) both;
}

.lightbox img {
  max-width: min(1400px, 100%);
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  animation: zoom-in 0.45s var(--ease) both;
}

.lightbox .icon-button {
  position: absolute;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox .close { top: 20px; right: 20px; }
.lightbox .prev { left: 20px; top: 50%; }
.lightbox .next { right: 20px; top: 50%; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-card.lead {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}

.news-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.news-card.lead .news-cover {
  aspect-ratio: auto;
  min-height: 320px;
}

.news-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.news-card:hover .news-cover img {
  transform: scale(1.05);
}

.news-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  flex: 1;
}

.news-card.lead .news-body {
  justify-content: center;
  padding: clamp(24px, 4vw, 44px);
}

.news-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.news-card.lead .news-title {
  font-size: clamp(26px, 3vw, 36px);
}

.news-excerpt {
  color: var(--text-2);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--text-3);
}

.meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta svg { width: 15px; height: 15px; }

.article-cover {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 36px;
  background: var(--surface-2);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-title {
  font-size: clamp(34px, 5.5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
  margin: 14px 0 20px;
}

.prose {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-top: 1em;
}

.prose ul {
  padding-left: 1.3em;
  margin-block: 0;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--accent);
}

.prose a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.4em;
}

.prose strong {
  font-weight: 700;
}

.prose-sm {
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- Rangliste ---------- */

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lb-row {
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: 36px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  transition: background-color 0.25s;
}

.lb-row:hover {
  background: var(--surface-2);
}

.lb-place {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-3);
  background: var(--surface);
}

.lb-row:nth-child(1) .lb-place { color: #1a1200; background: linear-gradient(135deg, #ffe27a, #f2a900); }
.lb-row:nth-child(2) .lb-place { color: #15151a; background: linear-gradient(135deg, #f1f1f5, #a9adb8); }
.lb-row:nth-child(3) .lb-place { color: #1d0d02; background: linear-gradient(135deg, #f2b27a, #b9642a); }

.lb-level {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lb-level small {
  display: block;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---------- Forum ---------- */

.forum-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.cat-list {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text-2);
  font-weight: 550;
  transition: background-color 0.25s, color 0.25s;
}

.cat-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.cat-item.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--cat-color, var(--accent-text));
  flex-shrink: 0;
}

.cat-item.active .cat-icon {
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 16%, transparent);
}

.cat-icon svg { width: 17px; height: 17px; }

.cat-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.cat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.thread-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.thread-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  transition: background-color 0.25s;
}

.thread-row:first-child {
  border-top: 0;
}

.thread-row:hover {
  background: var(--surface);
}

.thread-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  min-width: 0;
}

.thread-title span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-title svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent-text);
}

.thread-side {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--text-3);
}

.thread-side .replies {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.thread-side svg { width: 15px; height: 15px; }

.posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  animation: rise 0.6s var(--ease) both;
}

.post-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.post-aside .name {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.post-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 26px;
  min-width: 0;
}

.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.post-images button {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}

.post-images video {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: #000;
  object-fit: contain;
}

.post-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.post-images button:hover img {
  transform: scale(1.06);
}

.post-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.post.highlight {
  box-shadow: var(--glow);
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Profil ---------- */

.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(22px, 4vw, 40px);
  overflow: hidden;
}

.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--rank-color, var(--accent)) 16%, transparent), transparent 60%);
  pointer-events: none;
}

.profile-name {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.level-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  margin-left: auto;
}

.level-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.level-ring circle {
  fill: none;
  stroke-width: 9;
}

.level-ring .track {
  stroke: var(--surface-2);
}

.level-ring .value {
  stroke: url(#level-gradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.6s var(--ease);
}

.level-ring .label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.level-ring .label b {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.level-ring .label small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.kpi {
  padding: 20px 22px;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.kpi-label svg { width: 16px; height: 16px; color: var(--text-3); }

.kpi-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.mode-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px;
}

.stat-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.stat-card-icon svg { width: 20px; height: 20px; }

.mc-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.mc-line {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.mc-line b {
  font-weight: 700;
}

.ban-card {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--danger) 10%, transparent), transparent 55%),
    var(--surface);
}

.ban-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.ban-grid dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.ban-grid dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.ok-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ok-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  flex-shrink: 0;
}

.ok-icon svg { width: 24px; height: 24px; }

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.appeal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
}

.reply-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}

/* ---------- Einstellungen ---------- */

.settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-group {
  padding: 8px clamp(18px, 3vw, 28px);
}

.settings-group-title {
  padding: 18px 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.settings-group-title + .settings-row {
  border-top: 0;
}

.settings-row .grow p {
  font-size: 13.5px;
  color: var(--text-2);
  margin-top: 2px;
}

.settings-row h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Admin ---------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 28px;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.tabs a svg { width: 17px; height: 17px; }

.tabs a:hover {
  color: var(--text);
}

.tabs a.active {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft), 0 0 0 1px var(--border);
}

.tabs .count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  background: var(--danger);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* ---------- Anmeldung ---------- */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: hero-zoom 2.4s var(--ease) both;
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
}

.auth-visual-text {
  position: absolute;
  left: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  bottom: clamp(24px, 5vw, 56px);
  color: #fff;
}

.auth-visual-text h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-visual-text p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 440px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 32px) clamp(20px, 5vw, 64px) 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: rise 0.7s var(--ease) both;
}

.auth-card h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-switch {
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
}

.auth-switch a,
.link {
  color: var(--accent-text);
  font-weight: 600;
}

.auth-switch a:hover,
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.waiting {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.waiting-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.waiting-orb svg {
  width: 36px;
  height: 36px;
}

.waiting-orb::before,
.waiting-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: orb 2.4s var(--ease) infinite;
}

.waiting-orb::after {
  animation-delay: 1.2s;
}

@keyframes orb {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(1.9); opacity: 0; }
}

.success-orb {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  animation: pop-in 0.6s var(--ease-spring) both;
}

.success-orb::before,
.success-orb::after {
  display: none;
}

.code-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  min-height: 60px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
}

.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-2);
}

.steps li .step-num {
  flex-shrink: 0;
}

.or {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Overlays ---------- */

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  min-width: 240px;
  padding: 6px;
  border-radius: 18px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform-origin: top right;
  animation: menu-in 0.25s var(--ease) both;
}

@keyframes menu-in {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.dropdown-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-item svg { width: 17px; height: 17px; }

.dropdown-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dropdown-item.danger:hover {
  color: var(--danger);
}

.notif-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(520px, 70vh);
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-2);
  transition: background-color 0.2s;
}

.notif-item:hover {
  background: var(--surface-2);
}

.notif-item.unread {
  color: var(--text);
}

.notif-item.unread::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade-in 0.25s var(--ease) both;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7);
  animation: modal-in 0.4s var(--ease-spring) both;
}

.modal-wide {
  max-width: 720px;
}

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

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 0;
}

.modal-head h3 {
  font-size: 20px;
}

.modal-body {
  padding: 18px 24px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 22px;
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 550;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: toast-in 0.45s var(--ease-spring) both;
  pointer-events: auto;
}

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast.leaving { animation: toast-out 0.3s var(--ease) both; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  font-size: 14px;
}

.banner svg { width: 18px; height: 18px; color: var(--accent-text); flex-shrink: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-anchor {
  position: relative;
  display: inline-flex;
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

/* Ein durchgehender Verlauf ueber die einzeln animierten Buchstaben */
.hero-title .hot {
  background-size: 300% 100%;
  background-position: calc(var(--i, 0) * 50%) 50%;
}

.section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-row .section-head {
  margin-bottom: 0;
}

.big-404 {
  font-family: var(--font-display);
  font-size: clamp(100px, 20vw, 220px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.dropdown-head.row {
  flex-wrap: nowrap;
}

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--radius-xl);
  isolation: isolate;
  color: #fff;
  text-align: center;
}

.cta img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 2s var(--ease);
}

.cta:hover img {
  transform: scale(1.04);
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 120% at 50% 100%, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.72));
}

.cta h2 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.cta p {
  margin: 14px auto 28px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 17px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Hinweis fuer gebannte Spieler ---------- */

.ban-strip {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-height: 42px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, rgba(190, 24, 40, 0.94), rgba(255, 86, 40, 0.94));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -14px rgba(200, 30, 40, 0.8);
  animation: sheet-in 0.5s var(--ease) both;
}

.ban-strip svg {
  width: 16px;
  height: 16px;
}

.ban-strip-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 0.2s;
}

.ban-strip:hover .ban-strip-cta {
  background: rgba(255, 255, 255, 0.3);
}

html.is-banned .page:not(.page-flush) {
  padding-top: calc(var(--nav-h) + 42px + clamp(28px, 5vw, 56px));
}

html.is-banned .hero-content {
  padding-top: calc(var(--nav-h) + 102px);
}

.form-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-hero-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-text);
  flex-shrink: 0;
}

.form-hero-icon svg {
  width: 28px;
  height: 28px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 36px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}

.footer a:hover {
  color: var(--text);
}

.footer-note {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 1080px) {
  .rank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-card { grid-column: span 3; }
  .mode-card.feature { grid-template-columns: 1fr; }
  .mode-card.feature .mode-media { min-height: 300px; }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-actions .hide-mobile { display: none; }
  .nav-burger { display: inline-grid; }
  .nav-inner { justify-content: space-between; }
  .forum-layout { grid-template-columns: 1fr; }
  .cat-list { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .cat-item { flex-shrink: 0; }
  .cat-count { display: none; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-card.lead { grid-column: span 2; grid-template-columns: 1fr; }
  .news-card.lead .news-cover { min-height: 220px; }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip .stat:nth-child(2) { border-right: 0; }
  .stats-strip .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .post { grid-template-columns: 1fr; }
  .post-aside { flex-direction: row; justify-content: flex-start; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); padding: 14px 18px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .rank-grid { grid-template-columns: 1fr; }
  .mode-card,
  .mode-card.wide { grid-column: span 6; }
  .news-grid,
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .news-card.lead { grid-column: span 1; }
  .thread-row { grid-template-columns: 34px minmax(0, 1fr); }
  .thread-side .last { display: none; }
  .thread-side { grid-column: 2; }
  .profile-hero { flex-wrap: wrap; }
  .level-ring { margin-left: 0; width: 96px; height: 96px; }
  .ip-card { width: 100%; justify-content: space-between; }
  .hero-actions .btn { flex: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .settings-row { flex-wrap: wrap; }
  .lightbox .prev,
  .lightbox .next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Rennprofil: Medaillen und Jahreskalender ---------- */

.medal {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 -2px 3px rgb(0 0 0 / 25%);
}

.medal-gold { background: linear-gradient(140deg, #ffe066, #f59f00); }
.medal-silver { background: linear-gradient(140deg, #f1f3f5, #adb5bd); }
.medal-bronze { background: linear-gradient(140deg, #f0a868, #b45309); }

.cal-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 11px);
  grid-auto-columns: 11px;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cal-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.cal-1 { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.cal-2 { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.cal-3 { background: color-mix(in srgb, var(--accent) 75%, transparent); }
.cal-4 { background: var(--accent); }

/* Update-Modus: Leiste unter der Navigation */
.maintenance-strip {
  position: fixed;
  inset: var(--nav-h) 0 auto;
  z-index: 49;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 22%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

/* ---------- TNT-Kanonen: Videos ---------- */

.cannon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.cannon-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cannon-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.cannon-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 1.2s var(--ease), opacity 0.3s var(--ease);
}

.cannon-card:hover .cannon-thumb video {
  transform: scale(1.05);
}

/* Eigenes Vorschaubild ueber dem Video */
.cannon-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.cannon-card:hover .cannon-thumb-image {
  transform: scale(1.05);
}

.cannon-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--glass-strong);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.cannon-play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
  fill: currentColor;
}

.cannon-card:hover .cannon-play {
  transform: scale(1.1);
  background: var(--accent);
  color: var(--on-accent);
}

.cannon-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cannon-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  flex: 1;
}

.cannon-title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}

.cannon-excerpt {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

.cannon-stage {
  margin: 16px 0 22px;
}

.cannon-heading {
  font-size: clamp(24px, 3.4vw, 34px);
}

.command-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.command-row .command {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

/* ---------- Eigener Video-Player ---------- */

.vplayer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  outline: none;
  user-select: none;
}

.vplayer:focus-visible {
  box-shadow: var(--glow);
}

.vplayer:fullscreen {
  border-radius: 0;
  border: 0;
  max-height: none;
}

.vplayer video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.vplayer.idle,
.vplayer.idle video {
  cursor: none;
}

.vp-big {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: var(--on-accent);
  cursor: pointer;
  box-shadow: 0 12px 40px -10px rgba(255, 120, 0, 0.6);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.vp-big svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  fill: currentColor;
}

.vp-big:hover {
  transform: scale(1.08);
}

/* Spulen: Halbkreis links/rechts mit laufenden Pfeilen und den Sekunden (wie YouTube) */
.vp-seekfx {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  background: rgba(255, 255, 255, 0.12);
  transition: opacity 0.35s var(--ease);
}

.vp-seekfx.left {
  left: 0;
  border-radius: 0 50% 50% 0 / 0 50% 50% 0;
}

.vp-seekfx.right {
  right: 0;
  border-radius: 50% 0 0 50% / 50% 0 0 50%;
}

.vp-seekfx.show {
  opacity: 1;
  transition-duration: 0.08s;
}

.vp-seekfx-arrows {
  display: flex;
  gap: 2px;
}

.vp-seekfx.left .vp-seekfx-arrows {
  flex-direction: row-reverse;
}

.vp-seekfx-arrows i {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  opacity: 0.25;
}

.vp-seekfx.left .vp-seekfx-arrows i {
  border-left: 0;
  border-right: 14px solid #fff;
}

.vp-seekfx.show .vp-seekfx-arrows i {
  animation: seek-arrow 0.6s linear infinite;
}

.vp-seekfx.show .vp-seekfx-arrows i:nth-child(2) {
  animation-delay: 0.15s;
}

.vp-seekfx.show .vp-seekfx-arrows i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes seek-arrow {
  0%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}

.vp-seekfx-text {
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  animation: none;
}

.vp-seekfx.show .vp-seekfx-text {
  animation: pop-in 0.25s var(--ease);
}

.vplayer:not(.paused) .vp-big {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.vp-spinner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.vp-error {
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 16px;
  border-radius: 10px;
}

.vp-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 14px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: #fff;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.vplayer.idle .vp-controls {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.vp-bar {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.vp-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  transition: height 0.15s var(--ease);
}

.vp-bar:hover .vp-track,
.vplayer.seeking .vp-track {
  height: 6px;
}

.vp-buffered,
.vp-played {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
}

.vp-buffered {
  background: rgba(255, 255, 255, 0.3);
}

.vp-played {
  background: var(--grad);
}

.vp-knob {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 163, 26, 0.45);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
  pointer-events: none;
}

.vp-bar:hover .vp-knob,
.vplayer.seeking .vp-knob {
  transform: scale(1);
}

.vp-hover-time {
  position: absolute;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

.vp-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.vp-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.vp-btn:hover,
.vp-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.vp-btn svg {
  width: 20px;
  height: 20px;
}

.vp-btn svg[viewBox] path:only-child {
  fill: currentColor;
}

.vp-volume-wrap {
  display: flex;
  align-items: center;
}

.vp-volume {
  width: 0;
  opacity: 0;
  accent-color: var(--accent);
  transition: width 0.25s var(--ease), opacity 0.25s var(--ease);
}

.vp-volume-wrap:hover .vp-volume,
.vp-volume:focus-visible {
  width: 84px;
  opacity: 1;
  margin: 0 8px 0 2px;
}

.vp-time {
  margin-left: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.9;
}

.vp-speed {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.vp-speed option {
  color: #111;
}

/* Qualitaet: Zahnrad mit HD-Zeichen und ein Menue darueber */
.vp-quality-btn {
  position: relative;
}

.vp-quality-btn svg {
  transition: transform 0.3s var(--ease);
}

.vplayer.menu-open .vp-quality-btn svg {
  transform: rotate(30deg);
}

.vp-hd {
  position: absolute;
  top: 5px;
  right: 3px;
  padding: 0 3px;
  border-radius: 3px;
  background: #e5332a;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 12px;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.vp-hd[hidden] {
  display: none;
}

.vp-menu {
  position: absolute;
  right: 12px;
  bottom: 70px;
  z-index: 4;
  min-width: 220px;
  max-height: calc(100% - 90px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  animation: vp-menu-in 0.2s var(--ease);
}

.vp-menu[hidden] {
  display: none;
}

@keyframes vp-menu-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.vp-menu-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 8px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
}

.vp-menu-head svg {
  width: 15px;
  height: 15px;
}

.vp-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.vp-menu-item:hover,
.vp-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.vp-menu-check {
  width: 16px;
  display: grid;
  place-items: center;
  visibility: hidden;
  color: var(--accent);
}

.vp-menu-check svg {
  width: 16px;
  height: 16px;
}

.vp-menu-item.active .vp-menu-check {
  visibility: visible;
}

.vp-menu-item.active {
  font-weight: 700;
}

.vp-menu-label {
  flex: 1;
  font-variant-numeric: tabular-nums;
}

.vp-menu-sub {
  font-size: 12px;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.vp-menu-hd {
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
}

/* Letztes Bild beim Umschalten der Qualitaet */
.vp-freeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.vp-freeze[hidden] {
  display: none;
}

.cannon-quality-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -10px 0 18px;
}

.cannon-quality-note svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

/* Kapitel */
.vp-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vp-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(0, 0, 0, 0.75);
}

.vp-chapter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 34%;
  height: 32px;
  margin-left: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.vp-chapter:hover,
.vp-chapter:focus-visible,
.vplayer.chapters-open .vp-chapter {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.vp-chapter svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.vp-chapter-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vp-chapters {
  position: absolute;
  top: 12px;
  left: 12px;
  bottom: 78px;
  width: min(300px, 46%);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 3;
  animation: vp-chapters-in 0.25s var(--ease);
}

.vp-chapters[hidden] {
  display: none;
}

@keyframes vp-chapters-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
}

.vp-chapters-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vp-chapters-count {
  font-size: 12px;
  opacity: 0.6;
}

.vp-chapters-close {
  width: 32px;
  height: 32px;
}

.vp-chapters-list {
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vp-chapters-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.vp-chapters-item:hover,
.vp-chapters-item:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.vp-chapters-item.active {
  background: rgba(255, 163, 26, 0.18);
}

.vp-chapters-item.active .vp-chapters-time {
  color: var(--accent);
}

.vp-chapters-time {
  flex: none;
  min-width: 42px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.vp-chapters-title {
  line-height: 1.35;
}

.vplayer.chapters-open .vp-big {
  opacity: 0.35;
}

.cannon-chapters .card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin-bottom: 10px;
}

.cannon-chapters .card-title svg {
  width: 18px;
  height: 18px;
}

.cannon-chapters-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cannon-chapter {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cannon-chapter:hover,
.cannon-chapter:focus-visible {
  background: var(--surface-2, rgba(127, 127, 127, 0.12));
  outline: none;
}

.cannon-chapter-time {
  flex: none;
  min-width: 48px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

@media (max-width: 640px) {
  .vplayer {
    border-radius: 12px;
  }

  .vp-chapters {
    top: 8px;
    left: 8px;
    bottom: 56px;
    width: min(260px, 70%);
  }

  .vp-chapter {
    max-width: 40%;
    margin-left: 2px;
  }

  .vp-big {
    width: 52px;
    height: 52px;
    margin: -44px 0 0 -26px;
  }

  .vp-big svg {
    width: 22px;
    height: 22px;
  }

  .vp-controls {
    padding: 20px 8px 4px;
  }

  .vp-btn {
    width: 34px;
    height: 34px;
  }

  .vp-time {
    font-size: 12px;
  }

  .vp-volume-wrap .vp-volume {
    display: none;
  }

  .vp-row .vp-btn:nth-child(2),
  .vp-row .vp-btn:nth-child(3) {
    display: none;
  }
}

/* ---------- Thumbnail-Editor ---------- */

.te {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  animation: fade-in 0.2s var(--ease);
}

.te-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.te-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
  font-size: 15px;
}

.te-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.te-size {
  margin-left: 6px;
}

.te-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 76px 300px minmax(0, 1fr) 320px;
}

.te-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 6px;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow-y: auto;
}

.te-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.te-tab svg {
  width: 20px;
  height: 20px;
}

.te-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.te-tab.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.te-panel,
.te-inspector {
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-elevated);
}

.te-panel {
  border-right: 1px solid var(--border);
}

.te-inspector {
  border-left: 1px solid var(--border);
}

.te-panel-title {
  margin: 0;
  font-size: 18px;
}

.te-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: radial-gradient(circle at 50% 40%, var(--surface-2), transparent 70%), var(--bg);
  overflow: auto;
}

.te-canvas-wrap {
  width: 100%;
  max-width: calc((100vh - 260px) * 16 / 9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  outline: 1px solid var(--border-strong);
}

.te-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}

.te-tip {
  margin: 0;
  text-align: center;
}

.te-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.te-heading svg {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
}

.te-heading .faint {
  margin-left: auto;
}

.te-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.te-block:last-child {
  border-bottom: 0;
}

.te-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
}

.te-hint svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.te-hint p {
  margin: 0;
}

.te-scene {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #000;
  object-fit: contain;
}

.te-scrub {
  display: flex;
  align-items: center;
  gap: 8px;
}

.te-scrub input {
  flex: 1;
  accent-color: var(--accent);
}

.te-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.te-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.te-steps .btn {
  justify-content: center;
  padding-inline: 4px;
  font-family: var(--font-mono);
}

.te-ideas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.te-idea {
  position: relative;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.te-idea canvas {
  display: block;
  width: 100%;
  height: auto;
}

.te-idea span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
}

.te-idea:hover {
  outline: 2px solid var(--accent);
}

.te-add {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.te-add:hover,
.te-style:hover,
.te-tile:hover {
  border-color: var(--accent);
}

.te-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.te-grid-1 {
  grid-template-columns: 1fr;
}

.te-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.te-style {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1c1c24;
  color: #c8c8d2;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.te-style canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.te-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1c1c24;
  cursor: pointer;
}

.te-tile canvas {
  width: 100%;
  height: auto;
}

.te-emoji {
  font-size: 24px;
  line-height: 1;
}

.te-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.te-badge {
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}

.te-badge:hover {
  transform: scale(1.06);
}

.te-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.te-field-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.te-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.te-slider {
  display: flex;
  align-items: center;
  gap: 8px;
}

.te-slider input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

.te-num {
  width: 64px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.te-field input[type="color"] {
  width: 44px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.te-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.te-select {
  padding: 6px 10px;
  font-size: 13px;
}

.te-segs {
  display: flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-2);
}

.te-seg {
  flex: 1;
  padding: 5px 6px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.te-seg.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.te-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.te-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.te-group summary::-webkit-details-marker {
  display: none;
}

.te-group summary::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.te-group[open] summary::after {
  transform: rotate(225deg);
}

.te-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.te-group-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 12px 12px;
}

.te-layers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.te-layer-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 220px;
  overflow-y: auto;
}

.te-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.te-layer > svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--text-3);
}

.te-layer:hover {
  background: var(--surface-2);
}

.te-layer.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.te-layer.hidden .te-layer-name {
  opacity: 0.45;
}

.te-layer-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.te-mini {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}

.te-mini svg {
  width: 15px;
  height: 15px;
}

.te-mini:hover {
  background: var(--surface-2);
  color: var(--text);
}

.te-props {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.te-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.te-text {
  min-height: 60px;
  font-size: 14px;
}

.te-saved {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.te-saved img,
.te-saved-empty {
  flex: none;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.te-saved-empty {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
}

.te-saved-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.te-saved-body strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.te-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.te-chip {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.te-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.te-ailog {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.te-ai-entry {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
}

.te-ai-entry p {
  margin: 0;
}

.te-ai-entry .te-ai-prompt {
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
}

.te-ai-error {
  color: var(--danger);
}

/* Thumbnail im Upload-Dialog */
.te-thumb-box {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.te-thumb-box > img,
.te-thumb-empty {
  width: 220px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.te-thumb-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text-3);
  font-size: 12px;
}

.te-thumb-empty svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 1280px) {
  .te-body {
    grid-template-columns: 68px 260px minmax(0, 1fr) 280px;
  }
}

@media (max-width: 1000px) {
  .te-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow-y: auto;
  }

  .te-rail {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }

  .te-stage {
    order: -1;
    padding: 12px;
  }

  .te-canvas-wrap {
    max-width: none;
  }

  .te-panel,
  .te-inspector {
    overflow: visible;
    border: 0;
  }

  .te-size {
    display: none;
  }
}

/* Editor-Buehne: Canvas mit Zoom, schwebende Leiste am Element (wie Adobe Express) */
.te-stage {
  justify-content: safe center;
  align-items: safe center;
}

.te-canvas-area {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 56px 0 8px;
}

.te-canvas-area.zoomed {
  width: max-content;
}

.te-canvas-area.zoomed .te-canvas-wrap {
  max-width: none;
}

.te-stage-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.te-zoom {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.te-zoom-label {
  min-width: 64px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.te-zoom-label:hover {
  background: var(--surface-2);
}

.te-float {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
  white-space: nowrap;
  animation: pop-in 0.15s var(--ease);
}

.te-float[hidden] {
  display: none;
}

.te-float-font {
  max-width: 150px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.te-float .te-num {
  width: 58px;
}

.te-float input[type="color"] {
  width: 30px;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.te-float-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--border-strong);
}

.te-mini.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.te-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
}

.te-star {
  color: var(--accent-text);
  font-size: 12px;
}

.te-swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
}

.te-swatch:hover {
  transform: scale(1.15);
}

/* Empfehlungen, Bewertung und Feed-Vorschau im Thumbnail-Editor */
.te-advice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 14px;
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
}

.te-advice .te-heading {
  margin: 0;
}

.te-advice .pill {
  margin-left: auto;
  font-size: 11px;
}

.te-score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.te-score-ring {
  --score: 0;
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--bg-elevated) 76%, transparent 78%),
    conic-gradient(var(--accent) calc(var(--score) * 1%), var(--surface-2) 0);
}

.te-score-ring b {
  font-size: 16px;
}

.te-font-chip {
  font-size: 14px;
  color: var(--text);
}

.te-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.te-palette-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.te-palette-item:hover {
  border-color: var(--accent);
  color: var(--text);
}

.te-palette-item .te-swatch {
  flex: none;
  width: 16px;
  height: 16px;
}

.te-tips {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-2);
}

.te-recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.te-recommended span {
  color: var(--accent-text);
}

.te-feed summary svg {
  width: 15px;
  height: 15px;
  color: var(--accent-text);
}

.te-feed-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.te-feed-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.te-feed-thumb canvas {
  display: block;
  width: 100%;
  height: auto;
}

.te-feed-time {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.te-feed-meta {
  display: flex;
  gap: 8px;
}

.te-feed-meta > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.te-feed-meta strong {
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.te-feed-meta span:not(.te-feed-avatar) {
  font-size: 11px;
  color: var(--text-3);
}

.te-feed-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 800;
}

.te-feed-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.te-feed-mini canvas {
  flex: none;
  width: 160px;
  height: 90px;
  border-radius: 6px;
}

/* ---------- Liquid Glass: alles, was auf einem Bild liegt ---------- */
/* Milchglas mit Lichtkante oben und weichem Schatten - lesbar auf jedem Bild, in Hell und Dunkel gleich */

:root {
  --lg-fill: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0.1) 100%), rgba(14, 14, 20, 0.28);
  --lg-fill-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.1) 55%, rgba(255, 255, 255, 0.14) 100%), rgba(14, 14, 20, 0.22);
  --lg-edge: rgba(255, 255, 255, 0.28);
  --lg-shine: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -10px 20px -12px rgba(255, 255, 255, 0.12), 0 14px 36px -14px rgba(0, 0, 0, 0.55);
  --lg-blur: blur(22px) saturate(190%);
}

.hero-kicker,
.ip-card,
.btn-glass {
  background: var(--lg-fill);
  border: 1px solid var(--lg-edge);
  box-shadow: var(--lg-shine);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  color: #fff;
}

.ip-card:hover,
.btn-glass:hover {
  background: var(--lg-fill-hover);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Der Kopier-Knopf ist die Hauptaktion - in der Markenfarbe statt reinem Weiss */
.ip-copy {
  background: var(--grad);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 20px -8px rgba(255, 107, 0, 0.7);
}

/* Navigation ueber dem Hero-Bild: Links in einer Glas-Kapsel, alles hell */
.nav:not(.solid):not(.scrolled) .nav-links,
.nav:not(.solid):not(.scrolled) .user-chip,
.nav:not(.solid):not(.scrolled) .icon-button {
  background: var(--lg-fill);
  border: 1px solid var(--lg-edge);
  box-shadow: var(--lg-shine);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  color: #fff;
}

.nav:not(.solid):not(.scrolled) .icon-button {
  border-radius: 999px;
}

.nav:not(.solid):not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nav:not(.solid):not(.scrolled) .nav-link:hover,
.nav:not(.solid):not(.scrolled) .nav-link.active {
  color: #fff;
}

.nav:not(.solid):not(.scrolled) .nav-indicator {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav:not(.solid):not(.scrolled) .user-chip:hover,
.nav:not(.solid):not(.scrolled) .icon-button:hover {
  background: var(--lg-fill-hover);
}

/* Beim Scrollen: eine ruhige Glasleiste mit feiner Lichtkante */
.nav.scrolled,
.nav.solid {
  box-shadow: inset 0 -1px 0 var(--border), 0 12px 32px -26px rgba(0, 0, 0, 0.5);
}

/* Hero-Text: weiss mit weichem Schatten, damit er auf hellen Stellen des Bildes steht */
.hero-title span:not(.hot),
.hero-tagline {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

/* ---------- Hell-Modus ---------- */

/* Der Hero bleibt dunkel wie ein Kinobild - erst ganz unten geht er in den hellen Hintergrund ueber.
   Vorher lag ein milchiger Schleier ueber dem Bild und der weisse Text verschwand darin. */
[data-theme="light"] .hero::before {
  background:
    linear-gradient(180deg, rgba(8, 8, 14, 0.5) 0%, rgba(8, 8, 14, 0.14) 28%, rgba(8, 8, 14, 0.42) 62%, rgba(8, 8, 14, 0.62) 86%, var(--bg) 100%),
    radial-gradient(110% 70% at 18% 92%, rgba(8, 8, 14, 0.6), transparent 62%);
}

[data-theme="light"] .hero-scroll {
  display: none;
}

/* Heller Glas-Look fuer die Leiste beim Scrollen */
[data-theme="light"] .nav.scrolled,
[data-theme="light"] .nav.solid {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -1px 0 rgba(12, 12, 24, 0.08), 0 10px 30px -24px rgba(20, 20, 40, 0.35);
}

[data-theme="light"] .logo-block {
  filter: drop-shadow(0 6px 12px rgba(216, 50, 30, 0.28));
}

/* ---------- Hell-Modus: klare, weisse Flaechen statt fast durchsichtiger ---------- */
/* Karten heben sich wie Papier vom leicht grauen Grund ab - mit feinem Rand und weichem Schatten */

[data-theme="light"] {
  --bg: #f3f3f6;
  --card: #ffffff;
  --card-shadow: 0 1px 2px rgba(18, 18, 36, 0.04), 0 10px 30px -18px rgba(18, 18, 36, 0.18);
  --card-shadow-hover: 0 2px 4px rgba(18, 18, 36, 0.05), 0 18px 40px -18px rgba(18, 18, 36, 0.24);
}

[data-theme="light"] .card,
[data-theme="light"] .mode-card,
[data-theme="light"] .kpi,
[data-theme="light"] .stat-card {
  background: var(--card);
  border-color: rgba(18, 18, 36, 0.07);
  box-shadow: var(--card-shadow);
}

[data-theme="light"] .card-hover:hover,
[data-theme="light"] .mode-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(242, 140, 0, 0.35);
}

/* Eingabefelder hell und klar umrandet */
[data-theme="light"] .input,
[data-theme="light"] .textarea,
[data-theme="light"] select.input {
  background: #ffffff;
  border-color: rgba(18, 18, 36, 0.12);
}

[data-theme="light"] .input:focus,
[data-theme="light"] .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 140, 0, 0.14);
}

/* Zweit-Knoepfe: weiss mit Rand statt grauem Schleier */
[data-theme="light"] .btn-secondary {
  background: #ffffff;
  border-color: rgba(18, 18, 36, 0.12);
  box-shadow: 0 1px 2px rgba(18, 18, 36, 0.05);
}

[data-theme="light"] .btn-secondary:hover {
  border-color: rgba(18, 18, 36, 0.22);
}

/* Dropdowns und Dialoge wie schwebende Karten */
[data-theme="light"] .dropdown,
[data-theme="light"] .modal {
  background: #ffffff;
  box-shadow: 0 24px 60px -20px rgba(18, 18, 36, 0.3);
}

/* Im Thumbnail-Editor bleibt die Buehne dunkel (Bilder wirken dort wie im YouTube-Feed) */
[data-theme="light"] .te-style,
[data-theme="light"] .te-tile {
  background: #1c1c24;
}

/* ---------- Hero-Schriftzug ---------- */
/* Russo One: eckige, blockige Buchstaben wie Minecraft-Bloecke - passt zum Pixel-TNT-Logo */
@font-face {
  font-family: "TW Hero";
  src: url("/assets/fonts/thumb/russoone-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

.hero-title {
  font-family: "TW Hero", var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

/* WARS: weiss mit leichtem Glas-Schimmer nach unten, weicher Schatten statt flachem Weiss */
.hero-title span:not(.hot) {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 42%, #d6dce8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  --letter-glow: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.38));
  filter: var(--letter-glow);
}

/* TNT: der Marken-Verlauf mit warmem Leuchten */
.hero-title .hot {
  --letter-glow: drop-shadow(0 8px 30px rgba(255, 100, 0, 0.4));
  filter: var(--letter-glow);
}

/* Die Verlaufs-Farbe liegt nur im Kasten jedes Buchstabens - Russo One ragt ueber die enge Zeilenhoehe hinaus,
   ohne Luft waeren oben und unten Stuecke abgeschnitten. Innen Platz, aussen gleich viel zurueck: Layout bleibt gleich */
.hero-title span {
  padding: 0.14em 0.05em;
  margin: -0.14em -0.05em;
}

/* ---------- Freistellen (KI im Browser) ---------- */
.te-cut {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  animation: fade-in 0.2s var(--ease);
}

.te-cut-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.te-cut-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
}

.te-cut-side .te-heading {
  margin-top: 8px;
}

.te-cut-side p {
  margin: 0;
}

.te-cut-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.te-cut-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.te-cut-tool svg {
  width: 16px;
  height: 16px;
}

.te-cut-tool:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.te-cut-tool.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.te-cut-status {
  min-height: 18px;
}

.te-cut-stage {
  min-width: 0;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  padding: 24px;
  overflow: auto;
  background: radial-gradient(circle at 50% 40%, var(--surface-2), transparent 70%), var(--bg);
}

.te-cut-canvas {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: 10px;
  box-shadow: var(--shadow);
  touch-action: none;
}

.te-cut.busy .te-cut-canvas {
  cursor: progress !important;
  opacity: 0.85;
}

.te-cut-promo {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 12px;
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
}

@media (max-width: 900px) {
  .te-cut-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .te-cut-stage {
    order: -1;
  }
}

/* ---------- Thumbnail-Studio (wie die Startseite von Adobe Express) ---------- */
.studio-hero {
  position: relative;
  margin-bottom: 28px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(circle at 95% 110%, color-mix(in srgb, #7c3aed 18%, transparent), transparent 55%),
    var(--surface);
}

.studio-hero .page-sub {
  max-width: 640px;
}

.studio-section {
  margin-bottom: 34px;
}

.studio-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 19px;
}

.studio-heading svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.studio-heading .faint {
  font-weight: 600;
}

.studio-formats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.studio-format {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.studio-format:hover,
.studio-format:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent) 60%, transparent);
  outline: none;
}

.studio-format strong {
  font-size: 14px;
  line-height: 1.25;
}

.studio-format-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 78px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--surface-2);
}

.studio-ratio {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7c3aed));
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}

.studio-ratio svg {
  width: 16px;
  height: 16px;
}

.studio-ratio-custom {
  width: 48px;
  height: 36px;
  background: none;
  border: 2px dashed var(--border-strong);
  color: var(--text-2);
  box-shadow: none;
}

.studio-format-custom:hover .studio-ratio-custom {
  border-color: var(--accent);
  color: var(--accent-text);
}

.studio-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.studio-toolbar .studio-heading {
  margin: 0;
}

.studio-search {
  width: min(260px, 100%);
  min-height: 40px;
  padding: 8px 12px;
}

.studio-sort {
  width: auto;
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  background-position: calc(100% - 20px) 17px, calc(100% - 15px) 17px;
}

.studio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.studio-chips:empty {
  display: none;
}

.studio-chips .chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.studio-chips .chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.studio-chips .chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.studio-wide {
  grid-column: 1 / -1;
}

.studio-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.studio-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.studio-thumb {
  position: relative;
  display: grid;
  place-items: center;
  height: 170px;
  padding: 10px;
  border: 0;
  border-radius: 15px 15px 0 0;
  background:
    repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 0 0 / 16px 16px,
    var(--bg-elevated);
  cursor: pointer;
  overflow: hidden;
}

.studio-thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 150px;
  border-radius: 6px;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.studio-thumb-empty svg {
  width: 32px;
  height: 32px;
  color: var(--text-3);
}

.studio-thumb-size {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.2s;
}

.studio-card:hover .studio-thumb-size,
.studio-thumb:focus-visible .studio-thumb-size {
  opacity: 1;
}

.studio-card-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 8px 12px 14px;
}

.studio-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-card-name {
  overflow: hidden;
  font-size: 14.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-card-actions {
  position: relative;
}

.studio-dropdown {
  top: calc(100% + 4px);
  min-width: 190px;
}

.studio-dropdown[hidden] {
  display: none;
}

.studio-custom-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.studio-custom-row .field {
  flex: 1;
}

.studio-custom-row .btn-icon {
  margin-bottom: 6px;
}

.studio-custom-show {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
}

.studio-custom-preview {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--surface-2);
}

.studio-custom-show p {
  margin: 0;
}

.studio-access-add {
  flex-wrap: nowrap;
}

.studio-access-add .input {
  min-height: 38px;
  padding: 7px 12px;
}

.studio-access-row {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Editor im Studio: Name, Speicher-Status, Herunterladen, sicherer Bereich */
.te-title[href] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  padding: 4px 8px 4px 2px;
}

.te-title[href]:hover {
  background: var(--surface-2);
}

.te-name {
  width: clamp(120px, 22vw, 280px);
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.te-name:hover {
  border-color: var(--border);
}

.te-name:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
}

.te-save-state {
  margin-left: 4px;
  white-space: nowrap;
}

.te-download {
  position: relative;
}

.te-download-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid, var(--surface));
  box-shadow: var(--shadow);
}

.te-download-menu[hidden] {
  display: none;
}

.te-download-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.te-download-item:hover,
.te-download-item:focus-visible {
  background: var(--surface-2);
  outline: none;
}

.te-safe-toggle {
  width: auto;
  display: inline-flex;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.te-safe-toggle.active {
  border-color: var(--accent);
  color: var(--accent-text);
}

@media (max-width: 700px) {
  .studio-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .studio-thumb {
    height: 120px;
  }

  .studio-thumb img {
    max-height: 100px;
  }

  .studio-search {
    width: 100%;
  }

  .te-save-state,
  .te-size {
    display: none;
  }
}

/* ---------- Notizen im Video ---------- */
/* Monocraft (OFL 1.1) - sieht aus wie die Minecraft-Schrift */
@font-face {
  font-family: "TW Monocraft";
  src: url("/assets/fonts/notes/monocraft-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "TW Note Montserrat";
  src: url("/assets/fonts/thumb/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "TW Note Bebas";
  src: url("/assets/fonts/thumb/bebasneue-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "TW Note Marker";
  src: url("/assets/fonts/thumb/permanentmarker-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

.note-font-minecraft {
  font-family: "TW Monocraft", ui-monospace, monospace;
  font-weight: 400;
}

.note-font-normal {
  font-family: inherit;
}

.note-font-montserrat {
  font-family: "TW Note Montserrat", var(--font-display);
  font-weight: 700;
}

.note-font-bebas {
  font-family: "TW Note Bebas", var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.note-font-marker {
  font-family: "TW Note Marker", var(--font-display);
  font-weight: 400;
}

.note-font-russo {
  font-family: "TW Hero", var(--font-display);
  font-weight: 400;
}

/* Rufzeichen rechts oben: oeffnet die Liste */
.vp-notes-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s var(--ease);
}

.vp-notes-btn[hidden] {
  display: none;
}

.vp-notes-btn:hover,
.vp-notes-btn:focus-visible,
.vplayer.notes-open .vp-notes-btn {
  background: rgba(0, 0, 0, 0.8);
  outline: none;
  transform: scale(1.06);
}

.vp-notes-bang {
  font: 800 18px/1 var(--font-display);
}

.vp-notes-btn.off .vp-notes-bang {
  opacity: 0.4;
}

.vp-notes-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--grad);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.vp-notes-count[hidden] {
  display: none;
}

.vplayer.idle .vp-notes-btn {
  opacity: 0;
  pointer-events: none;
}

/* Popups: klein, schlicht, wie ein Minecraft-Tooltip - kommen von rechts */
.vp-note-stack {
  position: absolute;
  top: 56px;
  right: 12px;
  z-index: 3;
  width: min(300px, 46%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.vplayer.notes-open .vp-note-stack {
  opacity: 0;
}

.vp-note {
  position: relative;
  max-width: 100%;
  padding: 7px 8px 9px 11px;
  border: 1px solid rgba(16, 0, 16, 0.95);
  border-radius: 3px;
  background: rgba(16, 0, 16, 0.9);
  box-shadow: inset 0 0 0 1px rgba(92, 40, 255, 0.55), 0 12px 28px -12px rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.12), opacity 0.3s var(--ease);
}

.vp-note-stack .vp-note:not(:last-child) {
  position: absolute;
  top: 0;
  right: 0;
}

.vp-note.show {
  opacity: 1;
  transform: none;
}

.vp-note.leave {
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  transition: transform 0.35s cubic-bezier(0.5, 0, 0.9, 0.4), opacity 0.35s var(--ease);
}

.vp-note-body {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.vp-note-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.vp-note.note-font-minecraft .vp-note-text {
  text-shadow: 0.1em 0.1em 0 #3e3e3e;
}

.vp-note.note-font-bebas .vp-note-text {
  font-size: 1.2em;
  line-height: 1.15;
}

.vp-note-close {
  flex: none;
  width: 20px;
  height: 20px;
  margin: -2px -2px 0 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s var(--ease), background 0.15s var(--ease);
}

.vp-note-close:hover,
.vp-note-close:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.vp-note-close svg {
  width: 13px;
  height: 13px;
}

.vp-note-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.vp-note-continue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(92, 40, 255, 0.7);
  border-radius: 3px;
  background: rgba(92, 40, 255, 0.3);
  color: #fff;
  font: inherit;
  font-size: 0.9em;
  cursor: pointer;
}

.vp-note-continue:hover,
.vp-note-continue:focus-visible {
  background: rgba(92, 40, 255, 0.55);
  outline: none;
}

.vp-note-continue svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.vp-note-rate {
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.85em;
  opacity: 0.85;
}

.vp-note-timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(150, 110, 255, 0.75);
  transform-origin: left;
}

.vplayer:fullscreen .vp-note-stack {
  top: 64px;
  width: min(440px, 34%);
}

.vplayer:fullscreen .vp-note {
  font-size: 18px;
}

@media (max-width: 640px) {
  .vp-note-stack {
    top: 52px;
    width: min(250px, 66%);
  }

  .vp-note {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vp-note,
  .vp-note.leave {
    transform: none;
    transition: opacity 0.2s linear;
  }
}

/* Marken auf der Zeitleiste */
.vp-note-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vp-note-marks.off {
  opacity: 0.35;
}

.vp-note-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  border-radius: 1px;
  background: #ffd84a;
  box-shadow: 0 0 6px rgba(255, 216, 74, 0.7);
}

.vp-hover-time.vp-hover-note {
  max-width: min(420px, 80%);
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid #ffd84a;
}

/* Knopf "Notiz hier" in der Leiste (Uploader und Team) */
.vp-note-here {
  position: relative;
}

.vp-note-here-plus {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffd84a;
  color: #1a1400;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* Liste der Notizen */
.vp-notes-panel {
  position: absolute;
  top: 56px;
  right: 12px;
  bottom: 78px;
  z-index: 4;
  width: min(330px, 62%);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.92);
  color: #fff;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  animation: vp-notes-in 0.25s var(--ease);
}

.vp-notes-panel[hidden] {
  display: none;
}

@keyframes vp-notes-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

.vp-notes-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vp-notes-x {
  width: 32px;
  height: 32px;
}

.vp-notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.vp-notes-toggle:hover,
.vp-notes-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.vp-notes-toggle.off {
  opacity: 0.7;
}

.vp-notes-toggle svg {
  width: 14px;
  height: 14px;
}

.vp-notes-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vp-notes-item {
  display: flex;
  align-items: flex-start;
  border-radius: 9px;
  transition: background 0.15s var(--ease);
}

.vp-notes-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vp-notes-item.active {
  background: rgba(92, 40, 255, 0.22);
}

.vp-notes-jump {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.vp-notes-jump:focus-visible {
  outline: 2px solid rgba(255, 216, 74, 0.7);
  outline-offset: -2px;
  border-radius: 9px;
}

.vp-notes-time {
  flex: none;
  min-width: 42px;
  color: #ffd84a;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.vp-notes-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.vp-notes-effect {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
}

.vp-notes-effect svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.vp-notes-tools {
  flex: none;
  display: flex;
  padding: 3px 3px 0 0;
}

.vp-notes-tools .vp-btn {
  width: 30px;
  height: 30px;
}

.vp-notes-tools .vp-btn svg {
  width: 15px;
  height: 15px;
}

.vp-notes-empty {
  margin: 0;
  padding: 14px 10px;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.7;
}

.vp-notes-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 8px 8px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--grad);
  color: var(--on-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.vp-notes-add svg {
  width: 15px;
  height: 15px;
}

.vplayer.notes-open .vp-big {
  opacity: 0.35;
}

/* Notiz schreiben: Felder und Vorschau */
.note-form-top {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.note-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.note-field[hidden] {
  display: none;
}

.note-preview {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 96px;
  padding: 16px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 30%, rgba(90, 160, 90, 0.35), transparent 60%),
    linear-gradient(160deg, #6fa8dc 0%, #3d6c9e 55%, #2b3a2b 100%);
  overflow: hidden;
}

.note-preview .vp-note {
  max-width: min(300px, 100%);
}

.note-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-rows:empty {
  display: none;
}

.note-row {
  position: relative;
  padding: 12px 48px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.note-row-remove {
  position: absolute;
  top: 8px;
  right: 8px;
}

.note-row-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-row-main {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.note-row .note-settings {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.note-row .note-field .label {
  font-size: 12px;
}

.note-row .note-field .hint {
  display: none;
}

.note-rows-empty {
  margin: 0;
}

@media (max-width: 560px) {
  .note-form-top,
  .note-row-main {
    grid-template-columns: 1fr;
  }
}

/* ---------- Intro ueberspringen ---------- */
.vp-skip {
  position: absolute;
  right: 16px;
  bottom: 84px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(10, 10, 12, 0.72);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.1), background 0.2s var(--ease), bottom 0.3s var(--ease);
}

.vp-skip.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.vp-skip:hover,
.vp-skip:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  outline: none;
}

.vp-skip svg {
  width: 16px;
  height: 16px;
}

.vplayer.idle .vp-skip {
  bottom: 24px;
}

.vplayer:fullscreen .vp-skip {
  height: 48px;
  padding: 0 22px;
  font-size: 17px;
}

@media (prefers-reduced-motion: reduce) {
  .vp-skip {
    transform: none;
  }
}

/* Intro setzen (Uploader und Team) - unten in der Notiz-Liste */
.vp-intro-edit {
  margin: 0 8px 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.vp-intro-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.vp-intro-value {
  flex: 1;
  color: #ffd84a;
  font-family: var(--font-mono);
  font-size: 12px;
}

.vp-intro-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.vp-intro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.vp-intro-actions .vp-intro-btn {
  flex: 1;
}

.vp-intro-btn:hover,
.vp-intro-btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.vp-intro-btn[hidden] {
  display: none;
}

.vp-intro-btn svg {
  width: 13px;
  height: 13px;
}

.vp-intro-head .vp-intro-btn {
  width: 26px;
  height: 26px;
  padding: 0;
}

/* Intro im Bearbeiten-Dialog */
.intro-field {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 340px;
}

.intro-field .field {
  flex: 1;
}

.intro-field-dash {
  padding-bottom: 12px;
  color: var(--text-3);
}

/* ---------- Sterne fuer Kanonen ---------- */
.cs-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.cs-star {
  width: 18px;
  height: 18px;
  fill: color-mix(in srgb, var(--text-3) 30%, transparent);
  stroke: color-mix(in srgb, var(--text-3) 55%, transparent);
  stroke-width: 1.2;
  stroke-linejoin: round;
  transition: fill 0.15s var(--ease), transform 0.15s var(--ease);
}

.cs-star.on {
  fill: #ffcf2e;
  stroke: #c98a00;
  filter: drop-shadow(0 1px 2px rgba(201, 138, 0, 0.35));
}

.cs-edit {
  cursor: pointer;
  border-radius: 6px;
  outline: none;
}

.cs-edit:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cs-hit {
  display: inline-grid;
  padding: 1px;
}

.cs-edit .cs-hit:hover .cs-star {
  transform: scale(1.18);
}

.cs-list {
  display: grid;
  gap: 8px;
}

.cs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.cs-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
  margin-top: 10px;
}

.cs-list.compact .cs-item {
  gap: 6px;
}

.cs-list.compact .cs-name {
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
}

.cs-list.compact .cs-star {
  width: 11px;
  height: 11px;
  filter: none;
}

.cs-list.compact .cs-stars {
  gap: 1px;
}

.cs-item.marked .cs-name {
  color: var(--accent-text);
  font-weight: 700;
}

.cannon-rating .card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.cannon-rating-star {
  color: #ffcf2e;
}

.cannon-rating-hint {
  margin-left: auto;
  font-weight: 500;
}

.cannon-rating .cs-list {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px 32px;
  margin-top: 12px;
}

.cannon-rating .cs-star {
  width: 22px;
  height: 22px;
}

/* Punkte beim Filtern - oben links im Vorschaubild */
.cannon-score {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffcf2e;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}

/* Filter ueber der Liste */
.cannon-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.cannon-filters[hidden] {
  display: none;
}

.cannon-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cannon-filter-icon {
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.cannon-filter-icon svg {
  width: 18px;
  height: 18px;
}

.cannon-search {
  width: min(360px, 100%);
  min-height: 42px;
  padding: 9px 14px;
}

.cannon-filter-label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.cannon-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cannon-chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.cannon-chip:hover,
.cannon-chip:focus-visible {
  border-color: var(--border-strong);
  color: var(--text);
  outline: none;
}

.cannon-chip.active {
  border-color: #e0a800;
  background: color-mix(in srgb, #ffcf2e 18%, var(--surface));
  color: var(--text);
}

/* Admin: Kategorien */
.cat-row {
  flex-wrap: nowrap;
  gap: 6px;
}

.cat-row .input {
  flex: 1;
  min-height: 38px;
  padding: 7px 12px;
}

.cat-row-star {
  color: #ffcf2e;
  font-size: 16px;
}

@media (max-width: 520px) {
  .cs-list.compact {
    grid-template-columns: 1fr;
  }
}

/* Schussrichtung: gerade, diagonal, beides */
.cannon-direction-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.cannon-direction-tag.diagonal {
  color: #7ee0ff;
}

.cannon-direction-tag.both {
  color: #b9f27c;
}

.cannon-direction-meta {
  color: var(--accent-text);
  font-weight: 650;
}

.cannon-chip-direction.active {
  border-color: #39b8e0;
  background: color-mix(in srgb, #7ee0ff 20%, var(--surface));
  color: var(--text);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  gap: 3px;
  width: fit-content;
}

.seg-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn:hover,
.seg-btn:focus-visible {
  color: var(--text);
  outline: none;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Richtungs-Zeichen (gerade, diagonal, beides) */
.dir-icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
}

.cannon-direction-tag,
.cannon-chip-direction,
.cannon-direction-meta,
.cannon-direction .seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cannon-direction-tag .dir-icon {
  width: 1em;
  height: 1em;
}

/* ---------- Sprachen: Auswahl, Flaggen, Uebersetzte Inhalte ---------- */

.flag {
  flex: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border-strong);
  overflow: hidden;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.lang-option:hover,
.lang-option:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.lang-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.lang-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.lang-names strong {
  font-size: 14px;
  font-weight: 600;
}

.lang-names small {
  color: var(--text-3);
  font-size: 12px;
}

.lang-button {
  gap: 8px;
}

.footer-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.footer-lang:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.translated-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 12px;
}

.translated-note button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.translated-note button:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .lang-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lang-option {
    gap: 8px;
    padding: 8px;
  }
}

/* ---------- Startseite: Schnellzugriff auf Kanonen, Stats und Solo ---------- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.quick-link {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 200px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  color: #fff;
  isolation: isolate;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.quick-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.8s var(--ease);
}

.quick-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 8, 14, 0.15) 0%, rgba(8, 8, 14, 0.82) 70%);
}

.quick-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.quick-link:hover img { transform: scale(1.05); }

.quick-link-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.quick-link-icon svg { width: 20px; height: 20px; }
.quick-link-body { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.quick-link-title { font-size: 1.2rem; font-weight: 700; }
.quick-link-text { font-size: 0.9rem; line-height: 1.45; color: rgba(255, 255, 255, 0.82); }

.quick-link-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffd27a;
}

.quick-link-open svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.quick-link:hover .quick-link-open svg { transform: translateX(4px); }

@media (max-width: 900px) {
  .quick-links { grid-template-columns: 1fr; gap: 12px; }
  .quick-link { min-height: 150px; }
}

.nav-settings svg { transition: transform 0.5s var(--ease); }
.nav-settings:hover svg { transform: rotate(60deg); }

/* ---------- Musik ---------- */
.music-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.music-side {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}
.music-side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  transition: background-color 0.2s, color 0.2s;
}
.music-side-item svg { width: 18px; height: 18px; flex: none; }
.music-side-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-side-item:hover { background: var(--surface-2); color: var(--text); }
.music-side-item.active { background: var(--accent-soft); color: var(--accent-text); }
.music-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 4px 2px 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.music-side-empty { margin: 4px 12px 8px; font-size: 12.5px; color: var(--text-3); }
.music-content { min-width: 0; }
.music-top { position: relative; margin-bottom: 20px; }
.music-search { padding-left: 44px; border-radius: 999px; }
.music-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: flex; pointer-events: none; }
.music-search-icon svg { width: 18px; height: 18px; }
.music-main { display: flex; flex-direction: column; gap: 24px; }
.music-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
  border: 1px solid var(--border);
}
.music-hero-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--grad);
  color: var(--on-accent);
  box-shadow: var(--shadow-soft);
}
.music-hero-icon svg { width: 32px; height: 32px; }
.music-hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.03em; }
.music-hero p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.music-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.music-heading { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; }
.music-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13.5px;
}
.music-notice svg { width: 18px; height: 18px; flex: none; color: var(--accent-text); }
.music-section-head { margin-bottom: 10px; }
.music-section-head h2 { margin: 0; font-size: 19px; letter-spacing: -0.02em; }
.music-section-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }
.music-empty { margin: 0; padding: 18px; border-radius: 14px; border: 1px dashed var(--border); color: var(--text-3); font-size: 13.5px; }
.music-more { display: flex; justify-content: center; }

.tracks { display: flex; flex-direction: column; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.track {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto 52px auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.track + .track { border-top: 1px solid var(--border); }
.track:hover, .track:focus-visible { background: var(--surface-2); outline: none; }
.track-index { position: relative; display: grid; place-items: center; height: 30px; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.track-play, .track-bars { display: none; }
.track-play svg { width: 16px; height: 16px; fill: currentColor; }
.track:hover .track-number, .track.playing .track-number { display: none; }
.track:hover .track-play { display: flex; color: var(--text); }
.track.playing:not(:hover) .track-bars { display: flex; }
.track-bars { align-items: flex-end; gap: 2px; height: 14px; }
.track-bars i { width: 3px; border-radius: 2px; background: var(--accent); animation: track-bar 0.9s ease-in-out infinite; }
.track-bars i:nth-child(2) { animation-delay: 0.25s; }
.track-bars i:nth-child(3) { animation-delay: 0.5s; }
@keyframes track-bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.track-title { display: flex; flex-direction: column; min-width: 0; }
.track-title strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-title span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track.playing .track-title strong { color: var(--accent-text); }
.track-badges { display: flex; gap: 6px; }
.track-badge { padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.track-badge.lobby { background: var(--accent-soft); color: var(--accent-text); }
.track-plays { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.track-length { font-size: 12.5px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.track-actions { display: flex; gap: 2px; }
.track-actions .icon-button { width: 32px; height: 32px; }
.track-actions .icon-button svg { width: 16px; height: 16px; }
.track-actions .icon-button.active { color: var(--accent-text); }
.track-actions .icon-button.active svg { fill: currentColor; }

.music-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.music-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  transition: border-color 0.2s, background-color 0.2s;
}
.music-person:hover { background: var(--surface-2); border-color: var(--border-strong); }
.music-person > span { display: flex; flex-direction: column; min-width: 0; }
.music-person strong { font-size: 13.5px; }
.music-person span span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.music-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  transition: transform 0.3s var(--ease), border-color 0.2s;
}
.music-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.music-card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 6px; }
.music-card-icon svg { width: 20px; height: 20px; }
.music-card span:last-child { font-size: 12.5px; color: var(--text-3); }

.music-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.music-switch-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.music-switch-row div { display: flex; flex-direction: column; }
.music-switch-row strong { font-size: 14px; }
.music-switch-row span { font-size: 12.5px; color: var(--text-3); }
.music-switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); transition: background-color 0.2s; }
.music-switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform 0.25s var(--ease), background-color 0.2s; }
.music-switch.on { background: var(--accent); border-color: transparent; }
.music-switch.on i { transform: translateX(18px); background: #fff; }
.music-switch:disabled { opacity: 0.45; cursor: not-allowed; }

.music-volumes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.music-volumes > strong { grid-column: 1 / -1; font-size: 14px; }
.music-volume-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.music-volume-row span { flex: none; width: 96px; }
.music-volume-row .music-volume { flex: 1; width: auto; }

.music-upload { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.music-upload h2 { margin: 0; font-size: 19px; }
.music-upload-text { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.music-upload-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
/* Vor dem Hochladen: Rechte bestaetigen, privat ja/nein */
.music-terms { display: grid; gap: 8px; margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.music-terms.missing { border-color: var(--danger, #e5484d); }
.music-term { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--text-2); cursor: pointer; }
.music-term input { margin-top: 3px; flex: none; }
.music-drop.locked { opacity: .55; }
/* Unter dem Upload-Feld: welche Lieder gut und welche weniger gut umgewandelt werden */
.music-fit { display: grid; gap: 4px; margin: 10px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.music-fit p { margin: 0; }
.music-drop {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 22px;
  border-radius: 16px;
  border: 2px dashed var(--border-strong);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.music-drop:hover, .music-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.music-drop.over { transform: scale(1.01); }
.music-drop-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.music-drop-icon svg { width: 22px; height: 22px; }
.music-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.music-drop-text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-drop-text span { font-size: 12.5px; color: var(--text-3); letter-spacing: 0.04em; }
.music-upload-status { margin: 0; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.music-progress { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.music-progress[hidden] { display: none; }
.music-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-text), var(--accent)); transition: width 0.12s linear; }
.music-upload-fields[hidden], .music-queue[hidden] { display: none; }
.music-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.music-queue li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.music-queue-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-queue-state { flex: none; max-width: 60%; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.music-queue li.active { border-color: var(--accent); }
.music-queue li.active .music-queue-state { color: var(--text); }
.music-queue li.ok .music-queue-state { color: var(--success); }
.music-queue li.failed .music-queue-state { color: var(--danger); }
.music-upload-keep { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--text-3); }
.music-upload-keep[hidden] { display: none; }
.music-upload-keep svg { width: 15px; height: 15px; flex: none; }
/* Hochladen laeuft im Hintergrund: der Stand unten rechts, ueberall ausser am Upload-Feld selbst */
.upload-pill {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 14px 13px;
  border-radius: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
}
.upload-pill[hidden] { display: none; }
.upload-pill svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); }
.upload-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.upload-pill b { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); }
.upload-pill b i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.upload-pill.done b i { background: var(--success); }
body.has-music-bar .upload-pill { bottom: 104px; }
.music-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }

/* Die Player-Leiste unten */
body.has-music-bar { padding-bottom: 92px; }
.music-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  background: var(--glass-strong);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border);
}
.music-bar[hidden] { display: none; }
.music-bar-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin-inline: auto;
  padding: 10px clamp(12px, 4vw, 32px) calc(10px + env(safe-area-inset-bottom));
}
.music-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.music-disc { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: var(--on-accent); }
.music-disc svg { width: 20px; height: 20px; }
.music-now-text { display: flex; flex-direction: column; min-width: 0; }
.music-now-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-now-text span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-center { display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(640px, 46vw); }
.music-seek-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.music-seek, .music-volume {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--text) var(--played, 0%), var(--surface-2) var(--played, 0%));
  outline: none;
  cursor: pointer;
}
.music-seek:hover, .music-volume:hover { background: linear-gradient(to right, var(--accent) var(--played, 0%), var(--surface-2) var(--played, 0%)); }
.music-seek::-webkit-slider-thumb, .music-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity 0.15s; }
.music-seek:hover::-webkit-slider-thumb, .music-volume:hover::-webkit-slider-thumb, .music-seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.music-seek::-moz-range-thumb, .music-volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }
.music-seek:disabled { cursor: default; }
.music-controls { display: flex; align-items: center; gap: 6px; }
.music-button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--text-2); transition: color 0.2s, background-color 0.2s, transform 0.2s; }
.music-button svg { width: 18px; height: 18px; }
.music-button:hover { color: var(--text); background: var(--surface-2); }
.music-button.active { color: var(--accent-text); }
.music-button.main { width: 42px; height: 42px; background: var(--text); color: var(--bg); }
.music-button.main svg { fill: currentColor; }
.music-button.main:hover { transform: scale(1.06); background: var(--text); color: var(--bg); }
.music-time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.music-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--text-3); }
.music-right > svg { width: 18px; height: 18px; flex: none; }
.music-volume { flex: none; width: 110px; }

@media (max-width: 900px) {
  .music-layout { grid-template-columns: 1fr; }
  .music-side { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .music-side-item { width: auto; }
  .music-side-head { width: 100%; margin-top: 6px; }
  .track { grid-template-columns: 30px minmax(0, 1fr) 48px auto; }
  .track-badges, .track-plays { display: none; }
  .music-hero { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .music-bar-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .music-right { display: none; }
  .music-center { width: auto; }
  .music-seek-row { display: none; }
  .music-button:not(.main):nth-child(1), .music-button:not(.main):nth-child(5) { display: none; }
  body.has-music-bar { padding-bottom: 72px; }
}
