/* Category pages (rendered by the account service, packages/accounts/src/seo.ts): the start page's look,
   copied from src/styles.css because those pages do not load the app's hashed stylesheet. */

:root {
  --bg: #0e111b;
  --surface: #171c2b;
  --surface-hover: #1e2437;
  --border: #262d42;
  --text: #eef1f7;
  --text-muted: #9aa3b8;
  --accent: #35d0ba;
  --accent-2: #ff5d73;
  --radius: 14px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px
    max(16px, env(safe-area-inset-left));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 24px 0 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.logo span {
  color: var(--accent);
}

.logo-mark {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.3em;
}

.tagline {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

main {
  flex: 1;
}

.game-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.tile:focus-visible {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0d15;
}

.tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #06201c;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.tile:hover .tile-play,
.tile:focus-visible .tile-play {
  opacity: 1;
  transform: none;
}

.tile-body {
  padding: 16px 18px 20px;
}

.tile-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.tile-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer {
  padding-top: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--accent);
}

@media (hover: none) {
  .tile-play {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .game-grid .tile-body {
    padding: 10px 12px 12px;
  }

  .game-grid .tile-title {
    margin: 0 0 2px;
    font-size: 1rem;
  }

  .game-grid .tile-description {
    font-size: 0.85rem;
  }

  .game-grid .tile-play {
    display: none;
  }
}

a.logo {
  color: inherit;
  text-decoration: none;
}

.lang-link {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-link:hover,
.lang-link:focus-visible {
  border-color: var(--accent);
}

.crumbs {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.crumbs a,
.more a {
  color: var(--accent);
}

main h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

.intro {
  max-width: 48rem;
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.more {
  margin-top: 40px;
  color: var(--text-muted);
}

.more h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.1rem;
}
