/* Sakura Studio Games: one stylesheet for every page. Soft white background with navy text,
   sakura pink for links and the gold of the ninja game's title for the main button. */
:root {
  color-scheme: light;
  --bg: #faf8f5;
  --bg-raised: #ffffff;
  --border: rgba(27, 42, 74, 0.14);
  --text: #1b2a4a;
  --muted: #55627d;
  --pink: #c8326a;
  --pink-strong: #a3214f;
  --gold: #ffd76a;
  --width: 860px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 111, 156, 0.10), transparent 70%),
    radial-gradient(900px 400px at -10% 10%, rgba(92, 120, 255, 0.06), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

a {
  color: var(--pink);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--pink-strong);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}
h1 {
  margin-top: 0.6em;
  font-size: clamp(32px, 6vw, 48px);
  color: var(--text);
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 19px;
}

.lead {
  font-size: 20px;
  color: var(--text);
}

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

/* Header and footer */
.site-header,
.site-footer {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-footer {
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand:hover {
  color: var(--text);
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav a {
  color: var(--muted);
  text-decoration: none;
}
nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
}

/* Game cards on the home page */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 20px;
  margin-top: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}
.card h3 {
  margin: 0 0 6px;
}
.card h3 a {
  color: var(--text);
}
.card h3 a:hover {
  color: var(--pink);
}
.card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
}
.card .buttons {
  margin-top: auto;
}

/* Buttons */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.button:hover {
  color: var(--text);
  border-color: rgba(27, 42, 74, 0.35);
}
.button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1408;
}
.button.primary:hover {
  background: #ffe28f;
  color: #1a1408;
}

/* A game's own page */
.screenshot {
  display: block;
  width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.controls {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.controls th,
.controls td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.controls th {
  white-space: nowrap;
  width: 1%;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 7px;
  border: 1px solid rgba(27, 42, 74, 0.3);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: rgba(27, 42, 74, 0.04);
  font: 600 14px/1.5 ui-monospace, Consolas, monospace;
  text-align: center;
}

.note {
  padding: 14px 18px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 156, 188, 0.14);
  border-radius: 0 10px 10px 0;
}

/* Long text pages (privacy policy) */
.prose li {
  margin-bottom: 6px;
}
