/* Shared look and feel for the arcade store and its game pages. */
:root {
  --bg: #0b1020;
  --bg-soft: #141b33;
  --card: #1a2242;
  --line: #2a3560;
  --text: #eef2ff;
  --muted: #9aa6d0;
  --accent: #4fd1ff;
  --accent-2: #ff5da2;
  --gold: #ffd166;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 15% -10%, #1b2a5e 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 0%, #3b1148 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 20px 64px; }

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(79, 209, 255, .28);
}
.nav { display: flex; gap: 18px; color: var(--muted); font-size: 15px; }

/* Hero */
.hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(79,209,255,.12), rgba(255,93,162,.10)), var(--bg-soft);
  padding: 36px 32px;
  margin-bottom: 36px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 42px); }
.hero p { margin: 0; color: var(--muted); max-width: 62ch; }

/* Game grid */
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.section-title h2 { margin: 0; font-size: 20px; }
.section-title span { color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 40px rgba(0,0,0,.45); }

.thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 68px; }
.thumb.fishing { background: linear-gradient(180deg, #0a5f8c, #062f4d); }
.thumb.granny  { background: linear-gradient(180deg, #4a3b6b, #1d2340); }
.badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,.45); border: 1px solid var(--line);
  font-size: 12px; color: var(--gold);
}

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; font-size: 18px; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }

.btn {
  display: inline-block; text-align: center;
  padding: 10px 18px; border-radius: 10px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: #06122b;
  background: linear-gradient(140deg, var(--accent), #7ee0ff);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Game page shell */
.game-shell { max-width: 960px; margin: 0 auto; padding: 20px; }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.game-head h1 { margin: 0; font-size: 22px; }
.hud {
  display: flex; gap: 18px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); padding: 10px 16px; margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.hud b { color: var(--gold); }
canvas {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: 12px;
  background: #04121f; touch-action: none;
}
.help { color: var(--muted); font-size: 14px; margin-top: 14px; }
.controls { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* Play area: canvas with the item panel beside it. */
.play-area { display: flex; gap: 16px; align-items: flex-start; }
.play-area canvas { flex: 1; min-width: 0; }

.item-bar {
  width: 170px; flex: none;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); padding: 14px;
}
.item-bar h2 { margin: 0 0 10px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.item {
  width: 100%; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px;
  padding: 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; text-align: left;
}
.item:hover:not(:disabled) { border-color: var(--accent); }
.item:disabled { opacity: .45; cursor: not-allowed; }
.item.armed { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 209, 102, .25) inset; }
.item-icon { font-size: 24px; }
.item-name { font-weight: 600; font-size: 14px; }
.item-count { color: var(--gold); font-variant-numeric: tabular-nums; font-size: 13px; }
.item-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); min-height: 2.4em; }

@media (max-width: 720px) {
  .play-area { flex-direction: column; }
  .item-bar { width: 100%; }
  .item { grid-template-columns: 32px 1fr auto; }
}
