/* Design „Jahrtausend“ – Konsolen-Systemmenü um 2000: gebürstetes Metall, glänzender Kunststoff.
   Schrift: Exo 2 aus /themes/fonts.css (SIL OFL 1.1).
   Vorlage unverändert, Anpassungen für GameSwipe gesammelt am Dateiende. */

[data-theme="jahrtausend"] {
  --bg: #c9cfd8;
  --surface: #e4e8ef;
  --surface-2: #d3d9e3;
  --line: #8f99a8;
  --text: #141923;
  --muted: #454f61;
  --accent: #0f52ba;
  --accent-ink: #ffffff;
  --like: #0d7a3e;
  --nope: #c42333;
  --sale: #d94e00;
  --sale-ink: #ffffff;
  --radius: 8px;
  --radius-lg: 14px;
  --card-shadow:
    0 10px 20px rgba(20, 25, 35, 0.22),
    0 2px 4px rgba(20, 25, 35, 0.16),
    inset 0 1px 0 #ffffff;
  --border-w: 1px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Exo 2', 'Segoe UI', Arial, sans-serif;
  --head-transform: uppercase;
  --head-spacing: 0.04em;
  --head-weight: 800;
  --mono: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  color-scheme: light;

  background-color: var(--bg);
  /* Feines gebürstetes Metall- und Punkt-Raster */
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16) 0px,
      rgba(255, 255, 255, 0.16) 1px,
      rgba(20, 25, 35, 0.03) 1px,
      rgba(20, 25, 35, 0.03) 3px
    ),
    linear-gradient(180deg, #d5dbe3 0%, #bcc4d0 100%);
  color: var(--text);
  font-family: var(--font);
}

/* Sichtbarer Tastatur-Fokus */
[data-theme="jahrtausend"] :focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff;
}

