:root {
  color-scheme: light dark;
  --bg: #0f172a;
  --surface: rgba(15, 23, 42, 0.6);
  --surface-elevated: rgba(15, 23, 42, 0.75);
  --surface-light: #f8fafc;
  --surface-muted: rgba(248, 250, 252, 0.8);
  --text: #e2e8f0;
  --text-muted: rgba(226, 232, 240, 0.72);
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.16);
  --success: #22c55e;
  --radius: 16px;
  --shadow: 0 24px 40px rgba(15, 23, 42, 0.3);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 55%),
              radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.12), transparent 45%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  color: var(--accent-strong);
}

.wrap {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.brand span:nth-child(odd) {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--accent-soft);
  text-decoration: none;
}

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1.1;
}

.hero p {
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0.75rem auto 2rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0f172a;
  box-shadow: 0 20px 35px rgba(14, 165, 233, 0.35);
}

.btn.secondary {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header p {
  color: var(--text-muted);
}

.games {
  padding: 4rem 0;
}

.games-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.search-field {
  position: relative;
  flex: 1 1 260px;
}

.search-field input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-field input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.filters {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.65);
  padding: 0.4rem;
  border-radius: 999px;
}

.filter-btn {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover,
.filter-btn:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.card-media {
  position: relative;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.card-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge[data-tone="positive"] {
  background: rgba(56, 189, 248, 0.22);
  color: var(--accent);
}

.badge[data-tone="neutral"] {
  background: rgba(148, 163, 184, 0.3);
  color: var(--text);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1.25rem;
  padding: 1.25rem;
}

.card-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

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

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tags li {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
}

.card-meta .play-btn {
  justify-content: center;
}

.card-meta .play-btn.disabled {
  pointer-events: none;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.6);
  box-shadow: none;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-grid article {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
}

.feature-grid h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.submit {
  padding: 4rem 0;
}

.submit-form {
  display: grid;
  gap: 1.25rem;
  max-width: 540px;
  margin: 0 auto;
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  color: var(--text);
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--surface-elevated);
  color: var(--text);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

.form-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.faq {
  padding: 4rem 0 6rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.faq-list details {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: var(--shadow);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "+";
  margin-right: 0.75rem;
  font-weight: 700;
}

.faq-list details[open] summary::before {
  content: "–";
}

.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: inline-flex;
  gap: 1rem;
}

.notice {
  color: var(--text-muted);
  text-align: center;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }

  .games-toolbar {
    justify-content: center;
  }

  .filters {
    width: 100%;
    justify-content: center;
  }
}
