/* Global styles for the gamestore static site. Additional component rules are appended during page implementation. */
:root {
  --color-bg: #0f172a;
  --color-surface: #111827;
  --color-card: #1f2937;
  --color-text: #e5e7eb;
  --color-muted: #94a3b8;
  --color-accent: #38bdf8;
  --color-accent-strong: #0ea5e9;
  --color-border: rgba(148, 163, 184, 0.25);
  --max-content-width: 1400px;
  --card-gap: 1.5rem;
  --transition-base: 180ms ease-in-out;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 73, 117, 0.65) rgba(8, 15, 28, 0.9);
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%), var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

@supports selector(::-webkit-scrollbar) {
  html::-webkit-scrollbar {
    width: 10px;
  }
  html::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(7, 16, 31, 0.95), rgba(12, 26, 46, 0.95));
    border-radius: 999px;
  }
  html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(29, 78, 137, 0.9), rgba(30, 64, 112, 0.9));
    border-radius: 999px;
    border: 2px solid rgba(7, 16, 31, 0.5);
    transition: background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 3px 10px rgba(15, 41, 77, 0.25);
  }
  html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(30, 64, 112, 1), rgba(37, 84, 139, 1));
    box-shadow: 0 5px 14px rgba(15, 41, 77, 0.35);
  }
}


img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

a {
  color: inherit;
}

main {
  width: min(100%, var(--max-content-width));
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #041019;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition-base);
  z-index: 1000;
}

.skip-link:focus-visible,
.skip-link:hover {
  transform: translateY(0);
}

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

.site-topbar {
  position: sticky;
  top: 0;
  height:3rem;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-topbar__inner {
  width: min(100%, var(--max-content-width));
  height:100%;
  margin: 0rem auto;
  padding: 0.35rem 1.25rem;
  display: flex;
  align-items: center;
}

.site-logo {
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-text);
}

.search-bar {
  margin: 0;
  width: min(100%, 520px);
  position: relative;
  flex: 1 1 320px;
}

.search-bar input[type="search"] {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: inherit;
  font-size: 1rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.35);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.25);
}

.search-bar svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--color-muted);
  pointer-events: none;
}

.sort-control {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.sort-control label {
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.sort-control select {
  min-width: 10.5rem;
  padding: 0.5rem 2.2rem 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.6));
  color: inherit;
  font-size: 0.95rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-muted) 50%),
    linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.sort-control select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.sort-control select::-ms-expand {
  display: none;
}

.cards-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--card-gap);
}

.game-card {
  background: linear-gradient(160deg, rgba(148, 163, 184, 0.08), rgba(15, 23, 42, 0.85));
  border-radius: 1.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(10px);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.game-card:focus-within,
.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 25px 45px rgba(14, 165, 233, 0.18);
}

.game-card a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.game-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
}

.game-card__body h2 {
  margin: 0;
  font-size: 1.3rem;
}

.game-card__desc {
  margin: 0.75rem 0 0;
  color: var(--color-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.game-card__desc::after {
  content: attr(data-full-text);
  position: absolute;
  left: 0;
  top: calc(100% + 0.5rem);
  min-width: 220px;
  max-width: min(320px, 80vw);
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.24);
  line-height: 1.6;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.game-card:hover .game-card__desc::after,
.game-card:focus-within .game-card__desc::after {
  opacity: 1;
  transform: translateY(0);
}

.game-card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0.75rem 0 0;
}

.game-card__tag {
  font-size: 0.68rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--color-accent);
  white-space: nowrap;
}

.filters-bar-wrapper {
  width: min(100%, var(--max-content-width));
  margin: 0 auto;
  transition: max-height var(--transition-base);
  overflow: hidden;
}

.filters-bar {
  margin-top: 0rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0 6.5rem 0.35rem 0.25rem;
  width: 100%;
  position: relative;
}

.filters-bar__tags {
  margin: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filters-bar__tags [data-filter-hidden="true"] {
  display: none;
}

.filters-bar button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
  color: inherit;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.filters-bar button[aria-pressed="true"] {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.6);
}

.filters-bar button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.empty-state {
  margin: 4rem auto;
  text-align: center;
  color: var(--color-muted);
}

footer {
  margin-top: 3rem;
  padding: 2rem 0 1.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.footer-links a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

.policy-page {
  width: min(100%, var(--max-content-width));
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  color: var(--color-text);
}

.policy-header {
  margin-bottom: 3rem;
}

.policy-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.policy-header p {
  margin-top: 0.75rem;
  color: var(--color-muted);
}

.policy-page section {
  margin-bottom: 2.5rem;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.32);
}

