/* FakeGames.de */
:root {
  --ink: #1b1640;
  --paper: #f4f6fb;
  --surface: #ffffff;
  --muted: #5f5c84;
  --edge: #1b1640;
  --shadow: #1b1640;
  --yellow: #ffd84d;
  --on-yellow: #1b1640;
  --red: #ff3d62;
  --mint: #12a578;
  --field: #ffffff;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1efff;
    --paper: #100e29;
    --surface: #1b1846;
    --muted: #aaa7d3;
    --edge: #4a45a0;
    --shadow: #05040f;
    --red: #ff6a86;
    --mint: #3ddca8;
    --field: #14123a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2 { line-height: 1.1; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marke ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; font-size: 1.2rem; letter-spacing: -0.02em; }
.mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--yellow); color: var(--on-yellow);
  border: 2px solid var(--edge); border-radius: 11px;
  font-weight: 900; transform: rotate(-6deg);
}
.tld { color: var(--muted); font-weight: 700; }

/* ---------- Öffentliche Seite ---------- */
.top {
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: calc(16px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 0;
}
.shell { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.hero { padding: clamp(28px, 6vw, 72px) 0 18px; }
.hero h1 {
  font-size: clamp(2.5rem, 9vw, 5.2rem);
  letter-spacing: -0.035em;
  font-weight: 850;
  line-height: 0.98;
  margin: 0 0 14px;
}
.lead { font-size: clamp(1.02rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 36ch; margin: 0 0 28px; }

.search {
  display: flex; align-items: center; gap: 8px;
  max-width: 640px;
  background: var(--surface);
  border: 2px solid var(--edge); border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 5px 5px 0 var(--shadow);
}
.search:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 1.06rem; color: inherit; padding: 10px 0;
}
.search input::placeholder { color: var(--muted); }
.search button {
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--yellow); color: var(--on-yellow);
  font: inherit; font-weight: 800; padding: 12px 22px;
}

.tags {
  display: flex; gap: 8px; overflow-x: auto; padding: 18px 4px 14px; margin: 0 -4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tags::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 2px solid var(--edge);
  font-weight: 700; font-size: 0.95rem;
}
.chip .n { color: var(--muted); font-weight: 600; }
.chip.on { background: var(--ink); color: var(--paper); }
.chip.on .n { color: inherit; opacity: 0.7; }

.count { color: var(--muted); font-size: 0.95rem; margin: 6px 0 18px; }

.grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  padding: 0 6px 6px 0;
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--edge); border-radius: 22px;
  box-shadow: 5px 5px 0 var(--shadow);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) {
  .card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow); }
}
.cover {
  aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 220) 85% 62%), hsl(calc(var(--h, 220) + 50) 85% 46%));
  display: grid; place-items: center;
  border-bottom: 2px solid var(--edge);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.ph { font-size: 5rem; font-weight: 900; color: rgb(255 255 255 / 0.85); line-height: 1; }

.head { display: flex; gap: 12px; align-items: flex-start; padding: 0 16px; margin-top: -30px; }
.icon {
  flex: none; width: 60px; height: 60px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 220) 85% 56%), hsl(calc(var(--h, 220) + 50) 85% 42%));
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--edge);
  position: relative;
}
.icon img { width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.icon span { display: grid; place-items: center; height: 100%; color: #fff; font-weight: 900; font-size: 1.6rem; }
.titles { min-width: 0; padding-top: 34px; }
.titles h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.titles a { text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 3px solid var(--red); outline-offset: -5px; border-radius: 22px; }
.host { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc {
  margin: 12px 16px 0; color: var(--ink); opacity: 0.86; font-size: 0.97rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { margin-top: auto; padding: 14px 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.taglist a { position: relative; z-index: 2; color: var(--muted); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.taglist a:hover { color: var(--ink); text-decoration: underline; }
.play {
  flex: none; background: var(--yellow); color: var(--on-yellow);
  border: 2px solid var(--edge); border-radius: 999px;
  padding: 6px 16px; font-weight: 800; font-size: 0.95rem;
}

.empty { text-align: center; padding: 56px 16px; max-width: 460px; margin: 0 auto; }
.empty h2 { margin: 0 0 8px; font-size: 1.5rem; }
.empty p { color: var(--muted); margin: 0 0 18px; }

.foot {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  width: 100%; max-width: 1200px; margin: 48px auto 0;
  padding: 24px clamp(16px, 4vw, 40px) calc(24px + env(safe-area-inset-bottom));
  color: var(--muted); font-size: 0.9rem;
}
.foot a { color: var(--ink); font-weight: 700; }

/* ---------- Buttons & Formulare (Admin) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 800; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--edge);
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.primary { background: var(--yellow); color: var(--on-yellow); }
.btn.danger { color: var(--red); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-decoration: underline; }

.admin .bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: calc(14px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 14px;
  border-bottom: 2px solid var(--edge); background: var(--surface);
}
.adminnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-weight: 700; font-size: 0.95rem; }
.adminnav a { text-decoration: none; }
.adminnav a:hover { text-decoration: underline; }
.adminnav form { margin: 0; }
.wrap { max-width: 860px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 60px; }
.titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.titlebar h1 { margin: 0; font-size: 1.8rem; letter-spacing: -0.02em; }

.alert { margin: 0 0 20px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--edge); font-weight: 600; background: var(--surface); }
.alert.ok { border-color: var(--mint); }
.alert.error { border-color: var(--red); }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  background: var(--surface); border: 2px solid var(--edge); border-radius: 18px;
}
.thumb {
  flex: none; width: 48px; height: 48px; border-radius: 13px; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 220) 85% 56%), hsl(calc(var(--h, 220) + 50) 85% 42%));
  border: 2px solid var(--edge);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { display: grid; place-items: center; height: 100%; color: #fff; font-weight: 900; }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.info strong { overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.acts form { margin: 0; }
@media (max-width: 560px) {
  .row { flex-wrap: wrap; }
  .acts { width: 100%; justify-content: flex-start; }
}

.form {
  background: var(--surface); border: 2px solid var(--edge); border-radius: 22px;
  padding: clamp(16px, 4vw, 28px); margin-bottom: 28px; display: grid; gap: 18px;
}
.form h2 { margin: 0; font-size: 1.25rem; }
.field { display: grid; gap: 6px; }
.field label, .imgfield label:not(.check) { font-weight: 700; font-size: 0.95rem; }
input[type=text], input[type=password], input[type=url], input[type=file], textarea {
  width: 100%; font: inherit; font-size: 1rem; color: inherit;
  background: var(--field); border: 2px solid var(--edge); border-radius: 12px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 96px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.hint { margin: 0; color: var(--muted); font-size: 0.88rem; }
.imgfield { border: 2px solid var(--edge); border-radius: 16px; padding: 14px 16px 16px; display: grid; gap: 8px; margin: 0; min-width: 0; }
.imgfield legend { font-weight: 800; padding: 0 6px; }
.preview { border: 2px solid var(--edge); border-radius: 14px; background: var(--field); object-fit: cover; }
.preview.wide { width: 100%; max-width: 320px; aspect-ratio: 16 / 10; }
.preview.square { width: 72px; height: 72px; border-radius: 18px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.auth { max-width: 420px; margin: 0 auto; }
.auth h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 12px 0 8px; }
.auth > .hint { margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
