/* Playnova JS — public site */
body {
  background: radial-gradient(1100px 620px at 12% -8%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 68%),
    radial-gradient(900px 520px at 96% 2%, rgba(139, 92, 246, 0.12), transparent 62%),
    var(--bg);
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 35%, transparent 100%);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 10, 18, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6 65%, #ec4899);
  color: #fff;
  box-shadow: 0 8px 22px var(--accent-glow);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.nav-link.is-active {
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease;
}

.nav-dropdown[open] > summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #0d1626;
  box-shadow: var(--shadow);
  animation: dropdown-in 0.16s ease both;
}

.dropdown-menu a {
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.dropdown-menu a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.09);
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.site-search {
  position: relative;
  flex: 0 1 250px;
  margin-left: auto;
}

.site-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.site-search .input {
  min-height: 40px;
  padding-left: 36px;
  border-radius: 999px;
  font-size: 0.86rem;
  background: rgba(6, 11, 20, 0.7);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.7px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

body.nav-open .nav-toggle span {
  background: transparent;
}

body.nav-open .nav-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 48px;
  padding: 62px 0 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 .gradient {
  background: linear-gradient(100deg, var(--accent) 8%, #a78bfa 55%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy > p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .btn {
  min-height: 46px;
  padding-inline: 20px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-stats strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.hero-stats span {
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-height: 410px;
  perspective: 1200px;
}

.hero-glow {
  position: absolute;
  inset: 12% 4% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 68%);
  filter: blur(46px);
}

.hero-card {
  position: absolute;
  width: min(46%, 218px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 20px;
  background: #0a1120;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  transition: transform 0.5s ease;
}

.hero-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hero-card:nth-of-type(1) {
  top: 7%;
  left: 0;
  z-index: 2;
  transform: rotate(-9deg) translateZ(10px);
}

.hero-card:nth-of-type(2) {
  top: 25%;
  left: 27%;
  z-index: 3;
  transform: rotate(3deg) scale(1.08);
}

.hero-card:nth-of-type(3) {
  top: 4%;
  right: 0;
  z-index: 1;
  transform: rotate(10deg);
}

.hero-visual:hover .hero-card:nth-of-type(1) {
  transform: rotate(-11deg) translate(-6px, -4px) translateZ(10px);
}

.hero-visual:hover .hero-card:nth-of-type(2) {
  transform: rotate(0deg) scale(1.1) translateY(-6px);
}

.hero-visual:hover .hero-card:nth-of-type(3) {
  transform: rotate(12deg) translate(6px, -4px);
}

.hero-float {
  position: absolute;
  right: 6%;
  bottom: 8%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(10, 17, 32, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-float b {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.hero-float .live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.14);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 9px rgba(52, 211, 153, 0.03);
  }
}

/* ---------- Sections ---------- */

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 8px 0 10px;
}

.section {
  margin: 42px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 23px;
  border-radius: 999px;
  background: linear-gradient(var(--accent), #8b5cf6);
  box-shadow: 0 0 14px var(--accent-glow);
}

.section-link {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.section-link:hover {
  color: var(--accent);
}

/* ---------- Game cards ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.55), 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.game-card__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #142036, #0a1120);
}

.game-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-card__thumb img {
  transform: scale(1.06);
}

.game-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.08) 55%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.game-card:hover .game-card__play,
.game-card:focus-visible .game-card__play {
  opacity: 1;
}

.game-card__play span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 10px 26px var(--accent-glow);
}

.game-card__play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
  fill: currentColor;
}

.game-card__flag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.78);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.game-card__draft {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
}

.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 12px 14px;
}

.game-card__title {
  overflow: hidden;
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.74rem;
}

.game-card__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Page headings & catalog ---------- */

.page-head {
  padding: 42px 0 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 0.8rem;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  opacity: 0.45;
}

.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.page-head p {
  max-width: 62ch;
  margin-top: 8px;
  color: var(--muted);
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  margin: 8px 0 20px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.catalog-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.catalog-toolbar__filters .select {
  width: auto;
  min-width: 160px;
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 0.84rem;
}

.result-count {
  color: var(--muted);
  font-size: 0.84rem;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.active-filter button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 34px 0 10px;
}

.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.pagination a:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.pagination .is-current {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}

.pagination .is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Game page ---------- */

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 28px;
  margin: 24px 0 8px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: #020409;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 7px 12px 7px 16px;
  border-bottom: 1px solid var(--border);
  background: #080f1c;
  color: var(--muted);
  font-size: 0.76rem;
}

.player-bar__status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player-bar__status b {
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-bar__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.player-bar__actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.player-bar__actions .btn {
  min-height: 29px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.74rem;
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-shell:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.player-shell:fullscreen .player-frame {
  flex: 1;
  aspect-ratio: auto;
}

.player-shell.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 150;
  border-radius: 0;
  background: #000;
}

.player-shell.is-fullscreen .player-frame {
  height: calc(100vh - 42px);
  aspect-ratio: auto;
}

.preroll {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.08), transparent 55%), rgba(2, 6, 23, 0.97);
  transition: opacity 0.35s ease;
}

.preroll.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.preroll__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.preroll__ad {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: auto;
  padding: 8px 0;
}

.preroll__ad .ad-unit {
  width: 100%;
  max-width: 760px;
}

.preroll__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.preroll__timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.preroll__timer b {
  color: var(--accent);
}

.game-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 16px;
}

.game-title {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.83rem;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prose {
  color: #c7d5ee;
  font-size: 0.94rem;
  line-height: 1.72;
  white-space: pre-line;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
}

.tag:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.16s ease;
}

.mini-game:hover {
  background: rgba(148, 163, 184, 0.07);
}

.mini-game img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  background: #101b2f;
}

.mini-game__text {
  min-width: 0;
}

.mini-game__text b {
  display: block;
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-game__text span {
  color: var(--muted-2);
  font-size: 0.72rem;
}

.side-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.side-cats a {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.side-cats a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.side-card .ad-slot {
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: rgba(5, 9, 16, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0 36px;
}

.footer-brand p {
  max-width: 40ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.footer-links h3 {
  margin-bottom: 13px;
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-links a {
  display: block;
  width: fit-content;
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 0.8rem;
}

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

.footer-bottom a:hover {
  color: var(--accent);
}

/* ---------- Loading ---------- */

.page-loading {
  display: grid;
  place-items: center;
  min-height: 52vh;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(148, 163, 184, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 22px;
  }

  .hero {
    gap: 32px;
  }

  .hero-visual {
    min-height: 360px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 14, 25, 0.98);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .nav-link {
    padding: 11px 12px;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown > summary {
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    margin: 4px 0 6px 10px;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
  }

  .site-search {
    flex: 1 1 auto;
    width: 100%;
    margin: 8px 0 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .hero-visual {
    display: none;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
  }

  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0 12px;
    padding-bottom: 10px;
  }

  .brand {
    order: 1;
  }

  .nav-toggle {
    order: 2;
  }

  .site-search {
    order: 3;
    flex: 1 0 100%;
    margin: 0;
  }

  .hero {
    padding-top: 30px;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .hero-stats {
    gap: 22px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
  }

  .game-card__body {
    padding: 10px 10px 12px;
  }

  .game-card__title {
    font-size: 0.86rem;
  }

  .game-card__meta {
    font-size: 0.68rem;
  }

  .catalog-toolbar {
    align-items: stretch;
  }

  .catalog-toolbar__filters {
    width: 100%;
  }

  .catalog-toolbar__filters .select {
    flex: 1 1 100%;
  }

  .player-bar {
    padding-left: 12px;
  }

  .player-bar__actions .btn span {
    display: none;
  }

  .player-bar__actions .btn {
    width: 32px;
    padding: 0;
  }

  .game-actions {
    width: 100%;
  }

  .game-actions .btn {
    flex: 1 1 auto;
  }

  .panel {
    padding: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 34px;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .preroll {
    padding: 14px;
  }

  .preroll__top {
    font-size: 0.7rem;
  }
}
