:root {
  --bg: #0b0f14;
  --bg-alt: #111a23;
  --panel: #141f2b;
  --ink: #f3f5f7;
  --muted: #9fb0c3;
  --accent: #36f7e3;
  --accent-dark: #22a396;
  --stroke: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(54, 247, 227, 0.12), transparent 45%),
    radial-gradient(circle at 10% 30%, rgba(34, 163, 150, 0.22), transparent 45%),
    var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir", "Futura", sans-serif;
  line-height: 1.6;
}

body.gamehub {
  font-family: "Orbitron", "Exo 2", "Space Grotesk", "Avenir", "Futura", sans-serif;
  background: #0a0a0f;
  cursor: none;
}

body.gamehub .site-header {
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid rgba(0, 255, 157, 0.2);
}

body.gamehub .logo {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body[data-theme="car"] {
  --accent: #ffb347;
  --accent-dark: #d77a00;
}

body[data-theme="runner"] {
  --accent: #8cf7ff;
  --accent-dark: #1b8aa5;
}

body[data-theme="arcade"] {
  --accent: #7cf29a;
  --accent-dark: #1f8a4f;
}

body[data-theme="puzzle"] {
  --accent: #ffd36a;
  --accent-dark: #b8891e;
}

code {
  color: var(--accent);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  padding: 24px 0 12px;
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(6px);
  background: rgba(11, 15, 20, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: "DM Serif Display", "Georgia", serif;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  padding: 48px 0 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero h1 {
  font-size: clamp(2.2rem, 3vw + 1rem, 3.5rem);
  margin: 8px 0 14px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
}

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

.btn {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), #5ad8ff);
  color: #031212;
  box-shadow: 0 12px 32px rgba(54, 247, 227, 0.25);
}

.btn.ghost {
  border-color: var(--stroke);
  color: var(--ink);
}

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

.hero-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.hero-image {
  width: min(480px, 100%);
  border-radius: 18px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.parallax-group {
  perspective: 900px;
}

.parallax-layer {
  will-change: transform;
  transition: transform 0.2s ease-out;
}

.game-card {
  background: linear-gradient(135deg, rgba(20, 31, 43, 0.9), rgba(10, 16, 23, 0.9));
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  width: min(360px, 100%);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0.7;
  animation: pulse-float 15s linear infinite;
}

.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid #00ff9d;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}

.matrix-bg {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  z-index: -2;
  overflow: hidden;
}

.matrix-code {
  position: absolute;
  color: #00ff9d;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 1rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  opacity: 0.6;
  animation: matrix-fall linear infinite;
}

.hub-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 1100px;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 6rem);
  font-weight: 900;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #00ff9d 0%, #00d9ff 25%, #ff00ff 50%, #ffe600 75%, #00ffd5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 50px rgba(0, 255, 157, 0.4);
  animation: title-glitch 5s infinite;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 760px;
}

.cta-button {
  display: inline-block;
  margin-top: 32px;
  padding: 1.1rem 3rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: transparent;
  border: 3px solid #00ff9d;
  color: #00ff9d;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s ease;
}

.cta-button:hover {
  background: #00ff9d;
  color: #0a0a0f;
  box-shadow: 0 0 40px #00ff9d;
  transform: translateY(-5px);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: #00d9ff;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: scroll-bounce 2s infinite;
}

.games-section {
  padding: 90px 24px 120px;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 157, 0.1) 0%, transparent 50%);
}

.section-title {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  text-align: center;
  margin-bottom: 4rem;
  color: #00d9ff;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff00ff, transparent);
}

.games-hologrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 3rem;
  max-width: 1600px;
  margin: 0 auto;
  perspective: 1000px;
}

.hologram-card {
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 25px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 157, 0.3);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0;
  animation: hologram-in 0.8s ease forwards;
  animation-delay: var(--card-delay, 0s);
}

.hologram-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.1), transparent);
  transition: left 0.7s ease;
  z-index: 1;
}

.hologram-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.25), rgba(10, 10, 15, 0.85));
  z-index: 0;
}

.hologram-card > * {
  position: relative;
  z-index: 2;
}

.hologram-card[data-type="car"] {
  background-image: url("../images/type-car.png");
}

.hologram-card[data-type="runner"] {
  background-image: url("../images/PageMoto.png");
}

.hologram-card[data-type="arcade"] {
  background-image: url("../../pageAction.png");
}

