/* Neon / arcade pixel theme — deliberately different from Woodcutter's
   earth-tone aesthetic so the hub feels like its own surface. */

:root {
  --bg:            #0f0a1f;
  --bg-grid:       #1a1233;
  --accent:        #ff2a6d;      /* hot pink */
  --accent-alt:    #05d9e8;      /* cyan    */
  --text:          #f5f0ff;
  --text-dim:      rgba(245, 240, 255, 0.55);
  --shadow:        #05010f;
  --tile-bg:       #2a1656;
  --tile-bg-alt:   #3a1d70;
  --locked-bg:     #1a1233;
}

@font-face {
  font-family: "PressStart2P";
  src: url("https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8T-267oIAQAu6jDQyK0nSgPJE4580.woff2") format("woff2");
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "PressStart2P", monospace;
  /* subtle scanline/grid texture */
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-tap-highlight-color: transparent;
  /* Block the mobile double-tap-to-zoom gesture globally. Children can opt
     into stricter rules (e.g. `touch-action: none` on the game canvas). */
  touch-action: manipulation;
}

.hub {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hub__header {
  text-align: center;
  margin-bottom: 28px;
}

.hub__title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--accent);
  text-shadow:
    3px 3px 0 var(--shadow),
    0 0 12px rgba(255, 42, 109, 0.6);
  animation: title-pulse 2.4s ease-in-out infinite;
}

.hub__subtitle {
  margin: 10px 0 0;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

@keyframes title-pulse {
  0%, 100% { text-shadow: 3px 3px 0 var(--shadow), 0 0 12px rgba(255, 42, 109, 0.6); }
  50%      { text-shadow: 3px 3px 0 var(--shadow), 0 0 20px rgba(255, 42, 109, 0.95); }
}

/* ---------- grid (strict 2 columns) ---------- */

.hub__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- tile ---------- */

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  aspect-ratio: 1 / 1;
  padding: 16px 10px 14px;
  background: linear-gradient(160deg, var(--tile-bg) 0%, var(--tile-bg-alt) 100%);
  border: 3px solid var(--accent-alt);
  box-shadow:
    0 0 0 3px var(--shadow),
    6px 6px 0 var(--shadow);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, border-color 0.15s;
  animation: tile-in 0.4s ease-out both;
}

.tile:nth-child(2) { animation-delay: 0.08s; }
.tile:nth-child(3) { animation-delay: 0.16s; }
.tile:nth-child(4) { animation-delay: 0.24s; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tile:hover:not(.tile--locked) {
  border-color: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow:
    0 0 0 3px var(--shadow),
    10px 10px 0 var(--shadow),
    0 0 18px rgba(255, 42, 109, 0.45);
}

.tile:active:not(.tile--locked) {
  transform: translate(4px, 4px);
  box-shadow:
    0 0 0 3px var(--shadow),
    2px 2px 0 var(--shadow);
}

.tile__icon {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile__icon img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 72%;
  height: auto;
  max-height: 120px;
  filter: drop-shadow(3px 3px 0 var(--shadow));
}

.tile__title {
  font-size: 10px;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.4;
  color: var(--text);
}

/* ---------- locked ("coming soon") tile ---------- */

.tile--locked {
  cursor: not-allowed;
  background: var(--locked-bg);
  border-color: var(--text-dim);
  box-shadow:
    0 0 0 3px var(--shadow),
    6px 6px 0 var(--shadow);
  opacity: 0.75;
}
.tile--locked .tile__icon img,
.tile--locked .tile__title {
  opacity: 0.6;
  filter: grayscale(0.9) drop-shadow(3px 3px 0 var(--shadow));
}
.tile__badge {
  position: absolute;
  top: -10px;
  right: -6px;
  background: var(--accent);
  color: var(--shadow);
  font-size: 8px;
  letter-spacing: 2px;
  padding: 6px 8px;
  border: 2px solid var(--shadow);
  transform: rotate(8deg);
}

/* ---------- responsive (iPhone Pro Max and narrower) ---------- */

@media (max-width: 430px) {
  .hub { padding: 24px 14px 36px; }
  .hub__title { font-size: 18px; letter-spacing: 3px; }
  .hub__grid { gap: 12px; }
  .tile { padding: 12px 8px 10px; }
  .tile__title { font-size: 9px; letter-spacing: 1.5px; }
}

@media (max-width: 360px) {
  .hub__title { font-size: 16px; }
  .tile__icon img { width: 80%; }
}
