:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #fff;
  --text: #242b3b;
  --muted: #747e91;
  --line: #e0e4ee;
  --accent: #4f46e5;
  --soft: #eeefff;
  --play-bg: #4f46e5;
  --card-shadow: 0 16px 36px #18213512, 0 3px 10px #18213508;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14151b;
  --surface: #1d1f28;
  --text: #eeedf4;
  --muted: #acaab9;
  --line: #353642;
  --accent: #a5b4fc;
  --soft: #252d45;
  --play-bg: #6366f1;
  --card-shadow: 0 16px 36px #00000040, 0 3px 10px #00000020;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
svg { display: block; }
.skip-link { position: fixed; z-index: 2; top: 12px; left: 16px; transform: translateY(-160%); padding: 12px 18px; background: var(--surface); border-radius: 8px; }
.skip-link:focus { transform: none; }
.site-header, main { max-width: 1120px; margin: auto; padding-left: 36px; padding-right: 36px; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-top: 27px; padding-bottom: 27px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: -.5px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; background: var(--soft); border-radius: 9px; }
.brand-mark svg { width: 18px; height: 18px; fill: var(--accent); }
.theme-button { display: grid; place-items: center; width: 40px; height: 40px; background: transparent; border: 1px solid var(--line); border-radius: 50%; }
.theme-button:hover { background: var(--soft); }
.theme-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sun { display: none; }
:root[data-theme="dark"] .sun { display: block; }
:root[data-theme="dark"] .moon { display: none; }
main { padding-top: 68px; padding-bottom: 70px; }
.intro { margin-bottom: 36px; }
h1 { margin: 0; color: var(--accent); font-size: clamp(36px, 5vw, 50px); line-height: 1.15; letter-spacing: -1.8px; font-weight: 650; }
.intro p { margin: 13px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.game-card { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); transition: transform .22s ease, box-shadow .22s ease; }
.game-link { display: flex; flex-direction: column; align-items: flex-start; height: 100%; padding: 28px; border-radius: inherit; }
.game-link:focus-visible { outline-offset: -4px; }
.game-icon { width: 60px; height: 60px; border-radius: 17px; object-fit: contain; margin-bottom: 26px; transition: transform .22s ease; }
.game-card h2 { margin: 0; color: var(--accent); font-size: 24px; font-weight: 650; line-height: 1.3; letter-spacing: -.7px; }
.game-description { flex: 1; margin: 13px 0 26px; font-size: 13px; color: var(--muted); line-height: 1.85; }
.play-label { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; padding: 10px 14px; background: var(--soft); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--accent); transition: background .18s ease, color .18s ease; }
.play-label > span { display: block; font-size: 17px; line-height: 1; transition: transform .22s ease; }
@media (hover: hover) and (pointer: fine) {
  .game-card:hover { transform: translateY(-5px); box-shadow: var(--card-shadow); }
  .game-card:hover .game-icon { transform: translateY(-2px); }
  .game-card:hover .play-label { background: var(--play-bg); color: #fff; }
  .game-card:hover .play-label > span { transform: translateX(3px); }
}
.game-card:focus-within { box-shadow: var(--card-shadow); }
.game-card:focus-within .play-label { background: var(--play-bg); color: #fff; }
@media (max-width: 800px) {
  .site-header, main { padding-left: 24px; padding-right: 24px; }
  main { padding-top: 40px; }
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-link { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 18px; align-items: center; padding: 24px; }
  .game-icon { grid-column: 1; grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 16px; margin: 0; }
  .game-card h2 { grid-column: 2; grid-row: 1; font-size: 22px; }
  .game-description { grid-column: 2; grid-row: 2; margin: 8px 0 0; }
  .play-label { grid-column: 3; grid-row: 1 / 3; gap: 14px; margin-left: 6px; }
}
@media (max-width: 500px) {
  .site-header, main { padding-left: 20px; padding-right: 20px; }
  .site-header { padding-top: 18px; padding-bottom: 18px; }
  main { padding-top: 30px; padding-bottom: 36px; }
  .intro { margin-bottom: 26px; }
  .intro p { font-size: 13px; margin-top: 10px; }
  .game-link { grid-template-columns: 48px minmax(0, 1fr); column-gap: 15px; padding: 22px; }
  .game-icon { width: 48px; height: 48px; border-radius: 14px; grid-row: 1; }
  .game-card h2 { align-self: center; font-size: 23px; }
  .game-description { grid-column: 1 / -1; grid-row: 2; margin: 17px 0 20px; }
  .play-label { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin: 0; gap: 24px; min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-card, .game-icon, .play-label, .play-label > span { transition: none; }
  .game-card:hover, .game-card:hover .game-icon, .game-card:hover .play-label > span { transform: none; }
}
