/* Gamelection – Dark UI */
:root {
  --bg: #0e1116;
  --surface: #161b23;
  --surface-2: #1d2430;
  --border: #262f3d;
  --text: #e8ebf1;
  --muted: #8b93a5;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --on-accent: #221503;   /* dunkle Schrift auf Amber-Flächen */
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

body { display: flex; flex-direction: column; }

/* Feines Farbrauschen über dem Hintergrund (wie ISO-Rauschen eines Digitalfotos).
   SVG-feTurbulence als Data-URI – liegt hinter allem Inhalt, ist nicht klickbar. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 280px 280px;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
main.container { flex: 1; padding-top: 28px; padding-bottom: 56px; }

.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* ---------------------------------------------------------------- Topbar */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 22px;
}
.logo-text { font-weight: 800; letter-spacing: 0.06em; font-size: 17px; color: var(--text); }
.logo-text:hover { text-decoration: none; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--accent-soft); }
.nav-user { display: flex; align-items: center; gap: 10px; }

/* Mobiles Menü (Burger), aktiv unter 800px */
.nav-burger {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 19px; line-height: 1; padding: 6px 11px; cursor: pointer;
}
.nav-burger:hover { background: var(--surface-2); }
.mobile-menu {
  display: none; position: absolute; top: 60px; left: 0; right: 0;
  flex-direction: column; gap: 2px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 10px 20px 16px; box-shadow: var(--shadow);
}
.mobile-menu a {
  padding: 11px 12px; border-radius: 8px;
  color: var(--text); font-weight: 500;
}
.mobile-menu a:hover { background: var(--surface-2); text-decoration: none; }
.mobile-menu a.active { background: var(--accent-soft); color: var(--accent-hover); }
.mobile-menu .menu-row {
  display: flex; gap: 10px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mobile-menu .menu-row .btn { flex: 1; }

@media (max-width: 800px) {
  .nav-links, .nav-user { display: none; }
  .nav-burger { display: inline-flex; }
  .mobile-menu.open { display: flex; }
}

/* ---------------------------------------------------------------- Buttons & Forms */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: #242d3c; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.12); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 5px; }
input, select, textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 70px; }

.form-card {
  max-width: 420px; margin: 40px auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.form-card h1 { margin: 0 0 4px; font-size: 22px; }
.form-card .sub { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.form-card .btn { margin-top: 20px; }
.form-links { margin-top: 16px; font-size: 13px; display: flex; justify-content: space-between; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------------------------------------------------------- Cards / Grid */

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 24px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; flex: 1; }
.toolbar select { flex: 0 1 200px; }

.stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-chip {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted);
}
.stat-chip strong { color: var(--text); }

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

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); }

.cover { aspect-ratio: 3 / 4; background: var(--surface-2); position: relative; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 800; color: var(--accent);
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft));
}
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { font-weight: 700; font-size: 14px; line-height: 1.3; margin: 0; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.badge-accent { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; }
.badge-soon { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }

.stars { color: var(--accent); font-size: 13px; letter-spacing: 1px; }
.stars .off { color: var(--border); }

/* ---------------------------------------------------------------- Suche */

.search-hero { max-width: 640px; margin: 0 auto 26px; }
.search-hero form { display: flex; gap: 10px; }
.result-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
.result-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
}
.result-row:hover { border-color: var(--accent); }
.result-thumb { width: 52px; height: 68px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-thumb .cover-placeholder { font-size: 22px; }
.result-info { flex: 1; min-width: 0; }
.result-info h3 { margin: 0 0 3px; font-size: 15px; }
.result-platforms { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Plattform-Filter-Chips (Suche) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }

/* ---------------------------------------------------------------- Landing */

.hero { text-align: center; padding: 64px 0 46px; }
.hero h1 { font-size: 42px; margin: 0 0 14px; line-height: 1.15; }
.hero p { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 auto 30px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0 40px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.feature .icon { font-size: 28px; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- Marktplatz-Teaser */

.teaser {
  text-align: center; padding: 70px 30px;
  background: radial-gradient(ellipse at top, var(--accent-soft), transparent 65%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); margin-top: 30px;
}
.teaser h1 { font-size: 34px; margin: 12px 0; }
.teaser p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }

/* ---------------------------------------------------------------- Modal & Toast */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 10, 14, 0.72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow);
}
.modal h2 { margin: 0 0 2px; font-size: 19px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.affiliate-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.affiliate-row a {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.affiliate-row a:hover { color: var(--accent-hover); border-color: var(--accent); text-decoration: none; }

#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 18px; font-size: 14px;
  box-shadow: var(--shadow); animation: toast-in 0.2s ease-out;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* Sternebewertung (Eingabe) */
.rating-input { display: flex; gap: 3px; align-items: center; }
.rating-input button {
  background: none; border: none; cursor: pointer; padding: 2px;
  font-size: 20px; color: var(--border); transition: color 0.1s;
}
.rating-input button.on { color: var(--accent); }
.rating-input .rating-clear { font-size: 12px; color: var(--muted); margin-left: 8px; }

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

.table-wrap {
  overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(245, 158, 11, 0.04); }

.badge-danger { background: rgba(239, 68, 68, 0.14); color: #f87171; border-color: transparent; }

/* Consent-Checkbox (Registrierung) */
label.consent {
  display: flex; gap: 9px; align-items: flex-start;
  font-weight: 400; font-size: 13px; color: var(--muted); line-height: 1.45;
}
label.consent input { width: auto; margin-top: 2px; accent-color: var(--accent); }

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

.footer { border-top: 1px solid var(--border); padding: 18px 0; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 8px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { font-size: 42px; margin-bottom: 10px; }

.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.4); border-radius: var(--radius);
  padding: 20px; margin-top: 30px;
}
.danger-zone h3 { margin: 0 0 6px; color: var(--danger); font-size: 15px; }

.notice {
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 9px; padding: 12px 16px; font-size: 14px; margin: 16px 0;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .field-row { grid-template-columns: 1fr; }
}
