/* The look of the home page (index.html). The game pages share site.css instead. */
:root {
  --sky: #1b1b2f;
  --panel: #25253f;
  --text: #f0f0e8;
  --dim: #9a9ab0;
  --grass: #66aa33;
  --grass-dark: #4d8a22;
  --dirt: #885533;
  --dirt-dark: #664422;
  --gold: #ffcc33;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--sky);
  color: var(--text);
  font-family: "Press Start 2P", ui-monospace, monospace;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
  gap: 28px;
}
h1 {
  margin: 0;
  font-size: clamp(22px, 6vw, 48px);
  line-height: 1.4;
  letter-spacing: 2px;
  text-shadow: 4px 4px 0 #000;
}
.soon {
  margin: 0;
  font-size: clamp(12px, 2.6vw, 18px);
  color: var(--gold);
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .soon { animation: none; } }
p.note {
  margin: 0;
  max-width: 34em;
  font-size: 11px;
  line-height: 2;
  color: var(--dim);
}
a.play {
  display: inline-block;
  padding: 16px 22px;
  font: inherit;
  font-size: 13px;
  color: #000;
  background: var(--grass);
  text-decoration: none;
  border: 4px solid #000;
  box-shadow: inset -4px -4px 0 var(--grass-dark), 4px 4px 0 #000;
}
a.play:hover, a.play:focus-visible { background: #77bb44; outline: none; }
a.play:active { transform: translate(2px, 2px); box-shadow: inset -4px -4px 0 var(--grass-dark), 2px 2px 0 #000; }
/* A card for each game, side by side, or one under another on a phone:
   a picture, the name, a line about it, PLAY (straight to the game) and
   ABOUT (its page here, with how to put it on your home screen). */
.games {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: min(1100px, 100%);
  text-align: left;
}
.game {
  position: relative;
  flex: 1 1 300px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
}
.game[hidden] { display: none; }
.game > a:first-child img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 4px solid #000;
}
.game img.pixel { image-rendering: pixelated; }
.game h2 {
  margin: 16px 16px 10px;
  font-size: 13px;
  line-height: 1.6;
}
.game p {
  flex: 1;
  margin: 0 16px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dim);
}
/* The "● 3 PLAYING" badge in the top right corner of a card's picture: green while
   someone is playing, grey at 0 (home.js fills it in). */
.game .playing {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 8px;
  font-size: 9px;
  color: #fff;
  background: #3a7d1e;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.game .playing.none { background: #555; color: #ddd; }
/* "IN DEVELOPMENT" in the top left corner of the picture, on a game that is
   only on the testing copy of the site so far. Taken off when the game goes
   on triboigames.com. */
.game .indev {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 8px;
  font-size: 9px;
  color: #000;
  background: var(--gold);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.game .playing[hidden] { display: none; }
.game .buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 18px;
}
.game a.play { padding: 12px 16px; font-size: 11px; }
.game a.about { color: var(--gold); font-size: 10px; }
/* A card on another page (home.js) is left out until its page is chosen. */
.game.offpage { display: none; }
/* The page buttons under the cards: square blocks, the current one green. */
.pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pages[hidden] { display: none; }
.pages button {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  background: var(--panel);
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
}
.pages button:hover, .pages button:focus-visible { background: #34345a; outline: none; }
.pages button.current { color: #000; background: var(--grass); box-shadow: inset -4px -4px 0 var(--grass-dark), 4px 4px 0 #000; }
.pages button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
/* A strip of grass and dirt along the bottom, drawn with gradients so the page needs no images. */
.ground {
  height: 64px;
  background:
    linear-gradient(var(--grass) 0 12px, transparent 12px),
    repeating-linear-gradient(90deg, var(--dirt) 0 16px, var(--dirt-dark) 16px 20px, var(--dirt) 20px 32px);
  border-top: 4px solid var(--grass-dark);
}
/* The account link in the top right corner: LOG IN / REGISTER, or PROFILE
   with the player's name once a player is on this device. */
.topbar { position: absolute; top: 12px; right: 12px; }
a.acct {
  display: inline-block;
  padding: 8px 10px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--gold);
  text-decoration: none;
  border: 3px solid #000;
  background: rgba(0, 0, 0, .45);
  box-shadow: 3px 3px 0 #000;
  text-align: right;
}
a.acct:hover, a.acct:focus-visible { background: #000; color: #ffdd66; }
a.acct .who { display: block; color: var(--dim); font-size: 8px; }
/* The tip jar above the games: gold, so it doesn't look like another game. */
.tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
a.play.tipjar { background: var(--gold); box-shadow: inset -4px -4px 0 #cc9922, 4px 4px 0 #000; font-size: 11px; }
a.play.tipjar:hover, a.play.tipjar:focus-visible { background: #ffdd66; }
footer a { color: inherit; }
footer {
  background: var(--dirt);
  color: #e8d8c0;
  text-align: center;
  font-size: 9px;
  padding: 0 16px 16px;
}
/* The player's picture and styled name in the account link (home.js, /looks.css). */
a.acct .who.styled { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 4px; font-size: 9px; }
a.acct .who.styled .look-avatar { border-width: 2px; }
a.acct .who.styled .look-name { gap: 5px; }
a.acct .who.styled .premium-badge { font-size: 6px; padding: 3px 4px 2px; box-shadow: 1px 1px 0 #000; }
