:root {
  --crimson: #c8152a;
  --gold: #f5c842;
  --amber: #e8833a;
  --dark-bg: #0a0205;
  --mid-bg: #130608;
  --card-bg: #1a080b;
  --border: #3a1218;
  --text-main: #e8d4b8;
  --text-muted: #a88972;
  --glow: rgba(200, 21, 42, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--dark-bg);
  color: var(--text-main);
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 2px solid var(--border);
  background: linear-gradient(180deg, #0d0204 0%, #1a0408 100%);
}

.logo-area {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-area img {
  width: 48px;
  height: 48px;
  border: 2px solid var(--crimson);
  border-radius: 6px;
  image-rendering: pixelated;
}

.logo-text {
  color: var(--gold);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1.45;
  text-shadow: 0 0 12px rgba(245, 200, 66, 0.5);
}

.logo-text span {
  display: block;
  margin-top: 4px;
  color: var(--amber);
  font-size: 8px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.2vw, 28px);
}

.main-nav a {
  color: var(--text-main);
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--gold);
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.breadcrumb {
  padding: 28px 0 12px;
  color: var(--text-muted);
  font-size: 15px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 8px;
  color: var(--crimson);
  content: "›";
}

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

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

.category-hero {
  position: relative;
  padding: clamp(28px, 5vw, 58px) clamp(22px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    radial-gradient(circle at 85% 20%, rgba(200, 21, 42, 0.2), transparent 28%),
    linear-gradient(135deg, #1d080c, #0d0305 68%);
}

.category-hero::after {
  position: absolute;
  right: clamp(20px, 6vw, 78px);
  bottom: -46px;
  color: rgba(245, 200, 66, 0.06);
  content: "⚔";
  font-size: clamp(130px, 22vw, 260px);
  line-height: 1;
  transform: rotate(-12deg);
}

.eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  color: var(--amber);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(8px, 1.4vw, 10px);
  letter-spacing: 1px;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  color: var(--gold);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(25px, 5vw, 54px);
  line-height: 1.25;
  text-shadow: 4px 4px 0 #650b18, 0 0 28px var(--glow);
}

.intro-section,
.authority-section {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 74px) 0;
}

.intro-section p,
.authority-section p {
  margin-top: 16px;
}

.intro-section p:first-of-type,
.authority-section p:first-of-type {
  margin-top: 0;
}

.section-heading,
.authority-section h2,
.explore-section h2 {
  color: var(--gold);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(16px, 2.7vw, 25px);
  line-height: 1.5;
}

.authority-section h3 {
  margin-top: 30px;
  color: var(--amber);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(12px, 2vw, 16px);
  line-height: 1.5;
}

.games-section {
  padding: clamp(38px, 6vw, 64px) 0;
  border-block: 1px solid var(--border);
}

.games-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.games-note {
  color: var(--text-muted);
  font-size: 15px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  min-height: 72px;
}

.game-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--text-main);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: var(--crimson);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 18px var(--glow);
  transform: translateY(-3px);
}

.game-thumb {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #230a0f;
}

.game-thumb::after {
  display: grid;
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(245, 200, 66, 0.55);
  border-radius: 50%;
  background: rgba(10, 2, 5, 0.82);
  color: var(--gold);
  content: "▶";
  font-size: 10px;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.game-card:hover .game-thumb img,
.game-card:focus-visible .game-thumb img {
  transform: scale(1.04);
}

.game-card-body {
  display: flex;
  min-height: 58px;
  padding: 12px 11px;
  flex-direction: column;
  justify-content: center;
}

.game-card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-main);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.explore-section {
  padding: clamp(42px, 7vw, 76px) 0;
  border-top: 1px solid var(--border);
}

.category-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.category-link {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--text-main);
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  line-height: 1.45;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.category-link::after {
  color: var(--crimson);
  content: "›";
  font-family: Georgia, serif;
  font-size: 28px;
}

.category-link:hover,
.category-link:focus-visible {
  border-color: var(--crimson);
  color: var(--gold);
  transform: translateY(-2px);
}

.site-footer {
  padding: 38px 20px 30px;
  border-top: 2px solid var(--border);
  background: #080103;
  text-align: center;
}

.footer-logo {
  margin-bottom: 20px;
  color: var(--gold);
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 15px;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold);
}

.footer-copy {
  margin-top: 22px;
  color: #6d5547;
  font-size: 14px;
}

@media (max-width: 850px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 3px;
    overflow-x: auto;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 851px) and (max-width: 1100px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .logo-text span {
    display: none;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
  }

  .category-hero {
    padding-inline: 20px;
  }

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

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

  .game-card-body {
    min-height: 78px;
    padding: 10px 9px;
  }

  .game-card-title {
    font-size: 7px;
  }

  .category-links {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
