:root {
  --bg-950: #070910;
  --bg-900: #0a0e18;
  --bg-850: #0e1421;
  --bg-800: #141b2a;

  --surface: rgba(12, 18, 30, 0.68);
  --surface-strong: rgba(16, 24, 38, 0.82);
  --surface-soft: rgba(20, 28, 44, 0.5);

  --text-primary: #f2f6ff;
  --text-secondary: #aeb9cc;
  --text-muted: #7f8ba0;

  --accent: #63d8c3;
  --accent-strong: #41bea8;
  --accent-blue: #8fb7ff;
  --accent-warm: #f0b36f;

  --border: rgba(184, 201, 230, 0.2);
  --border-strong: rgba(99, 216, 195, 0.46);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --focus-ring: #b8dcff;

  --radius: 8px;
  --container: 1200px;
  --section-width: 75rem;
  --header-height: 4.25rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text-primary);
  font-family: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: #070910;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.44;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

a {
  color: inherit;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transform: translateZ(0);
}

.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(120deg, rgba(99, 216, 195, 0.1), transparent 34%),
    linear-gradient(250deg, rgba(143, 183, 255, 0.12), transparent 40%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 72px),
    #080c15;
}

body.has-bg-fallback .bg-canvas {
  opacity: 0;
}

body.has-bg-fallback .bg-fallback {
  opacity: 1;
}

.page {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 24px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  width: min(var(--section-width), 100%);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(8, 12, 21, 0.32);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(99, 216, 195, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(99, 216, 195, 0.28), rgba(143, 183, 255, 0.12)),
    rgba(11, 17, 29, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 260ms var(--ease), box-shadow 260ms ease;
}

.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  background: var(--text-primary);
}

.brand__mark::before {
  left: 8px;
  top: 15px;
  width: 18px;
  height: 4px;
  border-radius: 2px;
}

.brand__mark::after {
  left: 17px;
  top: 8px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(99, 216, 195, 0.75);
}

.brand:hover .brand__mark {
  transform: rotate(-8deg) scale(1.05);
  box-shadow: 0 0 18px rgba(99, 216, 195, 0.35);
}

.brand__name {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn--compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.86rem;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 26rem);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.hero {
  position: relative;
  padding: 24px 0;
}

.game-card__kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 24px #070910, 0 2px 8px #070910;
}

.hero__lead {
  max-width: 62ch;
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
  transition: transform 480ms var(--ease);
}

.btn--primary {
  color: #07120f;
  border-color: rgba(99, 216, 195, 0.82);
  background: linear-gradient(135deg, var(--accent), #9cc6ff);
  box-shadow: 0 14px 30px rgba(99, 216, 195, 0.2);
}

.btn--secondary,
.btn--ghost {
  border-color: rgba(184, 201, 230, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

#games {
  min-width: 0;
}

#games-title {
  margin: 0 0 12px;
  font-size: 1.16rem;
  text-shadow: 0 2px 8px #070910;
}

.catalog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  text-shadow: 0 1px 6px #070910, 0 1px 4px #070910;
}

.catalog-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 3px;
}

.cards {
  display: grid;
  gap: 12px;
}

.game-card {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 12, 22, 0.76);
  transition:
    transform 220ms var(--ease),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(99, 216, 195, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 1px);
  opacity: 0.6;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(220px circle at var(--spot-x) var(--spot-y), rgba(99, 216, 195, 0.16), transparent 68%);
  transition: opacity 260ms ease;
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.game-card h3 {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-size: 1.12rem;
  line-height: 1.2;
  transition: color 200ms ease;
}

.game-card__text {
  margin: 4px 0 0;
  color: #c4cfdf;
  font-size: 0.86rem;
}

.game-card .btn {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  padding: 0 12px;
}

.site-footer {
  width: min(var(--section-width), 100%);
  margin: 24px auto 0;
  padding: 14px 0 0;
  color: #c4cfdf;
  text-align: center;
  text-shadow: 0 1px 6px #070910, 0 1px 4px #070910;
}

.site-footer p {
  margin: 0;
  font-size: 0.86rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms var(--ease),
    transform 560ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }

  .btn:hover::before {
    transform: translateX(120%);
  }

  .btn--primary:hover {
    box-shadow: 0 18px 36px rgba(99, 216, 195, 0.28);
  }

  .btn--secondary:hover,
  .btn--ghost:hover {
    border-color: var(--border-strong);
    background: rgba(99, 216, 195, 0.08);
  }

  .game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 216, 195, 0.4);
    background-color: rgba(14, 20, 32, 0.82);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.3);
  }

  .game-card:hover::after {
    opacity: 1;
  }

  .game-card:hover h3 {
    color: var(--accent);
  }

}

.btn:active {
  transform: translateY(0);
}

@media (max-width: 760px) {
  main {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-bottom: clamp(120px, 26svh, 220px);
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .page {
    width: min(var(--container), calc(100% - 20px));
    padding-top: 10px;
  }

  .site-header {
    position: relative;
    top: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .game-card {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .page {
    width: min(var(--container), calc(100% - 14px));
  }

  .brand__name {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .game-card:hover,
  .btn:active {
    transform: none;
  }

  .bg-canvas {
    opacity: 0.24;
  }
}
