* {
  box-sizing: border-box;
}

:root {
  --bg: #080d1c;
  --text: #f7f8ff;
  --muted: #aeb7d8;
  --card: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.14);
  --blue: #00d4ff;
  --violet: #7c5cff;
  --gold: #ffd166;
  --green: #2cff8f;
  --red: #ff4d6d;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(124, 92, 255, 0.28), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(0, 212, 255, 0.22), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(255, 209, 102, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

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

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}

.logo {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.counter {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255,255,255,0.07);
  font-weight: 800;
}

.intro {
  text-align: center;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.subtitle {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.45;
}

.games {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.game-card {
  min-height: 280px;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0,0,0,0.28);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.game-card:nth-child(4),
.game-card:nth-child(5) {
  grid-column: span 3;
}

.game-card::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  opacity: 0.32;
}

.game-card:hover {
  transform: translateY(-7px);
  background: var(--card-hover);
  border-color: rgba(255,255,255,0.32);
}

.icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255,255,255,0.13);
  font-size: 35px;
  position: relative;
  z-index: 1;
}

.content {
  position: relative;
  z-index: 1;
}

.game-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
  font-size: 16px;
}

.play {
  width: fit-content;
  position: relative;
  z-index: 1;
  padding: 11px 16px;
  border-radius: 15px;
  background: rgba(255,255,255,0.14);
  font-weight: 900;
}

.maze::before { background: var(--blue); }
.colonizer::before { background: var(--violet); }
.tamagotchi::before { background: var(--gold); }
.snake::before { background: var(--green); }
.evolution::before { background: var(--red); }

.next {
  margin-top: 22px;
  padding: 26px;
  border-radius: 26px;
  border: 1px dashed rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.045);
  text-align: center;
}

.next h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.next p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

  .game-card,
  .game-card:nth-child(4),
  .game-card:nth-child(5) {
    grid-column: auto;
    min-height: 230px;
  }

  .topline {
    margin-bottom: 40px;
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topline {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .game-card {
    padding: 20px;
    border-radius: 24px;
  }
}


.rift::before {
    background: #ff6b6b;
}