.hologram-card[data-type="puzzle"] {
  background-image: url("../images/pageCT.png");
}
.hologram-card:hover {
  transform: translateY(-20px) rotateX(5deg);
  border-color: #00ff9d;
  box-shadow: 0 40px 80px rgba(0, 255, 157, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hologram-card:hover::before {
  left: 100%;
}

.laser-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00ff9d, transparent);
  animation: scan-line 4s linear infinite;
  box-shadow: 0 0 20px #00ff9d;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.games-section .game-icon,
.game-grid .game-icon {
  width: 42px;
  height: 42px;
  color: #00ff9d;
  animation: icon-float 3s ease-in-out infinite;
}

.games-section .game-icon svg,
.game-grid .game-icon svg {
  width: 42px;
  height: 42px;
}

.games-section .game-count,
.game-grid .game-count {
  background: linear-gradient(135deg, #ff00ff, #00d9ff);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
}

.games-section .game-title,
.game-grid .game-title {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ffe600;
  text-shadow: 0 0 20px rgba(255, 230, 0, 0.3);
}

.games-section .game-description,
.game-grid .game-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  min-height: 90px;
}

.games-section .game-stats,
.game-grid .game-stats {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.games-section .stat,
.game-grid .stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #00ffd5;
  font-size: 0.9rem;
}

.games-section .stat-icon svg,
.game-grid .stat-icon svg {
  width: 18px;
  height: 18px;
}

.games-section .game-tags,
.game-grid .game-tags {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.games-section .tag,
.game-grid .tag {
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 255, 157, 0.3);
  transition: all 0.3s ease;
}

.games-section .tag:hover,
.game-grid .tag:hover {
  background: #00ff9d;
  color: #0a0a0f;
  transform: translateY(-2px);
}

.games-section .play-button,
.game-grid .play-button {
  display: block;
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, #00ff9d, #00d9ff);
  border-radius: 15px;
  color: #0a0a0f;
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.games-section .play-button::after,
.game-grid .play-button::after {
  content: ">";
  position: absolute;
  right: 2rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.games-section .play-button:hover,
.game-grid .play-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 255, 157, 0.4);
  letter-spacing: 3px;
}

.games-section .play-button:hover::after,
.game-grid .play-button:hover::after {
  opacity: 1;
  right: 1.5rem;
}

.games-section .game-preview {
  height: 200px;
  margin-bottom: 2rem;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.games-section .game-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.08), rgba(10, 10, 15, 0.38));
  pointer-events: none;
}

