/* AnonArcade — shared design system */

:root {
  --color-bg: #fef9f0;
  --color-surface: #ffffff;
  --color-primary: #2ea3f2;
  --color-primary-dark: #1976d2;
  --color-accent: #ffb100;
  --color-accent-dark: #f57c00;
  --color-success: #34a853;
  --color-text: #26313a;
  --color-text-soft: #5c6b73;
  --color-border: #e6ecef;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 6px 18px rgba(23, 43, 77, 0.10);
  --shadow-card-hover: 0 10px 26px rgba(23, 43, 77, 0.16);
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: #1a1a1a;
  border-bottom: 1px solid #000;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.4rem;
}
.site-logo:hover { text-decoration: none; }
.site-logo__text {
  position: relative;
  display: inline-block;
  color: #ffffff;
  letter-spacing: 0.01em;
}
.site-logo__text::before,
.site-logo__text::after {
  content: "AnonArcade";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.site-logo__text::before {
  color: #4fd8e0;
  transform: translate(-4px, -3px);
}
.site-logo__text::after {
  color: #ee6fa8;
  transform: translate(4px, 3px);
}
.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.site-nav a {
  color: #e6e6e6;
  font-weight: 600;
  padding: 8px 4px;
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  background: #eef5f9;
  border-top: 1px solid var(--color-border);
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 20px 40px;
  text-align: center;
  color: var(--color-text-soft);
}
.site-footer__brand { font-weight: 700; color: var(--color-text); margin-bottom: 10px; }
.site-footer__links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.site-footer__note { font-size: 0.92rem; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 54px 0 34px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
}
.hero p {
  color: var(--color-text-soft);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 26px;
}

/* ---------- Search + filters ---------- */
.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-bottom: 34px;
}
.search-box {
  width: 100%;
  max-width: 460px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6b73' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 16px center;
  background-size: 18px;
}
.search-box input:focus { outline: none; border-color: var(--color-primary); }

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.chip {
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.chip:hover { border-color: var(--color-primary); }
.chip[aria-pressed="true"] {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}

/* ---------- Game grid + cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin: 20px 0 56px;
}
.game-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.game-card:hover, a.game-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
}
.game-card__thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
}
.game-card__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.game-card__title { font-size: 1.12rem; font-weight: 800; margin: 0 0 6px; }
.game-card__tagline { font-size: 0.92rem; color: var(--color-text-soft); margin: 0 0 14px; flex: 1; }
.game-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: #eef5f9;
  color: var(--color-primary-dark);
  padding: 4px 9px;
  border-radius: 999px;
}
.game-card--soon { opacity: 0.72; cursor: default; }
.game-card--soon .game-card__thumb::after { content: ""; }
.badge-soon {
  position: absolute;
  margin: 10px;
  background: var(--color-accent-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.game-card__thumb-wrap { position: relative; }

.empty-state {
  text-align: center;
  color: var(--color-text-soft);
  padding: 40px 20px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-weight: 800;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-primary-dark); color: #fff; }
.btn-primary:hover { background: #145a9c; }
.btn-accent { background: var(--color-accent); color: #3a2600; }
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border: 2px solid var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); }

/* ---------- Generic content page ---------- */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 20px 70px;
}
.page-content h1 { font-size: 2rem; margin-bottom: 0.4em; }
.page-content h2 { font-size: 1.35rem; margin-top: 1.6em; }
.page-content ul { padding-left: 1.2em; }
.page-content li { margin-bottom: 0.5em; }

@media (max-width: 640px) {
  .site-header__inner { justify-content: center; text-align: center; }
  .hero { padding: 36px 0 24px; }
}
