:root {
  color-scheme: dark;
  --play-bg: #080d1a;
  --play-surface: #111a2d;
  --play-border: rgba(148, 163, 184, 0.2);
  --play-text: #eef2ff;
  --play-muted: #a5b2c7;
  --play-accent: #8b7bff;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--play-bg);
}

body {
  min-height: 100vh;
  color: var(--play-text);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(91, 76, 209, 0.18), transparent 36rem),
    radial-gradient(ellipse at 92% 12%, rgba(18, 153, 190, 0.12), transparent 32rem),
    var(--play-bg) !important;
}

body header {
  border-color: var(--play-border) !important;
  background: rgba(8, 13, 26, 0.88) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body header :not(.material-symbols-outlined) {
  font-family: Inter, "Public Sans", system-ui, sans-serif !important;
  font-style: normal !important;
}

body header a {
  color: #dbe4f5;
}

body header nav a {
  color: #e8edf7 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

body header a > span.text-xl {
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em;
  line-height: 1.3 !important;
}

body header input {
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

body header nav a:hover {
  color: #c4b5fd !important;
}

body header nav a[href="index.html"] {
  color: #f8faff !important;
}

body header a > span.text-xl,
body footer a > span.text-lg {
  color: #f8faff !important;
}

body header a > span.text-xl > span,
body footer a > span.text-lg > span {
  color: #a99aff !important;
}

body header input {
  color: var(--play-text) !important;
  border: 1px solid var(--play-border) !important;
  background: #0d1525 !important;
}

body header input::placeholder {
  color: var(--play-muted) !important;
}

body main > section:not(:first-child) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body main :is(h1, h2, h3, h4, h5, h6) {
  color: var(--play-text) !important;
}

body main :is(.text-slate-900, .text-slate-800, .text-slate-700) {
  color: var(--play-text) !important;
}

body main :is(.text-slate-600, .text-slate-500, .text-slate-400) {
  color: var(--play-muted) !important;
}

body main .filter-btn:not(.bg-primary) {
  color: #e8edf7 !important;
  border: 1px solid var(--play-border);
  background: linear-gradient(145deg, #18243c, #0d1525) !important;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.05) inset, 0 5px 0 rgba(5, 9, 18, 0.42);
}

body main .filter-btn:not(.bg-primary):hover {
  border-color: rgba(139, 123, 255, 0.6);
  background: #1b2944 !important;
}

body main > section#popular-games > div.mt-12 a[href="doge2048/index.html"] {
  color: #f8faff !important;
  border-color: rgba(139, 123, 255, 0.45) !important;
  background: linear-gradient(145deg, #293868, #172344) !important;
  box-shadow: 0 5px 0 rgba(5, 9, 18, 0.5), 0 14px 28px rgba(0, 0, 0, 0.25);
}

body main > section#popular-games > div.mt-12 a[href="doge2048/index.html"]:hover {
  border-color: rgba(196, 181, 253, 0.8) !important;
  transform: translateY(-3px);
}

body main > section:last-of-type > .mt-4 span {
  color: #e8edf7 !important;
  border: 1px solid var(--play-border);
  background: linear-gradient(145deg, #1b2944, #111a2d) !important;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.04) inset, 0 4px 12px rgba(0, 0, 0, 0.2);
}

body #featured-game > .group {
  border: 1px solid var(--play-border);
  background: linear-gradient(145deg, #18243c, #0d1525) !important;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 9px 0 rgba(5, 9, 18, 0.55),
    0 22px 44px rgba(0, 0, 0, 0.3);
}

body #featured-game > .group:hover {
  border-color: rgba(139, 123, 255, 0.6);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 5px 0 rgba(5, 9, 18, 0.55),
    0 28px 56px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(110, 94, 240, 0.16);
}

body #featured-game p,
body #featured-game .text-slate-500,
body #featured-game .text-slate-600 {
  color: var(--play-muted) !important;
}

body #featured-game > div:first-child {
  gap: 20px;
  margin-bottom: 24px;
}

body #featured-game > div:first-child h2 {
  margin: 0;
}

body #featured-game > div:first-child a {
  flex-shrink: 0;
  padding: 9px 14px;
  border: 1px solid rgba(139, 123, 255, 0.35);
  border-radius: 999px;
  background: rgba(139, 123, 255, 0.12);
  color: #c4b5fd !important;
  line-height: 1.3;
  white-space: nowrap;
}

body .game-card-hover {
  overflow: hidden;
  border: 1px solid var(--play-border);
  background: linear-gradient(145deg, #18243c, #0d1525) !important;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 9px 0 rgba(5, 9, 18, 0.55),
    0 22px 44px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

body .game-card-hover:hover {
  border-color: rgba(139, 123, 255, 0.6);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 5px 0 rgba(5, 9, 18, 0.55),
    0 28px 56px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(110, 94, 240, 0.16);
  transform: translateY(-5px);
}

body .game-card-hover h4,
body .game-card-hover p {
  color: var(--play-text) !important;
}

body .game-card-hover p {
  color: var(--play-muted) !important;
}

body .game-card-hover > a[aria-label="Play Game"]:focus-visible,
body .game-card-hover a:not([aria-label]):focus-visible,
body .filter-btn:focus-visible,
body main a:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 3px;
}

body footer {
  border-color: var(--play-border) !important;
  background: #070b14 !important;
}

body footer :is(h1, h2, h3, h4, h5, h6) {
  color: var(--play-text) !important;
}

body footer p,
body footer li,
body footer a,
body footer label {
  color: var(--play-muted) !important;
}

body footer a:hover {
  color: var(--play-accent) !important;
}

body footer input {
  color: var(--play-text) !important;
}

body footer input::placeholder {
  color: var(--play-muted) !important;
}

@keyframes play-card-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body .game-card-hover {
  animation: play-card-enter 480ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

body .game-card-hover:nth-child(3n + 2) {
  animation-delay: 60ms;
}

body .game-card-hover:nth-child(3n) {
  animation-delay: 120ms;
}

@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;
  }
}