.games-section .game-preview.preview-car {
  background: linear-gradient(135deg, #001a00, #003300);
}

.games-section .game-preview.preview-runner {
  background: linear-gradient(135deg, #1a001a, #330033);
}

.games-section .game-preview.preview-arcade {
  background: linear-gradient(135deg, #001a33, #003366);
}

.games-section .game-preview.preview-puzzle {
  background: linear-gradient(135deg, #331a00, #663300);
}

.preview-car {
  position: absolute;
  bottom: 30%;
  left: 20%;
  width: 42px;
  height: 20px;
  background: #00ff9d;
  border-radius: 5px 10px 5px 5px;
  animation: preview-race 3s infinite linear;
}

.preview-road {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.preview-runner {
  position: absolute;
  bottom: 30%;
  left: 30%;
  width: 20px;
  height: 40px;
  background: #00d9ff;
  border-radius: 10px 10px 5px 5px;
  animation: preview-run 2s infinite ease-in-out;
}

.preview-track {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.preview-obstacle {
  position: absolute;
  bottom: 30%;
  right: -20px;
  width: 14px;
  height: 24px;
  background: #ff00ff;
  animation: preview-obstacle 2s infinite linear;
}

.preview-stars {
  position: absolute;
  inset: 0;
}

.preview-ship {
  position: absolute;
  bottom: 35%;
  left: 35%;
  width: 40px;
  height: 24px;
  background: linear-gradient(135deg, #00d9ff, #ff00ff);
  clip-path: polygon(0% 50%, 100% 0%, 100% 100%, 0% 50%);
  animation: preview-float 3s infinite ease-in-out;
}

.preview-beam {
  position: absolute;
  left: 45%;
  top: 30%;
  width: 3px;
  height: 18px;
  background: #00ffd5;
  animation: preview-beam 1.5s infinite ease;
}

.preview-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 28px;
}

.preview-tiles span {
  background: rgba(255, 230, 0, 0.25);
  border: 1px solid rgba(255, 230, 0, 0.5);
  border-radius: 10px;
  animation: preview-tiles 4s infinite ease-in-out;
}

.preview-tiles span:nth-child(2) {
  animation-delay: 1s;
}

.preview-tiles span:nth-child(3) {
  animation-delay: 2s;
}

.preview-tiles span:nth-child(4) {
  animation-delay: 3s;
}

.type-chooser {
  position: relative;
  padding: 56px 0 70px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(18, 18, 32, 0.8), rgba(10, 12, 28, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 1;
  --pulse-primary: #ff4d8d;
  --pulse-secondary: #00e0ff;
  --pulse-accent: #ffd166;
  --pulse-purple: #9d4edd;
  --pulse-dark: #121220;
  --pulse-light: #f8f9ff;
}

.pulse-header {
  text-align: center;
  padding: 0 28px;
  position: relative;
  z-index: 1;
  margin-bottom: 40px;
}

.title-container {
  display: inline-block;
  position: relative;
  margin-bottom: 18px;
}

.pulse-title,
.pulse-title-shadow {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pulse-title {
  background: linear-gradient(45deg, var(--pulse-primary), var(--pulse-secondary), var(--pulse-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 24px rgba(255, 77, 141, 0.35);
  animation: pulse-title 3s infinite alternate;
}

.pulse-title-shadow {
  position: absolute;
  inset: 6px auto auto 6px;
  background: linear-gradient(45deg, var(--pulse-primary), var(--pulse-secondary), var(--pulse-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.35;
  filter: blur(10px);
  z-index: -1;
}

.pulse-tagline {
  font-size: 1.25rem;
  color: var(--pulse-secondary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
  animation: pulse-glow 2s infinite alternate;
}

.pulse-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto;
}

.type-chooser .games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.type-chooser .game-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid var(--card-color, rgba(255, 255, 255, 0.2));
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: pulse-card-in 0.8s ease-out forwards;
  animation-delay: var(--card-delay, 0s);
  opacity: 0;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.type-chooser .game-card:hover {
  transform: translateY(-12px) rotateX(4deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.type-chooser .game-card:hover .game-animation {
  transform: scale(1.05);
}

.type-chooser .game-card[data-type="car"] {
  --card-color: #ff4d8d;
}

.type-chooser .game-card[data-type="runner"] {
  --card-color: #00e0ff;
}

.type-chooser .game-card[data-type="arcade"] {
  --card-color: #ffd166;
}

.type-chooser .game-card[data-type="puzzle"] {
  --card-color: #9d4edd;
}

.type-chooser .game-animation {
  height: 220px;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s ease;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}

.type-chooser .game-info {
  padding: 24px;
  position: relative;
  background: rgba(18, 18, 32, 0.82);
}

.type-chooser .game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.type-chooser .game-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.type-chooser .game-title-icon svg {
  width: 24px;
  height: 24px;
}

.type-chooser .game-count {
  background: var(--card-color);
  color: #0c0b15;
  padding: 7px 16px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.type-chooser .game-description {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 12px;
  font-size: 1rem;
}

.type-chooser .game-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.type-chooser .tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--pulse-secondary);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 224, 255, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}

.type-chooser .tag:hover {
  transform: translateY(-2px);
  background: rgba(0, 224, 255, 0.2);
}

.type-chooser .play-btn {
  position: absolute;
  bottom: -25px;
  right: 24px;
  width: 52px;
  height: 52px;
  background: var(--card-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0b15;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.type-chooser .play-btn svg {
  width: 22px;
  height: 22px;
}

.type-chooser .game-card:hover .play-btn {
  transform: scale(1.1) rotate(12deg);
  background: var(--pulse-secondary);
  color: #0c0b15;
  box-shadow: 0 16px 30px rgba(0, 224, 255, 0.4);
}

.pulse-sparkle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: pulse-spark 0.6s ease-out forwards;
}

.car-animation,
.runner-animation,
.space-animation,
.puzzle-animation {
  width: 100%;
  height: 100%;
  position: relative;
}

.car-animation {
  background: linear-gradient(135deg, #1a1a3a 0%, #0a0a1a 100%);
}

.road-container {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 100%;
  height: 80px;
  perspective: 500px;
}

.road {
  width: 100%;
  height: 100%;
  background: #222;
  transform: rotateX(60deg);
  position: relative;
  overflow: hidden;
}

.road-lines {
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--pulse-accent) 0px,
    var(--pulse-accent) 20px,
    transparent 20px,
    transparent 40px
  );
  animation: road-zoom 0.8s linear infinite;
}

.car {
  position: absolute;
  bottom: 45%;
  left: 28%;
  width: 70px;
  height: 34px;
  background: var(--pulse-primary);
  border-radius: 10px 20px 10px 10px;
  animation: car-boost 2s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(255, 77, 141, 0.5);
}

.car::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 12px;
  width: 25px;
  height: 14px;
  background: var(--pulse-primary);
  border-radius: 5px 5px 0 0;
}

.car::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 12px;
  width: 18px;
  height: 18px;
  background: #0c0b15;
  border-radius: 50%;
  box-shadow: 30px 0 0 #0c0b15;
  animation: wheel-spin 0.5s linear infinite;
}

.nitro {
  position: absolute;
  bottom: 18%;
  left: -30px;
  width: 30px;
  height: 10px;
  background: linear-gradient(90deg, var(--pulse-secondary), transparent);
  border-radius: 5px;
  animation: nitro-burn 0.5s infinite alternate;
}

.runner-animation {
  background: linear-gradient(135deg, #2a1a3a 0%, #1a0a2a 100%);
}

.track {
  position: absolute;
  bottom: 30%;
  width: 100%;
  height: 14px;
  background: linear-gradient(90deg, var(--pulse-secondary), var(--pulse-primary));
  box-shadow: 0 0 30px rgba(0, 224, 255, 0.5);
}

.runner {
  position: absolute;
  bottom: 35%;
  left: 24%;
  width: 44px;
  height: 84px;
  animation: runner-dash 1.5s infinite;
}

.runner-body {
  width: 44px;
  height: 58px;
  background: var(--pulse-accent);
  border-radius: 20px 20px 10px 10px;
  position: relative;
  box-shadow: 0 10px 25px rgba(255, 209, 102, 0.4);
}

.runner-head {
  position: absolute;
  top: -24px;
  left: 12px;
  width: 20px;
  height: 24px;
  background: var(--pulse-accent);
  border-radius: 50%;
}

.runner-arm {
  position: absolute;
  top: 14px;
  width: 8px;
  height: 40px;
  background: var(--pulse-accent);
  border-radius: 4px;
  animation: arm-swing 0.75s infinite alternate;
}

.arm-left {
  left: -12px;
}

.arm-right {
  right: -12px;
  animation-delay: 0.375s;
}

.runner-leg {
  position: absolute;
  bottom: -25px;
  width: 10px;
  height: 40px;
  background: var(--pulse-accent);
  border-radius: 5px;
  animation: leg-kick 0.75s infinite alternate;
}

.leg-left {
  left: 10px;
}

.leg-right {
  right: 10px;
  animation-delay: 0.375s;
}

.obstacle {
  position: absolute;
  bottom: 35%;
  right: -40px;
  width: 34px;
  height: 50px;
  background: var(--pulse-primary);
  border-radius: 10px;
  animation: obstacle-run 2s infinite linear;
  box-shadow: 0 0 20px rgba(255, 77, 141, 0.5);
}

.obstacle:nth-child(2) {
  animation-delay: 1s;
  height: 34px;
  background: var(--pulse-secondary);
}

.beat {
  position: absolute;
  top: 18%;
  right: 28%;
  width: 14px;
  height: 14px;
  background: var(--pulse-secondary);
  border-radius: 50%;
  animation: beat-pulse 0.5s infinite;
  box-shadow: 0 0 14px var(--pulse-secondary);
}

.space-animation {
  background: linear-gradient(135deg, #0a1a3a 0%, #001122 100%);
  overflow: hidden;
}

.stars-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  animation: star-twinkle 2s infinite;
}

.spaceship {
  position: absolute;
  bottom: 30%;
  left: 35%;
  width: 70px;
  height: 40px;
  background: linear-gradient(135deg, var(--pulse-secondary), var(--pulse-primary));
  clip-path: polygon(0% 50%, 100% 0%, 100% 100%, 0% 50%);
  animation: spaceship-float 3s infinite ease-in-out;
  box-shadow: 0 10px 30px rgba(0, 224, 255, 0.5);
}

.engine-flame {
  position: absolute;
  bottom: 10px;
  left: -25px;
  width: 30px;
  height: 14px;
  background: linear-gradient(90deg, var(--pulse-accent), var(--pulse-primary));
  border-radius: 8px;
  animation: flame-burn 0.3s infinite alternate;
}

.laser {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 4px;
  height: 20px;
  background: var(--pulse-secondary);
  border-radius: 2px;
  animation: laser-fire 1s infinite;
  box-shadow: 0 0 15px var(--pulse-secondary);
}

.alien {
  position: absolute;
  top: 25%;
  right: -50px;
  width: 44px;
  height: 44px;
  background: var(--pulse-accent);
  border-radius: 50%;
  animation: alien-invade 4s infinite linear;
  box-shadow: 0 0 25px rgba(255, 209, 102, 0.5);
}

.puzzle-animation {
  background: linear-gradient(135deg, #1a3a2a 0%, #0a2a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.puzzle-container {
  position: relative;
  width: 180px;
  height: 180px;
}

.puzzle-piece {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  animation: puzzle-rotate 6s infinite ease-in-out;
  box-shadow: 0 10px 25px rgba(255, 77, 141, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.piece-1 {
  top: 0;
  left: 0;
  background: var(--pulse-primary);
}

.piece-2 {
  top: 0;
  right: 0;
  background: var(--pulse-secondary);
  animation-delay: 1s;
}

.piece-3 {
  bottom: 0;
  left: 0;
  background: var(--pulse-accent);
  animation-delay: 2s;
}

.piece-4 {
  bottom: 0;
  right: 0;
  background: var(--pulse-purple);
  animation-delay: 3s;
}

.maze {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.explorer {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  background: var(--pulse-secondary);
  border-radius: 50%;
  animation: explore-maze 8s infinite linear;
  box-shadow: 0 0 15px var(--pulse-secondary);
  z-index: 2;
}

@keyframes pulse-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
  100% {
    transform: translateY(0) rotate(360deg);
  }
}

@keyframes matrix-fall {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100vh);
  }
}

@keyframes title-glitch {
  0%,
  95%,
  100% {
    text-shadow: 0 0 50px rgba(0, 255, 157, 0.5), 0 0 20px rgba(0, 217, 255, 0.3);
    transform: translate(0);
  }
  96% {
    text-shadow: -5px 0 20px rgba(255, 0, 255, 0.8), 5px 0 20px rgba(255, 230, 0, 0.8);
    transform: translate(2px, -1px);
  }
  97% {
    text-shadow: 3px 0 20px rgba(0, 255, 157, 0.8), -3px 0 20px rgba(0, 217, 255, 0.8);
    transform: translate(-1px, 1px);
  }
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes hologram-in {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes icon-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes scan-line {
  0% {
    top: 0;
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes preview-race {
  0% {
    left: 20%;
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  50% {
    left: 60%;
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(5deg);
  }
  100% {
    left: 20%;
    transform: rotate(0deg);
  }
}

@keyframes preview-run {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes preview-obstacle {
  0% {
    right: -20px;
  }
  100% {
    right: 100%;
  }
}

@keyframes preview-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes preview-beam {
  0%,
  100% {
    opacity: 0.2;
    transform: scaleY(0.5);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes preview-tiles {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes pulse-title {
  0% {
    text-shadow: 0 6px 24px rgba(255, 77, 141, 0.3);
  }
  100% {
    text-shadow: 0 6px 34px rgba(0, 224, 255, 0.45);
  }
}

@keyframes pulse-glow {
  0% {
    filter: drop-shadow(0 0 6px var(--pulse-secondary));
  }
  100% {
    filter: drop-shadow(0 0 18px var(--pulse-primary));
  }
}

@keyframes pulse-card-in {
  from {
    opacity: 0;
    transform: translateY(40px) rotateX(-10deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes pulse-spark {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(3) rotate(180deg);
    opacity: 0;
  }
}

@keyframes car-boost {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(60px) rotate(-5deg);
  }
  50% {
    transform: translateX(120px) rotate(0deg);
  }
  75% {
    transform: translateX(60px) rotate(5deg);
  }
}

@keyframes road-zoom {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes wheel-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes nitro-burn {
  0% {
    opacity: 0.5;
    transform: scaleX(0.8);
  }
  100% {
    opacity: 1;
    transform: scaleX(1.2);
  }
}

@keyframes runner-dash {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-30px);
  }
}

@keyframes arm-swing {
  0% {
    transform: rotate(30deg);
  }
  100% {
    transform: rotate(-30deg);
  }
}

@keyframes leg-kick {
  0% {
    transform: rotate(20deg);
  }
  100% {
    transform: rotate(-20deg);
  }
}

@keyframes obstacle-run {
  0% {
    right: -40px;
  }
  100% {
    right: 100%;
  }
}

@keyframes beat-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes spaceship-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-18px) rotate(-3deg);
  }
  50% {
    transform: translateY(-36px) rotate(0deg);
  }
  75% {
    transform: translateY(-18px) rotate(3deg);
  }
}

@keyframes flame-burn {
  0% {
    opacity: 0.6;
    transform: scaleX(1);
  }
  100% {
    opacity: 1;
    transform: scaleX(1.3);
  }
}

@keyframes laser-fire {
  0% {
    transform: translateX(0) scaleY(0.1);
    opacity: 1;
  }
  100% {
    transform: translateX(200px) scaleY(1);
    opacity: 0;
  }
}

@keyframes alien-invade {
  0% {
    right: -50px;
  }
  100% {
    right: 100%;
  }
}

@keyframes puzzle-rotate {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(90deg) scale(1.1);
  }
  50% {
    transform: rotate(180deg) scale(1);
  }
  75% {
    transform: rotate(270deg) scale(1.1);
  }
}

@keyframes explore-maze {
  0% {
    top: 10px;
    left: 10px;
  }
  25% {
    top: 10px;
    left: 120px;
  }
  50% {
    top: 120px;
    left: 120px;
  }
  75% {
    top: 120px;
    left: 10px;
  }
  100% {
    top: 10px;
    left: 10px;
  }
}

@media (max-width: 900px) {
  .type-chooser .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 0 20px;
  }

  .pulse-tagline {
    font-size: 1.05rem;
  }
}

@media (max-width: 600px) {
  .type-chooser {
    padding: 40px 0 56px;
  }

  .type-chooser .game-animation {
    height: 200px;
  }
}

@media (max-width: 900px) {
  .games-hologrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .games-hologrid {
    grid-template-columns: 1fr;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }
}

@media (max-width: 520px) {
  .hologram-card {
    padding: 1.5rem;
  }
}

.type-card {
  background: rgba(16, 20, 32, 0.78);
  border: 1px solid rgba(0, 255, 255, 0.16);
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  position: relative;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.type-card .type-thumb,
.type-card .type-body {
  position: relative;
}

.type-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
  border-color: rgba(0, 255, 255, 0.45);
}

.type-card[data-type="car"] {
  background: linear-gradient(140deg, rgba(255, 179, 71, 0.2), rgba(255, 90, 90, 0.08), rgba(12, 16, 22, 0.9));
  --type-color: #00f0ff;
}

.type-card[data-type="runner"] {
  background: linear-gradient(140deg, rgba(140, 247, 255, 0.2), rgba(88, 140, 255, 0.08), rgba(10, 14, 20, 0.92));
  --type-color: #ff4fff;
}

.type-card[data-type="arcade"] {
  background: linear-gradient(140deg, rgba(124, 242, 154, 0.2), rgba(80, 200, 140, 0.08), rgba(8, 12, 18, 0.92));
  --type-color: #ffe84d;
}

.type-card[data-type="puzzle"] {
  background: linear-gradient(140deg, rgba(255, 211, 106, 0.2), rgba(255, 160, 80, 0.08), rgba(10, 14, 18, 0.92));
  --type-color: #2bff9b;
}

.type-thumb {
  position: relative;
  padding: 22px;
  background: transparent;
}

.type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.type-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--type-color, #9ad7ff);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.18);
}

.type-icon svg {
  width: 34px;
  height: 34px;
}

.type-anim {
  position: relative;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.type-anim.anim-svg {
  display: none;
  padding: 10px;
}

body[data-anim="svg"] .type-anim.anim-css {
  display: none;
}

body[data-anim="svg"] .type-anim.anim-svg {
  display: block;
}

.type-anim.anim-css {
  display: block;
}

.type-card[data-type="car"] .type-anim {
  background: linear-gradient(120deg, rgba(255, 179, 71, 0.35), rgba(255, 90, 90, 0.1));
}

.type-card[data-type="runner"] .type-anim {
  background: linear-gradient(120deg, rgba(140, 247, 255, 0.35), rgba(88, 140, 255, 0.12));
}

.type-card[data-type="arcade"] .type-anim {
  background: linear-gradient(120deg, rgba(124, 242, 154, 0.35), rgba(80, 200, 140, 0.12));
}

.type-card[data-type="puzzle"] .type-anim {
  background: linear-gradient(120deg, rgba(255, 211, 106, 0.35), rgba(255, 160, 80, 0.12));
}

.anim-car .car-road {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 18px;
  height: 8px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0 14px, transparent 14px 28px);
  animation: road-dash 1.4s linear infinite;
}

.anim-car .car-roundabout {
  display: none;
}

.anim-car .car-body {
  position: absolute;
  width: 26px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(120deg, #ffcf6b, #ff7a6b);
  bottom: 24px;
  left: 16px;
  animation: car-drift 2.6s ease-in-out infinite;
}

.anim-car .car-wheel {
  display: none;
}

.anim-car .car-body.car-a {
  left: 18px;
}

.anim-car .car-wheel.car-a.w1 {
  left: 24px;
}

.anim-car .car-wheel.car-a.w2 {
  left: 38px;
}

.anim-car .car-body.car-b {
  display: none;
}

.anim-car .car-wheel.car-b.w1,
.anim-car .car-wheel.car-b.w2 {
  display: none;
}

.anim-car .car-wheel.car-b.w1 {
  left: 146px;
}

.anim-car .car-wheel.car-b.w2 {
  left: 158px;
}

.anim-car .car-cloud {
  display: none;
}

.anim-car .car-cloud.c1 {
  left: 14px;
}

.anim-car .car-cloud.c2 {
  left: 110px;
  top: 10px;
  animation-delay: 1.4s;
  opacity: 0.4;
}

.anim-car .speed-line {
  display: none;
  position: absolute;
  height: 2px;
  width: 40px;
  background: rgba(255, 255, 255, 0.5);
  top: 70px;
  right: -20px;
  animation: speed-lines 0.9s linear infinite;
}

.anim-car .speed-line.l2 {
  top: 90px;
  animation-delay: 0.2s;
  opacity: 0.7;
}

.anim-car .speed-line.l3 {
  top: 50px;
  animation-delay: 0.4s;
  opacity: 0.5;
}

.anim-runner .runner-body {
  position: absolute;
  width: 6px;
  height: 20px;
  border-radius: 4px;
  background: #8cf7ff;
  left: 34px;
  top: 66px;
  animation: runner-hop 1.4s ease-in-out infinite;
}

.anim-runner .runner-head {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8cf7ff;
  left: 32px;
  top: 54px;
  animation: runner-hop 1.4s ease-in-out infinite;
}

.anim-runner .runner-leg {
  display: none;
}

.anim-runner .runner-leg.left {
  animation: none;
}

.anim-runner .runner-leg.right {
  animation: none;
}

.anim-runner .runner-trail {
  display: none;
}

.anim-runner .runner-track {
  position: absolute;
  left: 42%;
  right: 42%;
  bottom: 18px;
  height: 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0 12px, transparent 12px 24px);
  animation: runner-track-scroll 1.6s linear infinite;
}

.anim-runner .runner-flag {
  display: none;
}

.anim-runner .runner-flag.f1 {
  left: 160px;
}

.anim-runner .runner-flag.f2 {
  left: 188px;
  animation-delay: 0.4s;
}

.anim-runner::before {
  content: "";
  position: absolute;
  inset: 14px 18px 22px 18px;
  border-radius: 12px;
  background-image: linear-gradient(rgba(140, 247, 255, 0.6) 0 0), linear-gradient(rgba(140, 247, 255, 0.45) 0 0);
  background-size: 64px 10px, 78px 10px;
  background-repeat: repeat-y;
  background-position: 12px 0, 160px -24px;
  opacity: 0.55;
  animation: runner-platforms 1.8s linear infinite;
}

.anim-runner .runner-body,
.anim-runner .runner-head,
.anim-runner .runner-leg,
.anim-runner .runner-trail,
.anim-runner .runner-track,
.anim-runner .runner-flag {
  z-index: 1;
}

.anim-arcade .arcade-ship {
  position: absolute;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 22px solid #7cf29a;
  left: 88px;
  top: 40px;
  animation: ship-float 2s ease-in-out infinite;
}

.anim-arcade::after {
  display: none;
}

.anim-arcade .arcade-flame {
  display: none;
}

.anim-arcade .star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fefefe;
  opacity: 0.6;
  animation: star-drift 2.8s linear infinite;
}

.anim-arcade .star.s1 {
  left: 160px;
  top: 20px;
}

.anim-arcade .star.s2 {
  left: 140px;
  top: 50px;
  animation-delay: 0.6s;
}

.anim-arcade .star.s3 {
  left: 190px;
  top: 36px;
  animation-delay: 1s;
}

.anim-arcade .star.s4 {
  display: none;
}

.anim-arcade .star.s5 {
  display: none;
}

.anim-arcade .arcade-asteroid {
  display: none;
}

.anim-arcade .arcade-asteroid.a1 {
  left: 140px;
  top: 64px;
}

.anim-arcade .arcade-asteroid.a2 {
  left: 24px;
  top: 16px;
  animation-delay: 1.2s;
  opacity: 0.6;
}

.anim-puzzle .tile {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 6px;
  background: #ffd36a;
  top: 34px;
  animation: tile-swap 2.2s ease-in-out infinite;
}

.anim-puzzle .tile.t1 {
  left: 50px;
}

.anim-puzzle .tile.t2 {
  left: 90px;
  background: #ff9f5a;
  animation-delay: 0.3s;
}

.anim-puzzle .tile.t3 {
  left: 130px;
  background: #ffe08a;
  animation-delay: 0.6s;
}

.anim-puzzle .tile.t4 {
  display: none;
}

.anim-puzzle .tile.t5 {
  display: none;
}

.anim-puzzle .puzzle-grid {
  position: absolute;
  inset: 22px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.anim-svg svg {
  width: 100%;
  height: 100%;
}

.anim-svg.anim-car svg {
  animation: car-svg-move 2s ease-in-out infinite;
}

.anim-svg.anim-runner svg {
  animation: runner-svg-bob 1.1s ease-in-out infinite;
}

.anim-svg.anim-arcade svg {
  animation: ship-float 1.6s ease-in-out infinite;
}

.anim-svg.anim-puzzle svg {
  animation: tile-swap 1.8s ease-in-out infinite;
}

@keyframes road-dash {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -80px 0;
  }
}

@keyframes car-move {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(120px);
  }
}

@keyframes car-drift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(40px, -6px) rotate(-6deg);
  }
  45% {
    transform: translate(80px, 8px) rotate(6deg);
  }
  70% {
    transform: translate(120px, -4px) rotate(-10deg);
  }
  100% {
    transform: translate(160px, 0) rotate(0deg);
  }
}

@keyframes roundabout-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

@keyframes car-ghost {
  0%,
  100% {
    transform: translateX(0) scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-90px) scale(1.1);
    opacity: 1;
  }
}

@keyframes cloud-drift {
  0% {
    transform: translateX(0);
    opacity: 0.2;
  }
  100% {
    transform: translateX(140px);
    opacity: 0.6;
  }
}

@keyframes speed-lines {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  30% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(-160px);
    opacity: 0;
  }
}

@keyframes car-svg-move {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(12px);
  }
}

@keyframes runner-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes runner-hop {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(56px, -14px);
  }
  50% {
    transform: translate(0, -6px);
  }
  75% {
    transform: translate(-56px, -18px);
  }
}

@keyframes runner-svg-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes runner-leg {
  0%,
  100% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(-18deg);
  }
}

@keyframes runner-track-scroll {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 48px;
  }
}

@keyframes runner-platforms {
  0% {
    background-position: 8px 0, 90px -18px, 175px -8px, 250px -28px;
  }
  100% {
    background-position: 8px 90px, 90px 72px, 175px 82px, 250px 62px;
  }
}

@keyframes trail-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes trail-climb {
  0% {
    transform: translate(0, 24px) rotate(-12deg);
    opacity: 0.2;
  }
  50% {
    transform: translate(20px, -6px) rotate(-12deg);
    opacity: 0.6;
  }
  100% {
    transform: translate(40px, -32px) rotate(-12deg);
    opacity: 0.3;
  }
}

@keyframes ship-float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}

@keyframes flame-flicker {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.7;
  }
  50% {
    transform: scaleX(1.4);
    opacity: 1;
  }
}

@keyframes laser {
  0%,
  100% {
    transform: scaleX(0.2);
    opacity: 0.2;
  }
  50% {
    transform: scaleX(1);
    opacity: 0.9;
  }
}

@keyframes asteroid-drift {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 0.2;
  }
  100% {
    transform: translateX(-160px) rotate(180deg);
    opacity: 0.9;
  }
}

@keyframes star-drift {
  0% {
    transform: translateX(0);
    opacity: 0.7;
  }
  100% {
    transform: translateX(-80px);
    opacity: 0.1;
  }
}

@keyframes tile-swap {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes flag-pop {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-6px);
    opacity: 0.9;
  }
}

.type-body {
  padding: 18px 22px 24px;
  color: var(--muted);
}

.type-body h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.35rem;
}

.chip {
  position: static;
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.8), rgba(255, 0, 255, 0.6));
  border: 0;
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.type-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.game-thumb {
  position: relative;
  overflow: hidden;
  padding: 0;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.game-thumb .thumb-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, transparent, rgba(11, 15, 20, 0.85));
}

