:root {
  --bg: #0b1020;
  --bg-soft: #131a30;
  --card: #18203a;
  --text: #edf1ff;
  --muted: #b4bdd7;
  --accent: #5da5ff;
  --accent-strong: #3c86e6;
  --border: #2a355a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top, #1b2550, var(--bg) 50%);
  color: var(--text);
  line-height: 1.55;
}

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

p {
  white-space: normal;
  overflow-wrap: break-word;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(11, 16, 32, 0.7);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 3rem 0 3rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 0;
}

.hero-copy {
  color: var(--muted);
  margin-top: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.7rem 1.1rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #071025;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-strong);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  padding: 3rem 0;
}

#games {
  padding-bottom: 3.5rem;
}

.section-alt {
  background: rgba(15, 21, 40, 0.7);
  border-block: 1px solid var(--border);
}

.section-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-head p {
  color: var(--muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

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

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  cursor: pointer;
}

.game-card.no-image {
  background: linear-gradient(180deg, rgba(93, 165, 255, 0.09), transparent),
    var(--card);
}

.game-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.game-trailer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  overflow: hidden;
}

.game-trailer iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, calc(100% * 16 / 9));
  height: max(100%, calc(100% * 9 / 16));
  transform: translate(-50%, -50%);
  border: 0;
}

.game-card.trailer-active .game-trailer {
  opacity: 1;
  inset: -0.75rem;
  z-index: 3;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.game-card.trailer-active .game-media {
  opacity: 0;
}

.game-card.trailer-active {
  overflow: visible;
  z-index: 4;
}

.game-card.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 10, 20, 0.18) 0%,
    rgba(6, 10, 20, 0.72) 55%,
    rgba(6, 10, 20, 0.88) 100%
  );
  z-index: 1;
}

.game-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  height: 100%;
}

.game-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.game-card p {
  margin: 0;
  color: #dbe5ff;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  border: 1px solid var(--border);
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #d6e4ff;
  background: rgba(8, 13, 26, 0.45);
}

.card-link {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
  color: #c8e0ff;
}

.about-copy {
  color: var(--muted);
}

.links-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.links-list a {
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer p {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 640px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .site-header .container {
    flex-direction: column;
    justify-content: center;
    padding: 0.55rem 0 0.75rem;
    gap: 0.35rem;
  }

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