:root {
  --ink: #1b1d3a; --bg: #eef1ff; --panel: #fff; --pink: #ff3d6e; --yellow: #ffd23f; --blue: #3dc1ff;
  --muted: #5d6190; --line: #d6dbf5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Trebuchet MS", Verdana, system-ui, sans-serif; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Masthead: chunky, glossy, a little bit 2005 */
.masthead { background: linear-gradient(180deg, #2b2f74 0%, #1b1d3a 100%); color: #fff;
  border-bottom: 6px solid var(--yellow); padding: 18px 0 22px; position: relative; overflow: hidden; }
.masthead::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 120%, rgba(255,61,110,.45), transparent 45%),
              radial-gradient(circle at 90% -20%, rgba(61,193,255,.4), transparent 45%); }
.masthead > * { position: relative; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none;
  font-size: clamp(32px, 7vw, 52px); font-weight: 900; letter-spacing: -1px;
  text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.logo em { font-style: normal; color: var(--yellow); font-size: .5em; letter-spacing: 0; align-self: flex-end; margin-bottom: .55em; margin-left: -8px; }
.logo-pad { width: 1.1em; height: .72em; border-radius: .36em; background: var(--pink); position: relative;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.2), 0 4px 0 rgba(0,0,0,.35); }
.logo-pad::before { content: ""; position: absolute; left: 18%; top: 30%; width: 26%; height: 40%; border-radius: 50%; background: #fff; }
.logo-pad::after { content: ""; position: absolute; right: 16%; top: 28%; width: 14%; height: 22%; border-radius: 50%; background: var(--yellow);
  box-shadow: -.12em .14em 0 var(--yellow); }
.tagline { margin: 8px 0 0; font-size: clamp(16px, 2.6vw, 20px); opacity: .9; }
.lang-toggle { background: rgba(255,255,255,.14); color: #fff; border: 2px solid rgba(255,255,255,.3);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; font-weight: bold; cursor: pointer; }
.lang-toggle:hover { background: rgba(255,255,255,.25); }

/* Join + how-to */
.joinbox { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 24px; align-items: center;
  background: var(--panel); border: 3px solid var(--line); border-radius: 20px; padding: 20px; margin: 24px 0 8px;
  box-shadow: 0 6px 0 var(--line); }
.join-form label { display: block; font-weight: 900; font-size: 18px; margin-bottom: 8px; }
.join-row { display: flex; gap: 8px; }
.join-row input { flex: 1; min-width: 0; font: inherit; font-size: 28px; font-weight: 900; letter-spacing: 8px; text-align: center;
  text-transform: uppercase; padding: 10px; border-radius: 12px; border: 3px solid var(--line); color: var(--ink); }
.join-row input:focus { outline: none; border-color: var(--blue); }
.join-row button { font: inherit; font-weight: 900; font-size: 18px; padding: 0 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 #c79a00; }
.join-row button:active { transform: translateY(3px); box-shadow: 0 2px 0 #c79a00; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--muted); }
.how b { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pink); color: #fff; font-size: 18px; box-shadow: 0 3px 0 #b8204a; }
.how li:nth-child(2) b { background: var(--blue); box-shadow: 0 3px 0 #1a86b8; }
.how li:nth-child(3) b { background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 #c79a00; }

/* Game shelf */
.shelf { font-size: 24px; font-weight: 900; margin: 28px 0 12px; display: flex; align-items: center; gap: 12px; }
.shelf::after { content: ""; flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 3px solid var(--line); border-radius: 18px;
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 6px 0 var(--line); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 0 var(--line); border-color: var(--blue); }
.thumb { position: relative; aspect-ratio: 16 / 10; background: #1b1d3a; }
.thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.badge { position: absolute; top: 10px; left: -4px; background: var(--pink); color: #fff; font-weight: 900; font-size: 13px;
  padding: 3px 12px 3px 14px; border-radius: 0 6px 6px 0; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 4px; font-size: 21px; }
.card p { margin: 0 0 12px; font-size: 14px; color: var(--muted); line-height: 1.4; flex: 1; }
.meta { display: flex; justify-content: space-between; align-items: center; }
.chip { font-size: 13px; background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.play { font-weight: 900; color: var(--pink); }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 40px 16px 32px; }

@media (max-width: 720px) {
  .joinbox { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12142b; --panel: #1d2046; --ink: #f1f2ff; --muted: #a6aad6; --line: #2c3066; }
  .join-row input { background: #fff; color: #1b1d3a; }
}
