/* Same look as Shithead: sky backdrop, Fredoka, candy buttons. */
@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/Fredoka_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/Fredoka_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --sky-top: #6cc4ff;
  --sky: #2a8fe6;
  --deep: #0d3c80;
  --ink: #26304a;
  --gold: #ffd23f;
  --gold-edge: #d49a00;
  --gold-ink: #5a3a00;
  --green: #22c58b;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  font-family: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 55%, #1f7ad4 100%) fixed;
  background-color: var(--sky);
  overflow-x: hidden;
}

/* Drifting clouds behind everything. */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  animation: drift 40s ease-in-out infinite alternate;
}
.c1 { width: 340px; height: 120px; top: 6%; right: -60px; }
.c2 { width: 420px; height: 150px; bottom: 4%; left: -120px; animation-duration: 55s; }
.c3 { width: 220px; height: 80px; top: 42%; left: 8%; opacity: 0.6; animation-duration: 47s; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(60px); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } }

header, main, footer { position: relative; z-index: 1; }

.hero { text-align: center; padding: 56px 16px 12px; }

/* Gold letters with a navy outline, like the game's title. */
.logo {
  margin: 0;
  font-size: clamp(54px, 13vw, 104px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-text-stroke: 0.1em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(13, 60, 128, 0.35);
}
.logo span { color: #fff; }

.tagline {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: clamp(17px, 4.2vw, 21px);
  line-height: 1.4;
  text-shadow: 0 2px 3px rgba(13, 60, 128, 0.55);
}

main { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }

.section-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.9;
}

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
}

.game {
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 6px 10px 0 rgba(13, 60, 128, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.game:not(.soon):hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: 8px 14px 0 rgba(13, 60, 128, 0.3); }

.game-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.game-link:focus-visible { outline: 4px solid var(--gold); outline-offset: -8px; border-radius: 22px; }

.game-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-bottom: 4px solid var(--ink);
  background: var(--sky);
}

.game-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 20px; }
.game-name { margin: 0; font-size: 28px; font-weight: 700; }
.game-blurb { margin: 6px 0 12px; font-size: 16px; line-height: 1.4; color: #4a5470; }

.tags { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e6f2ff;
  border: 2px solid #bcd6f2;
  color: var(--deep);
}

/* Candy button: gold with a white rim, a thick bottom edge and a shine. */
.play {
  position: relative;
  margin-top: auto;
  display: block;
  text-align: center;
  padding: 11px 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-ink);
  background: var(--gold);
  border: 3px solid #fff;
  border-bottom: 8px solid var(--gold-edge);
  border-radius: 20px;
  box-shadow: 0 0 0 3px var(--ink);
  overflow: hidden;
}
.play::before {
  content: '';
  position: absolute;
  left: 8px; right: 8px; top: 4px;
  height: 38%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}
.game-link:active .play { transform: translateY(3px); border-bottom-width: 5px; margin-bottom: 3px; }

/* "Coming soon" placeholder. */
.soon {
  background: rgba(22, 76, 158, 0.55);
  color: #fff;
  border: 4px dashed rgba(255, 255, 255, 0.75);
  box-shadow: none;
}
.soon .game-blurb { color: rgba(255, 255, 255, 0.9); }
.soon-face {
  display: grid;
  place-items: center;
  aspect-ratio: 1200 / 630;
  font-size: 96px;
  font-weight: 700;
  color: var(--gold);
  -webkit-text-stroke: 0.08em var(--ink);
  paint-order: stroke fill;
  border-bottom: 4px dashed rgba(255, 255, 255, 0.5);
}

.footer { text-align: center; padding: 8px 16px 40px; font-size: 15px; text-shadow: 0 1px 2px rgba(13, 60, 128, 0.5); }
.footer p { margin: 6px 0; }
.footer a { color: var(--gold); overflow-wrap: anywhere; }
.footer .small { font-size: 13px; opacity: 0.85; }
