@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&display=swap");

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #101010;
  --muted: #6b6b6b;
  --rule: #e5e5e5;
  --shade: #f5f5f5;
  --card: #ffffff;
  --heading: #2c3d51;
  --hint: #95a5a6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #ededed;
    --muted: #9a9a9a;
    --rule: #262626;
    --shade: #161616;
    --card: #141414;
    --heading: #ededed;
    --hint: #9a9a9a;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  background: var(--bg);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Ubuntu,
    "Helvetica Neue",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--fg);
}

.fun-text {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #f22952, #ff7043);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

canvas {
  will-change: transform;
}

header,
#site-header {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.25rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

header h1 {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.4rem;
}

.games {
  max-width: 640px;
  margin: auto;
  padding: 1rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

a.game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  background: var(--card);
}

a.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
}

a.game-card img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.numup-banner {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: linear-gradient(135deg, #2c3d51 0%, #1a2535 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.numup-banner::before {
  content: '? + ? = 🎯';
  font-size: 1.1rem;
  opacity: 0.85;
}

.game-card .info {
  padding: 0.75rem 1rem;
}

.game-card .info h2 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--heading);
  margin: 0 0 0.2rem;
}

.game-card .info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 1rem 1.5rem 2.5rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}

footer div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--fg);
}

#breadcrumb {
  flex: 1;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--muted);
}

#breadcrumb a {
  text-decoration: none;
}

#shareBtn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

#shareBtn:hover {
  background: var(--shade);
}

#hint {
  margin: 0;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--hint);
  line-height: 1.6;
  flex-shrink: 0;
}

#hint.hidden {
  visibility: hidden;
}
