/* wordpaint.app: the game's look on the web (apps/mobile/lib/ui/game_colors.dart): the map's bright blue, its floating
   letter tiles, chunky panels and buttons with the thick dark outline, Lilita One for titles and Fredoka for text. */
@font-face { font-family: "Lilita One"; src: url("/assets/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/assets/Fredoka-Variable.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }

:root {
  --outline: #1c1638;
  --ink: #241b4b;
  --panel: #f4f1ff;
  --header: #6a54f5;
  --yellow: #ffcf3a;
  --yellow-dark: #e59a12;
  --muted: #5a5280;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, #4ab8ff 0%, #2a88f4 45%, #1b57d2 100%) fixed;
  overflow-x: hidden;
}

/* Only the chosen language shows (site.js sets data-lang on <html>). */
html[data-lang="es"] [lang="en"]:not(html), html[data-lang="en"] [lang="es"]:not(html) { display: none !important; }

/* The map's floating tiles. */
.tiles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.tiles i {
  position: absolute; width: 34px; height: 34px; border-radius: 9px;
  border: 3px solid var(--outline); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), inset 0 4px 0 rgba(255, 255, 255, .35);
  opacity: .9; animation: drift 14s ease-in-out infinite alternate;
}
.tiles i:nth-child(1) { left: 4%; top: 12%; background: #ffcf3a; }
.tiles i:nth-child(2) { left: 88%; top: 8%; background: #42d46a; animation-delay: -3s; }
.tiles i:nth-child(3) { left: 93%; top: 46%; background: #a855f7; animation-delay: -6s; }
.tiles i:nth-child(4) { left: 2%; top: 58%; background: #2fd3c8; animation-delay: -9s; }
.tiles i:nth-child(5) { left: 12%; top: 86%; background: #ff6fa5; animation-delay: -2s; }
.tiles i:nth-child(6) { left: 80%; top: 82%; background: #ff8f1f; animation-delay: -7s; }
.tiles i:nth-child(7) { left: 50%; top: 94%; background: #7a5cff; animation-delay: -5s; }
.tiles i:nth-child(8) { left: 70%; top: 26%; background: #f2484b; width: 24px; height: 24px; border-radius: 7px; animation-delay: -11s; }
@keyframes drift { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-26px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .tiles i { animation: none; } }

.page { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 18px 16px 40px; }

/* Top bar: the wordmark home and the language pills. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top .home img { display: block; width: 168px; height: auto; filter: drop-shadow(0 4px 0 rgba(28, 22, 56, .35)); }
/* the home shows the big wordmark: no small one above it */
body:has(.hero) .top .home { visibility: hidden; }
.langs { display: flex; gap: 8px; }
.langs a {
  font-family: "Lilita One", system-ui, sans-serif; font-size: 16px; letter-spacing: .5px; text-decoration: none;
  color: #fff; padding: 6px 12px; border-radius: 12px; border: 3px solid var(--outline);
  background: rgba(28, 22, 56, .35); box-shadow: 0 4px 0 var(--outline);
}
html[data-lang="es"] .langs a[data-lang="es"], html[data-lang="en"] .langs a[data-lang="en"] { background: var(--yellow); color: var(--ink); }

/* Lilita One white with the dark outline, as the game's titles. */
.title {
  font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; color: #fff; margin: 0;
  -webkit-text-stroke: 7px var(--outline); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--outline);
}

/* The chunky panel: a lavender card with a header band, as the game's popups. */
.panel {
  margin-top: 22px; background: var(--panel); border: 4px solid var(--outline); border-radius: 26px;
  box-shadow: 0 8px 0 var(--outline); overflow: hidden;
}
.panel > header { background: var(--header); padding: 18px 24px 16px; border-bottom: 4px solid var(--outline); }
.panel > header .title { font-size: clamp(26px, 6vw, 38px); line-height: 1.15; }
.panel > header p { margin: 6px 0 0; color: #e9e4ff; font-size: 15px; }
.panel .body { padding: 8px 26px 26px; }
.panel h2 { font-family: "Lilita One", system-ui, sans-serif; font-weight: 400; color: var(--header); font-size: 23px; margin: 26px 0 6px; }
.panel h3 { font-size: 18px; margin: 18px 0 4px; }
.panel a { color: #3f2fd6; font-weight: 600; }
.panel ul { padding-left: 1.2em; }
.panel li { margin: 4px 0; }
.panel table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.panel th, .panel td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 2px solid #ddd6ff; }
.panel th { font-weight: 600; }
.panel .note { background: #fff4e0; border: 3px solid var(--outline); border-radius: 16px; padding: 12px 16px; margin: 16px 0; }
.panel pre {
  white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.45; background: #fff;
  border: 3px solid var(--outline); border-radius: 14px; padding: 14px; max-height: 420px; overflow: auto;
}
.panel details { margin: 12px 0; }
.panel summary { cursor: pointer; font-weight: 600; }

/* The game's yellow button. */
.btn {
  display: inline-block; font-family: "Lilita One", system-ui, sans-serif; font-size: 20px; letter-spacing: .3px;
  color: var(--ink) !important; text-decoration: none; padding: 12px 24px; border-radius: 18px;
  background: var(--yellow); border: 4px solid var(--outline);
  box-shadow: inset 0 -6px 0 var(--yellow-dark), 0 5px 0 var(--outline);
}
.btn.ghost { background: #fff; box-shadow: inset 0 -6px 0 #cfc8f5, 0 5px 0 var(--outline); }

/* Home. */
.hero { text-align: center; margin-top: 18px; }
.hero .logo { width: min(560px, 100%); height: auto; filter: drop-shadow(0 8px 0 rgba(28, 22, 56, .35)); }
.hero .title { font-size: clamp(30px, 7vw, 48px); margin-top: 6px; }
.soon { display: inline-block; margin-top: 22px; }

/* Pix with a speech bubble. */
.pix { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; }
.pix img { width: 84px; height: 84px; flex: none; }
.pix .bubble { position: relative; background: #fff; border: 3px solid var(--outline); border-radius: 18px; padding: 10px 14px; font-weight: 500; }

footer.site { margin-top: 30px; text-align: center; color: #fff; font-size: 15px; text-shadow: 0 2px 0 rgba(28, 22, 56, .45); }
footer.site nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 8px; }
footer.site a { color: #fff; font-weight: 600; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .top .home img { width: 132px; }
  .panel .body { padding: 6px 18px 20px; }
  .panel > header { padding: 16px 18px 14px; }
}