.policy-page h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.game-content h3,
.policy-page h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.policy-page p,
.policy-page li {
  line-height: 1.7;
  color: var(--color-muted);
}

.policy-page ul {
  padding-left: 1.2rem;
}

.policy-footer {
  text-align: center;
  margin-top: 3rem;
}

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

.policy-footer a:hover,
.policy-footer a:focus-visible {
  text-decoration: underline;
}

.results-status {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-muted);
}
/* Game detail page */
.game-page {
  padding-bottom: 4rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

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

.game-hero {
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.45);
}

.game-subtitle {
  margin: 0.75rem 0 1.5rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.iframe-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 1rem;
  overflow: hidden;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.iframe-container.is-hidden {
  display: none;
}

.fallback-banner {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px dashed rgba(250, 204, 21, 0.3);
  background: rgba(30, 41, 59, 0.8);
  display: none;
}

.fallback-banner.is-visible {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fallback-banner strong {
  color: #facc15;
}

.fallback-banner a {
  align-self: flex-start;
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.45);
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.fallback-banner a:hover,
.fallback-banner a:focus-visible {
  border-color: rgba(14, 165, 233, 0.75);
  background: rgba(14, 165, 233, 0.3);
}

.game-content {
  margin-top: 3rem;
  display: grid;
  gap: 2.5rem;
}

.game-content section {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.32);
}

.game-content h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

.game-content p,
.game-content li {
  line-height: 1.75;
  color: var(--color-muted);
}

.game-content ul {
  padding-left: 1.1rem;
}

.game-content figure {
  margin: 1.5rem 0;
}

.game-content figcaption {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.table-legend {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.25rem;
}

.table-legend th,
.table-legend td {
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.75rem 1rem;
  text-align: left;
}

.table-legend th {
  background: rgba(30, 41, 59, 0.75);
}

.game-footer {
  margin-top: 2rem;
  color: var(--color-muted);
  text-align: center;
  font-size: 0.9rem;
}

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

.game-footer a:hover,
.game-footer a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 768px) {
  main {
    padding: 0 1.1rem 3rem;
  }

  .game-card__body h2 {
    font-size: 1.1rem;
  }

  .fallback-banner {
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 2.5rem;
  }

  .search-section {
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .game-hero {
    padding: 1.1rem;
  }

  .iframe-container {
    aspect-ratio: 16 / 10;
  }

  .game-content section {
    padding: 1.35rem;
  }
}
.page-hero {
  margin: 0.4rem 0.2rem 0.3rem;
}

.page-hero__link {
  display: block;
  position: relative;
  border-radius: 1.2rem;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 24px 60px rgba(4, 24, 36, 0.35);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.page-hero__link:hover,
.page-hero__link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 30px 80px rgba(4, 24, 36, 0.4);
}

.page-hero__cover {
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #040d15;
}

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

.page-hero__badge {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  margin: 0;
  padding: 0.75rem 1.1rem;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  line-height: 1.4;
  color: #f8fafc;
  background: rgba(6, 18, 31, 0.72);
  backdrop-filter: blur(8px);
  border-radius: 0.9rem;
  max-width: min(90%, 26rem);
  font-weight: 600;
}

.page-hero__badge strong {
  color: #38bdf8;
  font-weight: 800;
}

@media (max-width: 640px) {
  .page-hero__link {
    border-radius: 0.9rem;
  }

  .page-hero__badge {
    left: 0.9rem;
    bottom: 0.9rem;
    max-width: calc(100% - 1.8rem);
    padding: 0.65rem 0.95rem;
  }
}

.search-section {
  margin: 1.2rem auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.filters-section {
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.filters-toggle {
  position: absolute;
  margin-right: 0.5rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: linear-gradient(135deg, #38bdf8 0%, #fbbf24 100%);
  color: #06121f;
  padding: 0.48rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: transform var(--transition-base), box-shadow var(--transition-base), filter var(--transition-base);
  flex-shrink: 0;
  top: 0;
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.35);
  animation: filters-toggle-spotlight 3s ease-in-out 2;
}

.filters-toggle::after {
  content: '▾';
  font-size: 0.78rem;
  transition: transform var(--transition-base);
}

.filters-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.filters-toggle:hover,
.filters-toggle:focus-visible {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.45);
  filter: saturate(1.1);
}

.filters-toggle:focus-visible {
  outline: none;
}

.filters-toggle[aria-expanded="true"] {
  animation: none;
}

@keyframes filters-toggle-spotlight {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 12px 35px rgba(56, 189, 248, 0.35);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(251, 191, 36, 0.45);
  }
}

.filters-title {
  margin: 0 0 0.18rem;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  text-align: center;
}

.cards-section {
  margin-top: 1.5rem;
}
.results-status {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-muted);
}
