/* kommzocken.net – Spielesammlung */
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #120e1f;
  --bg2: #1b1530;
  --panel: #231c3d;
  --panel2: #2c2450;
  --line: #3a3166;
  --text: #f3eeff;
  --muted: #a99fc9;
  --orange: #ff7a3a;
  --teal: #3ee0c8;
  --pink: #ff4f9a;
  --ok: #4fd18b;
  --err: #ff5d5d;
  --r: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.5; color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 122, 58, .18), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(62, 224, 200, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--teal); }
img { max-width: 100%; display: block; }
code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--orange); color: #000; padding: 8px 12px; border-radius: 8px; }
.muted { color: var(--muted); }

/* Kopf und Fuss */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px max(16px, calc((100vw - 1180px) / 2)); position: sticky; top: 0; z-index: 5;
  background: rgba(18, 14, 31, .82); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: .3px; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--orange), var(--pink)); color: #fff; font-size: 16px; box-shadow: 0 4px 14px rgba(255, 90, 80, .45); }
.top nav { display: flex; gap: 6px; }
.top nav a { color: var(--text); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.top nav a:hover { background: var(--panel); }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; }
.foot { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; padding: 26px 16px; color: var(--muted); font-size: .9rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.foot a { color: var(--muted); }

/* Startseite */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 0 20px; }
.kicker { margin: 0; color: var(--orange); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: .85rem; }
.hero h1 { margin: 4px 0 8px; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.05; }
.hl { background: linear-gradient(90deg, var(--orange), var(--pink) 60%, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0; max-width: 560px; }
.hero-art { display: flex; gap: 10px; font-size: 3.2rem; }
.hero-art span { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); animation: bob 3s ease-in-out infinite; }
.hero-art span:nth-child(2) { animation-delay: .4s; transform: rotate(6deg); }
.hero-art span:nth-child(3) { animation-delay: .8s; }
@keyframes bob { 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .hero-art span { animation: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 22px; }
.chip { padding: 7px 16px; border-radius: 999px; background: var(--panel); color: var(--text); text-decoration: none; border: 1px solid var(--line); font-weight: 500; }
.chip.on, .chip:hover { background: var(--orange); border-color: var(--orange); color: #1a0d05; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { --accent: var(--orange); display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card:hover, .card:focus-visible { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 0 1px var(--accent), 0 0 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.cover { position: relative; aspect-ratio: 16 / 9; background: var(--bg2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .cover img { transform: scale(1.05); }
.cover-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 4rem; font-weight: 700; color: rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, var(--accent, var(--orange)), #2c2450); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h2 { margin: 0; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--panel2); color: var(--text); font-weight: 500; }
.tag.play { background: var(--accent); color: #140a03; }
.tag.soft { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.badge { position: absolute; top: 10px; left: 10px; font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: #000a; }
.badge.hidden { background: var(--pink); color: #fff; position: static; vertical-align: middle; }
.cover .badge.hidden { position: absolute; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); background: var(--panel); border-radius: var(--r); border: 1px dashed var(--line); }
.empty .big { font-size: 3.4rem; margin: 0; }

/* Knoepfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--orange); color: #1a0d05; font: inherit; font-weight: 600; text-decoration: none; box-shadow: 0 4px 0 #b4471a; transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b4471a; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.big { padding: 15px 26px; font-size: 1.12rem; }
.btn.play { background: var(--accent, var(--orange)); }
.btn.dl { background: var(--panel2); color: var(--text); box-shadow: 0 4px 0 #17122c; border: 1px solid var(--line); }
.btn.dl small { color: var(--muted); font-weight: 400; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--err); color: #fff; box-shadow: 0 3px 0 #a12f2f; }
.btn.small { padding: 6px 12px; font-size: .88rem; border-radius: 10px; box-shadow: none; }

/* Spielseite */
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.game-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.game-cover { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg2); box-shadow: var(--shadow), 0 0 40px color-mix(in srgb, var(--accent) 25%, transparent); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-info h1 { margin: 0 0 6px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.meta span { font-size: .85rem; padding: 4px 12px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 420px; }
.desc { margin-top: 30px; padding: 22px 24px; background: var(--panel); border-radius: var(--r); border: 1px solid var(--line); white-space: normal; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.shots img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border: 1px solid var(--line); }
.hint { margin-top: 24px; color: var(--muted); font-size: .92rem; }
.hint h2 { font-size: 1rem; color: var(--text); }
.text { max-width: 760px; }

/* Spieler */
body.player { background: #000; overflow: hidden; }
.pbar { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: var(--bg2); }
.pbar a { color: var(--text); text-decoration: none; font-weight: 600; }
.pbar button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font: inherit; cursor: pointer; }
body.player.portrait #game { width: min(100vw, calc((100dvh - 44px) * 9 / 16)); margin: 0 auto; }
body.player.portrait { background: radial-gradient(circle at 50% 40%, #2c2450, #000 70%); }
#game { display: block; width: 100vw; height: calc(100vh - 44px); height: calc(100dvh - 44px); border: 0; background: #000; }

/* Verwaltung */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.panel.narrow { max-width: 420px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.panel h1 { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input[type=text], input:not([type]), input[type=password], input[type=number], textarea, select {
  font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
input[type=color] { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); padding: 4px; }
input[type=file] { font: inherit; color: var(--muted); }
.err { background: rgba(255, 93, 93, .15); border: 1px solid var(--err); padding: 10px 14px; border-radius: 12px; }
.ok { background: rgba(79, 209, 139, .14); border: 1px solid var(--ok); padding: 10px 14px; border-radius: 12px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-head h1 { margin: 0; }
.list { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--r); overflow: hidden; }
.list th, .list td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list th { background: var(--panel2); font-weight: 600; font-size: .9rem; color: var(--muted); }
.list a { color: var(--text); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }
.tips { margin-top: 24px; }
.tips h2 { margin-top: 0; font-size: 1.15rem; }
.form { display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { padding: 0 8px; font-weight: 700; color: var(--orange); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.lbl { margin: 0 0 6px; font-weight: 500; }
.pre { font-size: .85rem; color: var(--muted); }
.thumb { max-width: 240px; border-radius: 10px; margin-bottom: 6px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tcheck { width: 120px; font-size: .8rem; font-weight: 400; }
.tcheck img { border-radius: 8px; aspect-ratio: 16 / 10; object-fit: cover; }
.dlrow { display: grid; grid-template-columns: 1.4fr .9fr 1.4fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.savebar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--panel) 40%); }
.progress { flex: 1; position: relative; height: 24px; background: var(--bg2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--pink)); transition: width .2s; }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; font-weight: 600; }

@media (max-width: 760px) {
  .hero { flex-direction: column; align-items: flex-start; padding-top: 16px; }
  .hero-art { font-size: 2.2rem; }
  .hero-art span { width: 60px; height: 60px; border-radius: 18px; }
  .game-top { grid-template-columns: 1fr; }
  .actions { max-width: none; }
  .dlrow { grid-template-columns: 1fr 1fr; }
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .list td { border: 0; padding: 4px 14px; }
  .row-actions { justify-content: flex-start; }
  .top { padding: 12px 16px; }
  .logo { font-size: 1.1rem; }
}

.board td:first-child { width: 48px; font-size: 1.1rem; }
.board tr.top1 td { background: rgba(255, 210, 60, .10); }
.board tr.top2 td { background: rgba(200, 210, 230, .07); }
.board tr.top3 td { background: rgba(220, 140, 80, .08); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); margin-right: 4px; }
