/* Puzzle Hub — shared stylesheet. Vanilla CSS, no frameworks. */
:root {
  --bg: #0f1420;
  --card: #1a2236;
  --card2: #222e4a;
  --text: #eef1f8;
  --muted: #9aa7c4;
  --accent: #ffb020;
  --accent2: #3ddc97;
  --danger: #ff5d5d;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.55;
}
a { color: #7ec3ff; }
header.site {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; padding: 16px 20px;
  background: #121a2e; border-bottom: 1px solid #2a3654;
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.logo span { color: var(--accent); }
nav.main a {
  color: var(--text); text-decoration: none; margin: 0 8px; font-weight: 600;
}
nav.main a:hover, nav.main a.active { color: var(--accent); }
main { max-width: 960px; margin: 0 auto; padding: 20px; }
.hero { text-align: center; padding: 28px 10px 10px; }
.hero h1 { font-size: 34px; margin: 0 0 8px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px; margin: 24px 0;
}
.card {
  background: var(--card); border: 1px solid #2a3654; border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.card h2, .card h3 { margin: 0; }
.card p { color: var(--muted); margin: 0; flex: 1; }
.btn {
  display: inline-block; background: var(--accent); color: #1a1200;
  border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center; font-size: 15px;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--card2); color: var(--text); }
.btn.small { padding: 6px 10px; font-size: 13px; }
select, input[type="text"], input[type="email"] {
  background: #0f1420; color: var(--text); border: 1px solid #3a4a72;
  border-radius: 8px; padding: 8px 10px; font-size: 15px;
}
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 16px 0;
}
.stat { color: var(--muted); font-size: 14px; }
.stat b { color: var(--text); }
.board {
  background: var(--card); border: 1px solid #2a3654; border-radius: var(--radius);
  padding: 18px; margin: 16px 0;
}
.msg { min-height: 24px; font-weight: 600; margin: 10px 0; }
.msg.win { color: var(--accent2); }
.msg.lose { color: var(--danger); }
/* AdSense placeholder slots (NO ad code in v1 — structure only). */
.ad-slot {
  border: 1px dashed #4a5c8a; border-radius: 10px; background: #141d33;
  color: var(--muted); text-align: center; padding: 18px 8px; margin: 20px 0;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.ad-slot.tall { min-height: 250px; display: flex; align-items: center; justify-content: center; }
/* Cipher game */
.cipher-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.sym {
  width: 46px; height: 46px; border-radius: 10px; border: 2px solid #3a4a72;
  background: #0f1420; color: var(--text); font-size: 22px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.sym.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sym.known { border-color: var(--accent2); }
.sym.small { width: 38px; height: 38px; font-size: 18px; }
/* Pattern game */
.tile {
  width: 64px; height: 64px; border-radius: 12px; border: 2px solid #3a4a72;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; cursor: pointer; background: #0f1420; margin: 4px;
}
.tile:hover { border-color: var(--accent); }
.tile .n { font-size: 15px; color: var(--muted); }
.c-red { color: #ff7a7a; } .c-blue { color: #7ec3ff; }
.c-green { color: #3ddc97; } .c-yellow { color: #ffd166; }
/* Sudoku-style grid */
.sudoku { display: inline-grid; gap: 2px; background: #3a4a72; border: 2px solid #3a4a72; }
.sudoku input {
  width: 44px; height: 44px; text-align: center; font-size: 20px; font-weight: 700;
  border: 0; background: #0f1420; color: var(--text); padding: 0;
}
.sudoku input.given { color: var(--accent); background: #1a2236; }
.sudoku input.bad { background: #4a1f1f; }
.sudoku input.hint { background: #14352a; }
.sudoku .boxgap { margin: 0; }
@media (max-width: 600px) {
  .sudoku input { width: 34px; height: 34px; font-size: 17px; }
  .hero h1 { font-size: 26px; }
  .tile { width: 56px; height: 56px; }
}
footer.site {
  border-top: 1px solid #2a3654; padding: 18px 20px; color: var(--muted);
  font-size: 14px; text-align: center;
}
footer.site a { color: var(--muted); margin: 0 8px; }
article.prose { max-width: 760px; }
article.prose h2 { margin-top: 28px; }
.langbar { text-align: right; }