/* Topbar: Gebürstete Metall-Konsole */
[data-theme="jahrtausend"] .topbar {
  background: linear-gradient(180deg, #eef1f6 0%, #cfd5df 100%);
  border-bottom: 1px solid #7c8696;
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 8px rgba(20, 25, 35, 0.16);
}

[data-theme="jahrtausend"] .brand {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #141923;
  text-shadow: 0 1px 0 #ffffff;
}

[data-theme="jahrtausend"] .brand b {
  color: var(--accent);
}

[data-theme="jahrtausend"] .me .avatar {
  border: 2px solid #ffffff;
  outline: 1px solid #7c8696;
  box-shadow: 0 2px 5px rgba(20, 25, 35, 0.25);
}

/* Navigation: Modul-Tabs mit Lichtkante */
[data-theme="jahrtausend"] .nav button {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: linear-gradient(180deg, #e7ebf2 0%, #cdd4df 100%);
  border: 1px solid #8f99a8;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(20, 25, 35, 0.14);
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

[data-theme="jahrtausend"] .nav button:hover {
  color: var(--text);
  background: linear-gradient(180deg, #f3f6fa 0%, #d8dfe9 100%);
}

[data-theme="jahrtausend"] .nav button[aria-current="page"] {
  background: linear-gradient(180deg, #256ce0 0%, #0d449c 100%);
  color: #ffffff;
  border-color: #082d6b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 2px 5px rgba(15, 82, 186, 0.35);
}

[data-theme="jahrtausend"] .nav .count {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: #1c2433;
  color: #ffffff;
  border: 1px solid #596478;
  border-radius: 999px;
  padding: 1px 7px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="jahrtausend"] .nav button[aria-current="page"] .count {
  background: #ffffff;
  color: var(--accent);
  border-color: #ffffff;
}

/* Panels & Spielkarten: Metall-/Kunststoff-Verlauf, 1px Lichtkante oben, Schattenkante unten */
[data-theme="jahrtausend"] .card,
[data-theme="jahrtausend"] .panel,
[data-theme="jahrtausend"] .tile,
[data-theme="jahrtausend"] .stat,
[data-theme="jahrtausend"] .pick,
[data-theme="jahrtausend"] .sheet,
[data-theme="jahrtausend"] .empty {
  background: linear-gradient(180deg, #f2f5fa 0%, #dce1ea 100%);
  border: 1px solid #848f9e;
  border-top-color: #ffffff;
  border-bottom: 2px solid #6e7887;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  color: var(--text);
}

[data-theme="jahrtausend"] .card.behind {
  background: linear-gradient(180deg, #dfe4ed 0%, #c8cfd9 100%);
  border-color: #8f99a8;
  box-shadow: 0 6px 14px rgba(20, 25, 35, 0.16);
}

[data-theme="jahrtausend"] .card.behind2 {
  background: #c5ccd6;
  border-color: #9aa3b2;
  box-shadow: none;
}

[data-theme="jahrtausend"] .card.dragging {
  border-color: var(--accent);
  box-shadow:
    0 16px 32px rgba(20, 25, 35, 0.32),
    0 0 0 2px rgba(15, 82, 186, 0.35),
    inset 0 1px 0 #ffffff;
}

[data-theme="jahrtausend"] .card .shot {
  border-bottom: 2px solid #848f9e;
  box-shadow: 0 1px 0 #ffffff;
}

[data-theme="jahrtausend"] .more-pics,
[data-theme="jahrtausend"] .trailer-pill {
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #2b3547 0%, #161c26 100%);
  color: #ffffff;
  border: 1px solid #59667d;
  border-top-color: #8d9bb3;
  border-radius: var(--radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

[data-theme="jahrtausend"] .card .title {
  font-family: var(--font-head);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  font-weight: var(--head-weight);
  color: #10151f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="jahrtausend"] .card .meta {
  color: var(--muted);
  font-weight: 600;
}

[data-theme="jahrtausend"] .desc {
  color: #1e2533;
  line-height: 1.52;
}

/* Bewertungen, Spieler & Tags */
[data-theme="jahrtausend"] .review.good {
  background: #daf3e5;
  color: #09592d;
  border: 1px solid #6ec295;
  font-weight: 700;
}

[data-theme="jahrtausend"] .review.mid {
  background: #faeed2;
  color: #704900;
  border: 1px solid #cfa555;
  font-weight: 700;
}

[data-theme="jahrtausend"] .review.bad {
  background: #fadce0;
  color: #8f1420;
  border: 1px solid #d47780;
  font-weight: 700;
}

[data-theme="jahrtausend"] .players .pl {
  background: linear-gradient(180deg, #edf0f5 0%, #d5dce6 100%);
  border: 1px solid #8f99a8;
  border-top-color: #ffffff;
  color: var(--text);
  border-radius: var(--radius);
}

[data-theme="jahrtausend"] .players .pl.hot {
  background: linear-gradient(180deg, #fff0e6 0%, #ffd9c2 100%);
  border-color: #d94e00;
  color: #8f3200;
  font-weight: 700;
}

[data-theme="jahrtausend"] .tags .tag {
  background: #e9edf4;
  border: 1px solid #9aa4b3;
  border-top-color: #ffffff;
  color: #2f3847;
  border-radius: var(--radius);
}

/* Preisleiste & Rabatt-Badge */
[data-theme="jahrtausend"] .pricebar {
  background: linear-gradient(180deg, #d7dde7 0%, #c6cedb 100%);
  border-top: 1px solid #848f9e;
  box-shadow: inset 0 1px 0 #f2f5fa;
}

[data-theme="jahrtausend"] .price .now {
  font-family: var(--font-head);
  color: var(--accent);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="jahrtausend"] .price .was {
  color: var(--muted);
}

[data-theme="jahrtausend"] .sale {
  font-family: var(--font-head);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ff701f 0%, #c94600 100%);
  color: var(--sale-ink);
  border: 1px solid #8c3000;
  border-top-color: #ffb38a;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(217, 78, 0, 0.3);
}

[data-theme="jahrtausend"] .deals,
[data-theme="jahrtausend"] .owned-badge,
[data-theme="jahrtausend"] .pick-kicker {
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #eef2f8 0%, #d4dbe6 100%);
  color: var(--accent);
  border: 1px solid #848f9e;
  border-top-color: #ffffff;
  border-radius: var(--radius);
}

/* Stempel: LIKE & NÖ */
[data-theme="jahrtausend"] .stamp.like,
[data-theme="jahrtausend"] .stamp.nope {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-width: 3px;
  border-radius: var(--radius);
  background: rgba(242, 245, 250, 0.92);
  box-shadow: 0 4px 12px rgba(20, 25, 35, 0.28);
}

[data-theme="jahrtausend"] .stamp.like {
  color: var(--like);
  border-color: var(--like);
}

[data-theme="jahrtausend"] .stamp.nope {
  color: var(--nope);
  border-color: var(--nope);
}

/* Aktionsknöpfe: Runde, gewölbte Controller-Tasten aus glänzendem Kunststoff */
[data-theme="jahrtausend"] .actions .act {
  border-radius: 50%;
  border: 2px solid #596373;
  box-shadow:
    0 5px 10px rgba(20, 25, 35, 0.28),
    0 2px 0 #485161,
    inset 0 3px 5px rgba(255, 255, 255, 0.72),
    inset 0 -4px 7px rgba(0, 0, 0, 0.28);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.14s ease;
  font-family: var(--font-head);
}

[data-theme="jahrtausend"] .actions .act:hover {
  filter: brightness(1.06);
}

[data-theme="jahrtausend"] .actions .act:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 4px rgba(20, 25, 35, 0.32),
    0 0 0 #485161,
    inset 0 3px 7px rgba(0, 0, 0, 0.38);
}

[data-theme="jahrtausend"] .actions .act.like {
  background: radial-gradient(circle at 35% 28%, #5ce095 0%, #12944d 58%, #095c2f 100%);
  border-color: #074724;
  color: #ffffff;
}

[data-theme="jahrtausend"] .actions .act.nope {
  background: radial-gradient(circle at 35% 28%, #ff7a87 0%, #d42838 58%, #8a1420 100%);
  border-color: #6b0d17;
  color: #ffffff;
}

[data-theme="jahrtausend"] .actions .act.skip {
  background: radial-gradient(circle at 35% 28%, #ffaa75 0%, #e05600 58%, #963800 100%);
  border-color: #732a00;
  color: #ffffff;
}

[data-theme="jahrtausend"] .actions .act.undo {
  background: radial-gradient(circle at 35% 28%, #6ba6ff 0%, #145cc9 58%, #0a3880 100%);
  border-color: #07285c;
  color: #ffffff;
}

/* Gewölbte, glänzende Kunststoff-Buttons */
[data-theme="jahrtausend"] .btn {
  font-family: var(--font-head);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f7f9fc 0%, #dce2ec 48%, #c5cddb 52%, #d8dfe9 100%);
  color: #141923;
  border: 1px solid #758091;
  border-top-color: #ffffff;
  border-radius: 999px;
  box-shadow:
    0 2px 4px rgba(20, 25, 35, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

[data-theme="jahrtausend"] .btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(20, 25, 35, 0.25);
}

[data-theme="jahrtausend"] .btn.primary {
  background: linear-gradient(180deg, #4b8bf5 0%, #1559c7 48%, #0d45a3 52%, #1a63d6 100%);
  color: #ffffff;
  border-color: #082c6b;
  border-top-color: #9ec2ff;
  box-shadow:
    0 2px 6px rgba(15, 82, 186, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="jahrtausend"] .btn.danger {
  background: linear-gradient(180deg, #f26371 0%, #c92434 48%, #a61927 52%, #cf2b3b 100%);
  color: #ffffff;
  border-color: #730e18;
  border-top-color: #ffb3ba;
}

[data-theme="jahrtausend"] .btn.ghost {
  background: rgba(255, 255, 255, 0.45);
  border-color: #848f9e;
  box-shadow: none;
}

[data-theme="jahrtausend"] .btn.small {
  font-size: 0.66rem;
}

/* Chips & Segment-Schalter */
[data-theme="jahrtausend"] .chip[aria-pressed="true"],
[data-theme="jahrtausend"] .seg button[aria-pressed="true"] {
  background: linear-gradient(180deg, #256ce0 0%, #0d449c 100%);
  color: #ffffff;
  border: 1px solid #082d6b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

/* Formulare & Listen */
[data-theme="jahrtausend"] .flabel,
[data-theme="jahrtausend"] .sheet-head {
  font-family: var(--font-head);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

[data-theme="jahrtausend"] .input,
[data-theme="jahrtausend"] .select {
  background: #f7f9fc;
  color: var(--text);
  border: 1px solid #7d8899;
  border-bottom-color: #ffffff;
  border-radius: var(--radius);
  font-family: var(--font);
  box-shadow: inset 0 2px 4px rgba(20, 25, 35, 0.14);
}

[data-theme="jahrtausend"] .input:focus,
[data-theme="jahrtausend"] .select:focus {
  border-color: var(--accent);
}

[data-theme="jahrtausend"] .range,
[data-theme="jahrtausend"] .check {
  accent-color: var(--accent);
}

[data-theme="jahrtausend"] .row {
  border-bottom: 1px solid #b8c1cf;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Memory-Card-Segmentanzeige (Meter) */
[data-theme="jahrtausend"] .meter i {
  background: #bcc4d1;
  border: 1px solid #848f9e;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

[data-theme="jahrtausend"] .meter i.on {
  background: linear-gradient(180deg, #4b8bf5 0%, #0f52ba 100%);
  border-color: #082d6b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Zufalls-Roll & Medien */
[data-theme="jahrtausend"] .big-roll {
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ff7a29 0%, #d94e00 48%, #b84200 52%, #e05600 100%);
  color: #ffffff;
  border: 1px solid #802d00;
  border-top-color: #ffc29e;
  border-radius: 999px;
  box-shadow:
    0 4px 10px rgba(217, 78, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="jahrtausend"] .player,
[data-theme="jahrtausend"] .shot-btn {
  border: 1px solid #7c8696;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(20, 25, 35, 0.18);
}

[data-theme="jahrtausend"] .shot-btn:hover {
  border-color: var(--accent);
}

[data-theme="jahrtausend"] .play-overlay {
  background: linear-gradient(180deg, #f2f5fa 0%, #cfd6e2 100%);
  color: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(20, 25, 35, 0.35);
}

[data-theme="jahrtausend"] .lightbox {
  background: rgba(16, 21, 31, 0.88);
}

/* Toasts */
[data-theme="jahrtausend"] .toast {
  font-family: var(--font-head);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #f5f7fb 0%, #d8dfe9 100%);
  color: var(--text);
  border: 1px solid #758091;
  border-top-color: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(20, 25, 35, 0.25);
}

[data-theme="jahrtausend"] .toast.match {
  border-color: var(--like);
  box-shadow: 0 6px 18px rgba(13, 122, 62, 0.28);
}

/* Speicher-Ladebalken (.skeleton) */
[data-theme="jahrtausend"] .skeleton {
  background-color: #bcc4d1;
  border: 1px solid #7d8899;
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(20, 25, 35, 0.25);
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 10px,
      #bcc4d1 10px,
      #bcc4d1 13px
    ),
    linear-gradient(180deg, #4b8bf5 0%, #0f52ba 100%);
  background-size: 100% 100%, 45% 100%;
  background-repeat: no-repeat;
  animation: jahrtausend-memcard-load 1.8s steps(8) infinite;
}

/* Breakpoints: Tablet & Handy */
@media (max-width: 900px) {
  [data-theme="jahrtausend"] .card {
    box-shadow: 0 6px 14px rgba(20, 25, 35, 0.2), inset 0 1px 0 #ffffff;
  }
}

@media (max-width: 720px) {
  [data-theme="jahrtausend"] .nav {
    background: linear-gradient(180deg, #e5e9f0 0%, #c6cedb 100%);
    border-top: 1px solid #7c8696;
    box-shadow: inset 0 1px 0 #ffffff, 0 -3px 10px rgba(20, 25, 35, 0.16);
  }

  [data-theme="jahrtausend"] .nav button {
    font-size: 0.65rem;
  }
}

@keyframes jahrtausend-memcard-load {
  0% {
    background-position: 0 0, -45% 0;
  }
  100% {
    background-position: 0 0, 145% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="jahrtausend"] .skeleton {
    animation: none;
    background-position: 0 0, 50% 0;
  }

  [data-theme="jahrtausend"] .nav button,
  [data-theme="jahrtausend"] .actions .act,
  [data-theme="jahrtausend"] .btn {
    transition: none;
  }
}

/* ===================== Anpassungen für GameSwipe ===================== */

/* body durchsichtig, sonst verdeckt er das Metall-Muster */
[data-theme="jahrtausend"] body { background: transparent; }

/* Leere Zustände stehen oft schon in einem Panel: kein zweiter Kasten */
[data-theme="jahrtausend"] .empty { background: none; border: 0; box-shadow: none; }

/* Matches-Zeilen wie die übrigen Kacheln */
[data-theme="jahrtausend"] .row {
  background: linear-gradient(180deg, #f2f5fa 0%, #dce1ea 100%);
  border: 1px solid #848f9e;
  border-top-color: #ffffff;
  border-radius: var(--radius-lg);
}

/* Kopf des Blattes in Flächenfarbe, Titel in Akzentfarbe */
[data-theme="jahrtausend"] .sheet-head { background: #e9edf3; font-size: inherit; border-bottom: 1px solid #b8c1cf; }
[data-theme="jahrtausend"] .sheet-head h2 { color: var(--accent); }

/* Innenabstände und Ausrichtung kleiner Etiketten */
[data-theme="jahrtausend"] .review.good,
[data-theme="jahrtausend"] .review.mid,
[data-theme="jahrtausend"] .review.bad { padding: 1px 7px; border-radius: var(--radius); }
[data-theme="jahrtausend"] .tags .tag { padding: 1px 7px; }
[data-theme="jahrtausend"] .tag + .tag::before { content: none; }
[data-theme="jahrtausend"] .deals,
[data-theme="jahrtausend"] .owned-badge,
[data-theme="jahrtausend"] .pick-kicker { padding: 3px 8px; align-self: flex-start; }
[data-theme="jahrtausend"] .deals b { color: var(--text); }

/* Preisleiste bis an den Kartenrand */
[data-theme="jahrtausend"] .pricebar { margin: auto -16px -12px; padding: 10px 16px 12px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* Lange Spielnamen umbrechen */
[data-theme="jahrtausend"] .card .title { overflow-wrap: anywhere; }

/* Galerie: Rahmen am Bild statt am unsichtbaren Knopf */
[data-theme="jahrtausend"] .shot-btn { border: 0; box-shadow: none; }
[data-theme="jahrtausend"] .shot-btn img { border: 1px solid #7c8696; box-shadow: 0 2px 6px rgba(20, 25, 35, 0.18); }
[data-theme="jahrtausend"] .shot-btn:hover img { border-color: var(--accent); }

/* Trailer: Vorschaubild sichtbar lassen, nur die runde Taste glänzt */
[data-theme="jahrtausend"] .play-overlay { background: rgba(20, 25, 35, 0.2); border: 0; box-shadow: none; }
[data-theme="jahrtausend"] .play-overlay svg {
  background: linear-gradient(180deg, #f2f5fa 0%, #cfd6e2 100%);
  color: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(20, 25, 35, 0.35);
}

/* Schalter sichtbar auch im nicht gewählten Zustand */
[data-theme="jahrtausend"] .chip,
[data-theme="jahrtausend"] .seg button {
  background: linear-gradient(180deg, #f7f9fc 0%, #dde3ec 100%);
  border: 1px solid #8f99a8;
  border-top-color: #ffffff;
}

/* Rückmeldung nach Tastendruck: Taste wirkt gedrückt */
[data-theme="jahrtausend"] .actions .act.hit {
  transform: translateY(2px);
  animation: none;
  box-shadow: 0 2px 4px rgba(20, 25, 35, 0.32), inset 0 3px 7px rgba(0, 0, 0, 0.38);
}

/* Rückmeldung über der Karte als Systemdialog */
[data-theme="jahrtausend"] .decision {
  background: linear-gradient(180deg, #f5f7fb 0%, #d8dfe9 100%);
  border-width: 1px;
  border-top-color: #ffffff;
  border-radius: var(--radius);
}

[data-theme="jahrtausend"] .stat b { font-family: var(--font-head); color: var(--accent); }

@media (max-width: 720px) {
  [data-theme="jahrtausend"] .nav { gap: 4px; padding-left: 6px; padding-right: 6px; }
  [data-theme="jahrtausend"] .sheet { border-bottom: 0; }
}
