/* The page for choosing a game. Colours and type come from core/base.css. */

html:has(.hub),
body.hub {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

body.hub {
  background: linear-gradient(#58b7ff, #d6f0ff 70%);
}

.hub-main {
  width: min(960px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.hub-lead {
  font-size: clamp(18px, 2.3vw, 26px);
  font-weight: 500;
}

.game-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 3vw, 28px);
  margin: clamp(16px, 3vh, 32px) 0 clamp(14px, 2vh, 24px);
}

.game-card {
  display: block;
  overflow: hidden;
  padding-bottom: 22px;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.game-card:hover { transform: translateY(-5px); }

.game-card h2 { margin-top: 16px; }

.game-card p {
  margin-top: 4px;
  padding: 0 18px;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--ink-soft);
}

.game-art svg {
  display: block;
  width: 100%;
}

.game-art-racers { background: linear-gradient(#7cc8ff, #d6f0ff); }
.game-art-balloons { background: linear-gradient(#58b7ff, #bfe6ff); }

.art-hill { fill: #7bd65b; }
.art-road { fill: #5d6b7c; }
.art-dash { fill: #f4f7fa; }
.art-car rect { fill: #ff5a4f; }
.art-car .art-glass { fill: #1f3247; }
.art-car .art-lamp { fill: #ffe066; }
.art-car .art-tyre { fill: #2b3340; }

.art-string {
  fill: none;
  stroke: #12304d;
  stroke-opacity: 0.45;
  stroke-width: 2;
  stroke-linecap: round;
}

.art-balloon-red path { fill: #ff5a4f; }
.art-balloon-yellow path { fill: #ffc21a; }
.art-balloon-blue path { fill: #3b82f6; }
.art-shine { fill: #ffffff; opacity: 0.45; }

.game-art-moves { background: linear-gradient(#58b7ff, #d9f2ff 70%); }
.art-mat { fill: #ffd66b; }
.art-pig ellipse, .art-pig circle { fill: #ffa6bf; stroke: #4a1f3d; stroke-width: 3; }
.art-arm { fill: none; stroke: #ffa6bf; stroke-width: 15; stroke-linecap: round; }
.art-strip { fill: #2f6fed; }
.art-snout { fill: #ff8bab; stroke: #4a1f3d; stroke-width: 2.5; }
.art-eye { fill: #1c1630; }
.art-star { fill: #ffc21a; stroke: #dba500; stroke-width: 2; }
.art-figure circle { fill: #12304d; }
.art-figure path { fill: none; stroke: #12304d; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

.game-art-trail { background: linear-gradient(#7cc8ff, #e4f6ff 66%); }
.game-art-sky { background: linear-gradient(#3f9fe8, #d9f2ff); }
.art-cloud { fill: #fff; opacity: 0.9; }
.art-ring { fill: none; stroke: #ffd23f; stroke-width: 9; }
.art-wing { fill: #ff5a4f; stroke: #12304d; stroke-width: 3; }
.art-fuselage { fill: #a855f7; stroke: #12304d; stroke-width: 3; }
.art-tail { fill: #3b82f6; stroke: #12304d; stroke-width: 3; }
.art-pilot { fill: #ffd23f; stroke: #12304d; stroke-width: 3; }
.art-trail { fill: #e4bf85; }
.art-log rect { fill: #8a5a2b; }
.art-log ellipse { fill: #d9b277; }
.art-giraffe ellipse { fill: #f5c451; stroke: #4a2c10; stroke-width: 2.5; }
.art-neck { fill: none; stroke: #f5c451; stroke-width: 11; stroke-linecap: round; }
.art-legs { fill: none; stroke: #f5c451; stroke-width: 8; stroke-linecap: round; }
.art-spot { fill: #b4682c; }
.art-hop { fill: none; stroke: #ffffff; stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }

.hub-print { max-width: 640px; }

@media (prefers-reduced-motion: reduce) {
  .game-card { transition: none; }
  .game-card:hover { transform: none; }
}

.art-sky-sea { fill: #2a9fd6; }
.art-sky-island { fill: #63bd58; }
.art-sky-top { fill: #7e7268; }
.art-wing-small { fill: #ff5a4f; }
.art-fuselage-small { fill: #3b3b48; }

/* The new games' pictures. */
.game-art-walk { background: linear-gradient(#ffd9a0, #fff1d6 70%); }
.game-art-walk .art-hill { fill: #d8a860; }
.art-tree path { fill: #7a5531; }
.art-tree ellipse { fill: #6f8f3f; }
.art-fruit { fill: #e8433f; stroke: var(--ink); stroke-width: 2; }
.art-carry { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 12; }

.game-art-spiders { background: linear-gradient(#8fd3ff, #e9f8ff 70%); }
.game-art-spiders .art-hill { fill: #7cc65e; }
.art-spider-branch { fill: none; stroke: #8a5a34; stroke-width: 8; stroke-linecap: round; }
.art-spider-web circle, .art-spider-web path { fill: none; stroke: #fff; stroke-width: 2.500; }
.art-spider-web circle:first-child { fill: rgb(255 255 255 / 0.35); }
.art-spider-thread { fill: none; stroke: #fff; stroke-width: 2; }
.art-spider-legs-pink path { fill: none; stroke: #c45285; stroke-width: 5; stroke-linecap: round; }
.art-spider-legs-blue path { fill: none; stroke: #2f86b8; stroke-width: 4; stroke-linecap: round; }
.art-spider-pink { fill: #ff7eb6; stroke: var(--ink); stroke-width: 3; }
.art-spider-blue { fill: #5fc3ff; stroke: var(--ink); stroke-width: 3; }
.art-spider-eye { fill: #fff; stroke: var(--ink); stroke-width: 1.500; }
.art-spider-pupil { fill: var(--ink); }
.art-spider-smile { fill: none; stroke: var(--ink); stroke-width: 2.500; stroke-linecap: round; }

.game-art-smoothie { background: linear-gradient(#8fd2fa, #e6f7ff 75%); }
.art-stand { fill: #c98d4e; }
.art-glass-cup path:first-child { fill: #f4fbff; stroke: var(--ink); stroke-width: 3; }
.art-drink { fill: #ff8fa8; }
.art-straw { fill: none; stroke: #e8433f; stroke-width: 6; stroke-linecap: round; }
.art-sliced path { fill: #e8433f; stroke: var(--ink); stroke-width: 3; }
.art-swipe { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.art-orange { fill: #ff9f2e; stroke: var(--ink); stroke-width: 3; }

.game-art-lighthouse { background: linear-gradient(#2c4663, #6d8aa6 76%); }
.art-beam { fill: #ffe996; opacity: 0.55; }
.art-rock { fill: #4b4f58; }
.art-tower { fill: #f4f1e8; stroke: var(--ink); stroke-width: 3; }
.art-tower-band { fill: #e8433f; }
.art-lamp-room { fill: #ffd23f; stroke: var(--ink); stroke-width: 3; }
.art-tower-roof { fill: #e8433f; stroke: var(--ink); stroke-width: 3; }
.art-boat path:first-child { fill: #ff9a5c; stroke: var(--ink); stroke-width: 3; }
.art-boat path:last-child { fill: #fff4e0; stroke: var(--ink); stroke-width: 3; }
.art-wave { fill: #23435f; }

/* Robot Rescue's picture. */
.game-art-rescue { background: linear-gradient(#58b7ff, #d9f2ff 62%); }
.art-roof { fill: #d9583f; }
.art-house-a { fill: #f6d9a8; }
.art-house-b { fill: #a9d8c9; }
.art-house-c { fill: #f2c6d0; }
.art-window { fill: #79c3e0; }
.art-string-flags { fill: none; stroke: #6b5a4a; stroke-width: 1.5; }
.art-flags { fill: #ffd23f; stroke: #e8574c; stroke-width: 1; }
.art-cobbles { fill: #d9c7a8; }
.art-rails { fill: none; stroke: #6d747c; stroke-width: 4; stroke-linecap: round; }
.art-tin-leg, .art-tin-boot, .art-tin-body { fill: #3cc2b4; stroke: var(--ink); stroke-width: 3; }
.art-tin-arm { fill: none; stroke: #ffc83d; stroke-width: 9; stroke-linecap: round; }
.art-tin-plate { fill: #fff1d0; stroke: var(--ink); stroke-width: 2; }
.art-tin-antenna { fill: none; stroke: var(--ink); stroke-width: 3; }
.art-tin-tip { fill: #ff6b57; stroke: var(--ink); stroke-width: 2.5; }
.art-tin-eye { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.art-tin-pupil { fill: var(--ink); }
.art-tin-mouth { fill: var(--ink); }
.art-paint-pink { fill: #ff7eb6; stroke: var(--ink); stroke-width: 2; }
.art-paint-blue { fill: #3fb7ff; stroke: var(--ink); stroke-width: 2; }
.art-paint-yellow { fill: #ffd23f; stroke: var(--ink); stroke-width: 2; }
.art-sight circle { fill: none; stroke: #ffb02e; stroke-width: 6; }
.art-sight path { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.art-cage-roof { fill: #ffc83d; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.art-giraffe-neck, .art-giraffe-head { fill: #f5c451; stroke: #4a2c10; stroke-width: 2.5; }
.art-giraffe-horn { fill: none; stroke: #5a3a1c; stroke-width: 4; stroke-linecap: round; }
.art-cage-bars { fill: none; stroke: #3a4557; stroke-width: 4; stroke-linecap: round; }
.art-lock { fill: #ffc83d; stroke: var(--ink); stroke-width: 2.5; }
.art-lock-loop { fill: none; stroke: var(--ink); stroke-width: 3; }
.art-blaster-body { fill: #ff8a3c; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.art-blaster-barrel { fill: #3f86d9; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }

/* Tank Patrol's picture. */
.game-art-tanks { background: linear-gradient(#7cc8ff, #e4f6ff 62%); }
.art-fort path { fill: #c9c3b6; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-fort .art-fort-roof { fill: #7f5a7e; }
.art-fort .art-fort-gate { fill: #3a2d28; }
.art-tank-river { fill: #4cb5e3; }
.art-robot-tank rect { fill: #ff4f7b; stroke: var(--ink); stroke-width: 3; }
.art-robot-tank .art-tank-tread, .art-my-tank .art-tank-tread { fill: #2c3646; stroke: var(--ink); stroke-width: 3; }
.art-robot-eye { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.art-tank-sight { fill: none; stroke: #35e07a; stroke-width: 7; }
.art-tank-ticks { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.art-tank-shot { fill: #ffd23f; stroke: var(--ink); stroke-width: 2.5; }
.art-my-tank rect, .art-my-tank ellipse { fill: #2f6fed; stroke: var(--ink); stroke-width: 3; }
.art-my-tank .art-tank-trim { fill: #ffd23f; stroke: none; }
.art-tank-gun { fill: none; stroke: #3a4a68; stroke-width: 10; stroke-linecap: round; }
.art-tank-horn { fill: none; stroke: #f5c451; stroke-width: 5; stroke-linecap: round; }

/* Cannon Bay's picture. */
.game-art-bay { background: linear-gradient(#58b7ff, #d9f2ff 62%); }
.art-bay-cloud { fill: #fff; opacity: 0.9; }
.art-bay-island { fill: #63bd58; }
.art-bay-peak { fill: #7e7268; }
.art-bay-sea { fill: #2a9fd6; }
.art-bay-zone { fill: #3dff86; opacity: 0.42; }
.art-bay-zone-edge { fill: none; stroke: #3dff86; stroke-width: 3; stroke-linejoin: round; }
.art-bay-hull { fill: #b8763a; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.art-bay-band { fill: #6a4bd8; }
.art-bay-mast { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.art-bay-sail { fill: #fff0c9; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-bay-spot { fill: #c9823f; }
.art-bay-flag { fill: #6a4bd8; }
.art-bay-neck { fill: none; stroke: #4a2c10; stroke-width: 11; stroke-linecap: round; }
.art-bay-neck-in { fill: none; stroke: #f5c451; stroke-width: 7; stroke-linecap: round; }
.art-bay-head { fill: #f5c451; stroke: #4a2c10; stroke-width: 2.5; }
.art-bay-hat { fill: #27305e; stroke: #14141c; stroke-width: 1.5; }
.art-bay-eye { fill: #1c1630; }
.art-bay-pirate { fill: #e8452f; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.art-bay-pirate-trim { fill: #ffb703; }
.art-bay-pirate-sail { fill: #ffe2c2; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.art-bay-pirate-stripe { fill: #ff7a4a; }
.art-bay-black { fill: #1c1f2b; }
.art-bay-arc { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; }
.art-bay-ball { fill: #23252e; }
.art-bay-smoke { fill: #fff; opacity: 0.9; }
.art-bay-splash { fill: #fff; }

/* The film of a game being played, over its card while the pointer rests there. */
.game-demo {
  display: none;
  position: fixed;
  z-index: 10;
  width: min(60vw, 560px);
  overflow: hidden;
  background: var(--surface);
  border: 5px solid var(--sun);
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(18, 48, 77, 0.35);
  pointer-events: none;
}

.game-demo.is-showing { display: block; }

#game-demo-film {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #dbeefc;
}

.game-demo-moves {
  margin: 0;
  padding: 10px 16px 12px;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