.game-thumb .thumb-title {
  font-size: 1.2rem;
  display: block;
}

.game-thumb .thumb-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.game-body {
  padding: 20px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 24px 0 40px;
}

.section {
  padding: 10px 0 24px;
}

.type-chooser {
  margin-top: 28px;
  padding: 32px 28px 40px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 10% 10%, rgba(255, 179, 71, 0.16), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(124, 242, 154, 0.12), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(140, 247, 255, 0.14), transparent 55%),
    rgba(13, 18, 25, 0.85);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.section-title {
  margin-bottom: 16px;
}

.section-title p {
  color: var(--muted);
  margin-top: 6px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.game-card.wide {
  grid-column: span 2;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 18px 20px;
}

.game-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 0 16px;
  flex-wrap: wrap;
}

.type-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  padding: 40px 0 18px;
}

.type-hero-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-hero-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.type-hero-card img {
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid var(--stroke);
}

.meta {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.game-frame {
  padding: 16px 0 24px;
}

.frame {
  background: #05090e;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.frame iframe {
  width: 100%;
  height: clamp(380px, 65vh, 720px);
  border: none;
  border-radius: 12px;
  display: block;
}

body[data-game="2048"] .frame {
  height: clamp(560px, 78vh, 980px);
  padding: 0;
}

body[data-game="2048"] .frame iframe {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

body[data-game="2048"] .game-frame {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

.frame:fullscreen {
  padding: 0;
  border: none;
  border-radius: 0;
  background: #000;
  width: 100vw;
  height: 100vh;
}

.frame:fullscreen iframe {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.frame:-webkit-full-screen {
  padding: 0;
  border: none;
  border-radius: 0;
  background: #000;
  width: 100vw;
  height: 100vh;
}

.frame:-webkit-full-screen iframe {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.frame iframe:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: block;
  background: #000;
}

.frame iframe:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: block;
  background: #000;
}

.ad-slot {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin: 24px auto;
  min-height: 90px;
  text-align: center;
}

.ad-sample {
  background: rgba(54, 247, 227, 0.15);
  border: 1px solid rgba(54, 247, 227, 0.4);
  color: var(--ink);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.ad-top {
  height: 90px;
}

.ad-under {
  width: min(320px, 100%);
  height: 250px;
  margin: 10px auto 30px;
}

.ad-footer {
  height: 90px;
}

.site-footer {
  padding: 20px 0 40px;
  border-top: 1px solid var(--stroke);
  margin-top: 20px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
}

.legal {
  padding: 32px 0 40px;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 18px;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .frame iframe {
    height: 420px;
  }

  .ad-top,
  .ad-footer {
    height: 60px;
  }

  .game-card.wide {
    grid-column: span 1;
  }

  .type-chooser {
    padding: 24px 18px 30px;
  }

  .type-thumb {
    padding: 18px;
  }

  .type-anim {
    height: 130px;
  }
}
