/* Cat Run – same night-chase look as the game (Scripts/UI/UIKit.cs palette, Lilita One). */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --red: #ff4054;
  --red-deep: #c42438;
  --pink: #ff618c;
  --blue: #4d8cff;
  --blue-deep: #2f63cc;
  --cyan: #45a8ff;
  --mint: #4acf6b;
  --yellow: #ffc752;
  --plum: #997af2;
  --ink: #ffffff;
  --ink-soft: #bdb3d1;
  --card: #31264a;
  --well: #3d3057;
  --line: #43375a;
  --bg-top: #2a2148;
  --bg-mid: #1f1834;
  --bg-bottom: #1a122b;
  --summary: #3d3057;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius: 26px;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* The game is always dark; light mode only softens the legal pages a little. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #1a122b;
    --ink-soft: #5d5372;
    --card: #ffffff;
    --well: #f3effa;
    --line: #e4ddf0;
    --bg-top: #dfe8ff;
    --bg-mid: #efeaff;
    --bg-bottom: #ffe6ee;
    --summary: #f3effa;
    --shadow: 0 10px 30px rgba(60, 40, 120, 0.14);
  }
}
:root[data-theme="light"] {
  --ink: #1a122b;
  --ink-soft: #5d5372;
  --card: #ffffff;
  --well: #f3effa;
  --line: #e4ddf0;
  --bg-top: #dfe8ff;
  --bg-mid: #efeaff;
  --bg-bottom: #ffe6ee;
  --summary: #f3effa;
  --shadow: 0 10px 30px rgba(60, 40, 120, 0.14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--round);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%) fixed;
  background-color: var(--bg-mid);
  line-height: 1.6;
}

a { color: var(--cyan); font-weight: 700; }
a:hover { color: var(--pink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 10px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }

/* ---------- header / footer ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-family: "Lilita One", var(--round); font-size: 22px; letter-spacing: 0.5px;
}
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); color: var(--pink); }

.foot {
  padding: 40px 0 48px; text-align: center; color: var(--ink-soft); font-size: 14px;
}
.foot nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- building blocks ---------- */

.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.title {
  font-family: "Lilita One", var(--round);
  font-weight: 400;
  color: var(--pink);
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 900; font-size: 17px; color: #fff; text-decoration: none;
  background: var(--red); border: 0; border-radius: 22px; cursor: pointer;
  padding: 14px 26px;
  box-shadow: 0 6px 0 var(--red-deep);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { color: #fff; filter: brightness(1.06); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--red-deep); }
.btn.blue { background: var(--blue); box-shadow: 0 6px 0 var(--blue-deep); }
.btn.blue:active { box-shadow: 0 1px 0 var(--blue-deep); }
.btn.mint { background: #1f8a42; box-shadow: 0 6px 0 #14602d; }
.btn.mint:active { box-shadow: 0 1px 0 #14602d; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- home ---------- */

.hero { text-align: center; padding: 10px 0 8px; }
.hero .art {
  width: min(420px, 86vw); height: auto; display: block; margin: 0 auto 18px;
  border-radius: 32px; box-shadow: 0 18px 50px rgba(255, 64, 84, 0.25), var(--shadow);
}
.hero .wanted {
  font-family: "Lilita One", var(--round); color: var(--red); font-size: 22px; letter-spacing: 2px;
  margin: 0 0 4px; animation: siren 1.2s steps(1) infinite;
}
@keyframes siren { 50% { color: var(--cyan); } }
@media (prefers-reduced-motion: reduce) { .hero .wanted { animation: none; } }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); font-weight: 800; margin: 0 auto 22px; max-width: 36ch; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.section-title { text-align: center; font-size: clamp(26px, 4vw, 34px); margin: 44px 0 14px; }

.levels { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.levels li {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 12px 18px; font-weight: 700;
}
.levels .stars { color: var(--yellow); font-size: 18px; letter-spacing: 2px; min-width: 5.6em; }

.powerups, .features { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.features { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0; }
.powerup { text-align: center; padding: 18px 14px; }
.powerup img { width: 84px; height: 84px; display: block; margin: 0 auto 8px; }
.powerup h3, .feature h3 { margin: 4px 0; font-size: 18px; font-weight: 900; }
.powerup p, .feature p { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: 15px; }

.cats { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat {
  background: var(--well); border: 2px solid var(--line); border-radius: 22px;
  padding: 10px 10px 12px; text-align: center;
}
.cat img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; }
.cat b { display: block; font-size: 15px; font-weight: 900; }
.cat i { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.more { text-align: center; color: var(--ink-soft); font-weight: 700; margin: 12px 0 0; }

.feature .icon { width: 46px; height: 46px; display: block; }

/* ---------- legal pages ---------- */

.doc { margin: 10px 0 30px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); }
.doc .meta { color: var(--ink-soft); font-weight: 700; margin: 0 0 18px; }
.doc h2 { font-size: 20px; font-weight: 900; margin: 28px 0 6px; color: var(--ink); }
.doc p, .doc li { font-weight: 500; }
.doc ul { padding-left: 22px; }
.doc .summary { background: var(--summary); border-radius: 20px; padding: 16px 18px; font-weight: 700; }

/* ---------- support form ---------- */

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 800; }
.hint { font-weight: 600; color: var(--ink-soft); font-size: 14px; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 600; color: var(--ink);
  background: var(--well); border: 2px solid var(--line); border-radius: 16px;
  padding: 12px 14px; width: 100%;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cyan); }
.form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { border-radius: 16px; padding: 14px 16px; font-weight: 800; display: none; }
.status.ok { display: block; background: #d9f7e1; color: #17703a; }
.status.err { display: block; background: #ffe0e4; color: #a8263a; }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .powerups, .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .top { flex-wrap: wrap; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .levels .stars { min-width: 5.5em; font-size: 16px; }
}
