/* UnSpoken Games — main page.
   Theme inspired by the UnSpoken landing page: deep dark teal + mint accent.
   Headings use "Chakra Petch" (gaming vibe), body stays system for speed. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #071216; --bg2: #0b2023; --card: #0c2227; --card2: #11333a;
  --text: #eefcf8; --muted: #9db8b5; --accent: #96f7e4; --accent2: #3ec6ae;
  --on-accent: #03211b; --teal: #2b5565; --radius: 20px;
  --font-game: "Chakra Petch", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1000px 520px at 85% -10%, rgba(62,198,174,.22) 0%, transparent 60%),
              radial-gradient(800px 500px at -10% 30%, rgba(43,85,101,.35) 0%, transparent 55%),
              linear-gradient(180deg, var(--bg2), var(--bg) 380px);
  color: var(--text); min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  max-width: 1080px; margin: 0 auto; width: 100%;
}
main { flex: 1 0 auto; width: 100%; }
header, .app-promo, footer { flex: none; width: 100%; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 30px 4px 22px; }
.hero-logo { width: 84px; height: 84px; border-radius: 22px; display: block; margin: 0 auto 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(150,247,228,.25), 0 0 44px rgba(62,198,174,.25); }
.hero-badge {
  display: inline-block; letter-spacing: .28em; font-size: 11px; font-weight: 700;
  font-family: var(--font-game); text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(150,247,228,.4); border-radius: 999px;
  padding: 6px 12px 6px 15px; margin-bottom: 14px;
}
.hero h1 { font-family: var(--font-game); font-size: clamp(34px, 9vw, 54px); line-height: 1.05; font-weight: 700; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 12px auto 20px; max-width: 46ch; font-size: 15px; }
.search {
  display: flex; align-items: center; gap: 8px; max-width: 420px; margin: 0 auto;
  background: rgba(150,247,228,.06); border: 1px solid rgba(150,247,228,.16);
  border-radius: 999px; padding: 11px 16px; color: var(--muted);
}
.search:focus-within { border-color: rgba(150,247,228,.55); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--muted); }

/* ---------- category filter ---------- */
.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip {
  font-family: var(--font-game); font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
  color: var(--muted); background: rgba(150,247,228,.06);
  border: 1px solid rgba(150,247,228,.22); border-radius: 999px;
  padding: 8px 15px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: filter .15s ease, transform .15s ease, color .15s ease, background .15s ease;
}
.chip:active { transform: scale(.95); }
.chip.active { color: var(--on-accent); background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-color: transparent; box-shadow: 0 6px 16px rgba(62,198,174,.35); }

/* ---------- game cards: horizontal, short (not tall) ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
@media (min-width: 680px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card {
  display: flex; flex-direction: column; gap: 13px; padding: 14px; text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, var(--card2), var(--card) 65%);
  border: 1px solid rgba(150,247,228,.14); border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 26px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  animation: rise .5s ease both;
}
.card:nth-child(2) { animation-delay: .06s; } .card:nth-child(3) { animation-delay: .12s; }
.card:nth-child(4) { animation-delay: .18s; } .card:nth-child(5) { animation-delay: .24s; }
.card:nth-child(6) { animation-delay: .3s; }
.card:active { transform: scale(.98); }
@media (hover:hover) {
  .card:hover { transform: translateY(-3px); border-color: rgba(150,247,228,.5);
    box-shadow: 0 18px 36px rgba(0,0,0,.5), 0 6px 24px rgba(62,198,174,.22), inset 0 1px 0 rgba(255,255,255,.1); }
}
.card-top { display: flex; gap: 13px; align-items: stretch; min-width: 0; }
.card-media { position: relative; flex: none; width: 92px; height: 92px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.12); }
.card-media .icon { width: 100%; height: 100%; display: block; }
.badge { position: absolute; top: 6px; left: 6px;
  font-family: var(--font-game); font-size: 9px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--on-accent);
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  padding: 3.5px 7px; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; padding: 2px 0; }
.card-title { font-family: var(--font-game); font-weight: 700; font-size: 18.5px; letter-spacing: .01em; }
.card-desc { color: var(--muted); font-size: 12.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Card text stays copyable: the card itself is not a link, only the Play button is. */
.card-title, .card-desc, .tag { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.card-media { display: block; text-decoration: none; }
.card-meta { margin-top: auto; padding-top: 4px; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: rgba(150,247,228,.12); padding: 4px 8px; border-radius: 999px; }
.play-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font-family: var(--font-game); font-size: 15.5px; font-weight: 700; letter-spacing: .05em;
  color: var(--on-accent); background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 13px; padding: 11.5px 14px;
  box-shadow: 0 10px 20px rgba(62,198,174,.32), inset 0 1px 0 rgba(255,255,255,.55);
  transition: filter .15s ease, transform .15s ease;
}
.card:active .play-btn { transform: scale(.98); filter: brightness(1.07); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- app promo ---------- */
.app-promo {
  margin-top: 28px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap;
  background: linear-gradient(120deg, #17424e, var(--teal) 130%);
  border: 1px solid rgba(150,247,228,.22); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 16px 34px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.14);
}
.app-logo { width: 64px; height: 64px; border-radius: 16px; flex: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.35); }
.app-text { flex: 1; min-width: 180px; }
.app-text h2 { font-family: var(--font-game); font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.app-text p { color: #cfe0e6; font-size: 13px; line-height: 1.5; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff;
  background: #0d1417; border: 1px solid rgba(255,255,255,.25); border-radius: 14px;
  padding: 9px 16px 9px 13px; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 10px 20px rgba(0,0,0,.35); transition: transform .15s ease;
}
.store-btn:active { transform: scale(.96); }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; }
.store-btn small { font-size: 9.5px; letter-spacing: .14em; opacity: .8; }
.store-btn b { font-size: 17px; font-weight: 700; }
@media (max-width: 480px) { .store-btn { width: 100%; justify-content: center; } }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 0 6px; }
