/* Shared Yarkade page styles: header, footer, buttons, game cards. Used by home, /games, story and about. */
:root { --bg: #0D0B24; --bg2: #151033; --panel: #17143A; --panel2: #221D4D; --line: #322B66; --text: #F4F2FF; --soft: #D2CCF5; --muted: #ADA6DA; --violet: #8B5CFF; --pink: #FF5FA2; --gold: #FFE45C; --cyan: #2EE6D6; --sky: #22D3EE; --orange: #FF8A3D; --green: #57D07A; --ink: #1A1238; }
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font-family: Rubik, system-ui, sans-serif; }
body { background: radial-gradient(1000px 520px at 8% -12%, rgba(139,92,255,.30), transparent 60%), radial-gradient(800px 480px at 105% 4%, rgba(46,230,214,.12), transparent 60%), var(--bg); min-height: 100vh; }
a { color: var(--gold); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.yk-ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -4px; }

/* Header: logo + compact nav. On phones the nav becomes one tidy scrolling row. */
.site-head { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.site-head .logo { display: inline-flex; align-items: center; gap: 8px; font-family: Bungee, sans-serif; font-size: 25px; text-decoration: none; flex: none; }
.site-head .logo img { width: 34px; height: 34px; flex: none; }
.site-head .logo span { background: linear-gradient(90deg, var(--gold), var(--pink), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; gap: 2px; margin-left: auto; background: rgba(23,20,58,.85); border: 1px solid var(--line); border-radius: 14px; padding: 4px; min-width: 0; }
.site-nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; padding: 7px 11px; border-radius: 10px; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--panel2); color: var(--gold); }
@media (max-width: 760px) {
  .site-head { flex-wrap: wrap; gap: 8px; padding: 10px 0 6px; }
  .site-head .logo { font-size: 22px; }
  .site-head .logo img { width: 30px; height: 30px; }
  .site-nav { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: space-between; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex-direction: column; gap: 2px; font-size: 11.5px; padding: 6px 8px; flex: 1 0 auto; }
  .site-nav a .yk-ic { width: 22px; height: 22px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 9px 18px; border-radius: 14px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 2px solid var(--line); background: var(--panel2); color: var(--text); }
.btn:hover { border-color: var(--violet); }
.btn.primary { background: linear-gradient(135deg, var(--orange), var(--pink)); border-color: transparent; color: #fff; font-family: Bungee, sans-serif; font-weight: 400; box-shadow: 0 8px 22px rgba(255,95,162,.28); }
.btn.cool { background: linear-gradient(135deg, var(--violet), #4F7BFF); border-color: transparent; color: #fff; font-family: Bungee, sans-serif; font-weight: 400; }
.btn.small { min-height: 36px; padding: 5px 12px; font-size: 14px; border-radius: 11px; }
.btn .yk-ic { width: 22px; height: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(13,11,36,.55); border: 2px solid var(--line); color: var(--soft); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 38px; }
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* Section heads */
.sec-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.sec-head h2 { display: inline-flex; align-items: center; gap: 10px; font-family: Bungee, sans-serif; font-weight: 400; font-size: clamp(20px, 2.4vw, 26px); margin: 0; }
.sec-head h2 .yk-ic { width: 32px; height: 32px; }
.sec-head .more { margin-left: auto; font-weight: 700; text-decoration: none; }
.sec-head p { margin: 0; color: var(--muted); font-size: 14px; flex-basis: 100%; }

/* Game cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 280px); gap: 14px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.row-scroll > * { scroll-snap-align: start; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform .12s, border-color .12s; min-width: 0; }
.gcard:hover { transform: translateY(-2px); border-color: var(--violet); }
.gcard .art { position: relative; height: 112px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.gcard .art img { width: 84px; height: 84px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); }
.gcard .art .em { font-size: 58px; }
.gcard .cat { position: absolute; top: 8px; left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: rgba(13,11,36,.6); color: #fff; text-transform: uppercase; }
.gcard .new { position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); }
.gcard .body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.gcard h3 { margin: 0; font-family: Bungee, sans-serif; font-weight: 400; font-size: 17px; line-height: 1.15; }
.gcard h3 a { color: var(--text); text-decoration: none; }
.gcard .idea { margin: 0; color: var(--soft); font-size: 13px; line-height: 1.4; }
.gcard .idea b { color: var(--gold); font-weight: 700; }
.gcard .by { font-size: 12px; color: var(--muted); }
.gcard .by b { color: var(--soft); }
.gcard .nums { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.gcard .like, .gcard .num { display: inline-flex; align-items: center; gap: 5px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 4px 10px 4px 7px; font: inherit; font-size: 13.5px; font-weight: 700; }
.gcard .like { cursor: pointer; }
.gcard .like[aria-pressed="true"] { border-color: var(--pink); color: var(--pink); }
.gcard .num.link { text-decoration: none; color: var(--cyan); }
.gcard .plays { font-size: 12px; color: var(--muted); }
.gcard .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.gcard .acts .btn { flex: 1 1 auto; white-space: nowrap; padding: 5px 10px; }
.gcard .acts .btn.primary { flex: 0 0 auto; }
.gcard .story { font-size: 12.5px; font-weight: 700; color: var(--cyan); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.gcard .story .yk-ic { width: 18px; height: 18px; }
.gcard.off { opacity: .5; }

.empty-note { background: rgba(13,11,36,.45); border: 1px dashed var(--line); border-radius: 16px; padding: 14px 16px; color: var(--soft); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.empty-note img { width: 56px; height: 56px; }

.site-foot { padding: 20px 0 100px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); margin-top: 28px; }
.site-foot a { color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .gcard { transition: none; } .gcard:hover { transform: none; } }
@media (max-width: 520px) { .row-scroll { grid-auto-columns: 80%; } }
