:root {
  --bg-night: #070b14;
  --bg-dusk: #2a1f3b;
  --bg-sunset: #6d3346;
  --panel: rgba(18, 15, 28, 0.76);
  --line: rgba(255, 170, 106, 0.28);
  --text: #fff3e7;
  --muted: #e1c0ad;
  --accent-gold: #ffd95d;
  --accent-orange: #ff9350;
  --accent-rose: #cf6d8e;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

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

body {
  font-family: "Rajdhani", sans-serif;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 217, 93, 0.2), transparent 26%),
    radial-gradient(circle at 68% 24%, rgba(255, 147, 80, 0.24), transparent 34%),
    radial-gradient(circle at 18% 8%, rgba(207, 109, 142, 0.2), transparent 36%),
    linear-gradient(140deg, var(--bg-night), var(--bg-dusk) 54%, var(--bg-sunset));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 170, 106, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 170, 106, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 24px 0 34px;
  position: relative;
  z-index: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(9px);
}

.top-panel {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

h1,
h2 {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h1 {
  font-size: clamp(1.38rem, 3.4vw, 2.15rem);
  line-height: 1.2;
}

.subtitle {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.08rem;
}

.back-btn {
  text-decoration: none;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.back-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 147, 80, 0.16);
  border-color: rgba(255, 190, 126, 0.45);
}

.games-grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.game-card {
  padding: 13px;
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 200, 142, 0.52);
}

.game-art {
  height: 170px;
  border-radius: 12px;
  border: 1px solid rgba(255, 190, 126, 0.35);
}

.bomber-art {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 214, 138, 0.55), transparent 22%),
    radial-gradient(circle at 72% 64%, rgba(255, 132, 78, 0.55), transparent 27%),
    linear-gradient(135deg, #2d223f, #432b47 45%, #5d2f3d);
  position: relative;
}

.bomber-art::before,
.bomber-art::after {
  content: "";
  position: absolute;
  border-radius: 8px;
}

.bomber-art::before {
  width: 44%;
  height: 36%;
  left: 10%;
  top: 16%;
  border: 2px solid rgba(255, 225, 160, 0.72);
}

.bomber-art::after {
  width: 28%;
  height: 28%;
  right: 12%;
  bottom: 18%;
  background: rgba(255, 121, 78, 0.8);
  box-shadow: 0 0 26px rgba(255, 121, 78, 0.45);
}

.snake-art {
  background:
    linear-gradient(135deg, rgba(111, 255, 151, 0.15), rgba(79, 212, 255, 0.18)),
    repeating-linear-gradient(
      to right,
      rgba(111, 255, 151, 0.16),
      rgba(111, 255, 151, 0.16) 11px,
      rgba(20, 33, 49, 0.12) 11px,
      rgba(20, 33, 49, 0.12) 22px
    ),
    linear-gradient(130deg, #1b3246, #193f52 46%, #204f4a);
  position: relative;
}

.snake-art::before {
  content: "";
  position: absolute;
  width: 64%;
  height: 18%;
  left: 12%;
  top: 54%;
  border-radius: 999px;
  background: linear-gradient(90deg, #87ff6d, #cbff8a);
  box-shadow: 0 0 22px rgba(135, 255, 109, 0.35);
}

.snake-art::after {
  content: "";
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  right: 12%;
  top: 18%;
  border-radius: 50%;
  background: #ffb066;
  box-shadow: 0 0 20px rgba(255, 176, 102, 0.42);
}

.tetris-art {
  background:
    linear-gradient(140deg, rgba(79, 212, 255, 0.16), rgba(158, 240, 26, 0.15)),
    linear-gradient(130deg, #1f2c42, #243a4f 46%, #2f3048);
  position: relative;
}

.tetris-art::before,
.tetris-art::after {
  content: "";
  position: absolute;
  border-radius: 7px;
}

.tetris-art::before {
  width: 44%;
  height: 24%;
  left: 12%;
  top: 18%;
  background: #4fd4ff;
  box-shadow:
    52px 0 0 #4fd4ff,
    52px 42px 0 #4fd4ff,
    0 42px 0 #9ef01a,
    104px 42px 0 #9ef01a;
}

.tetris-art::after {
  width: 18%;
  height: 18%;
  right: 16%;
  bottom: 20%;
  background: #ff9350;
  box-shadow:
    -38px 0 0 #ff9350,
    0 -38px 0 #ffd95d,
    -38px -38px 0 #ffd95d;
}

.breakout-art {
  background:
    radial-gradient(circle at 26% 30%, rgba(255, 191, 105, 0.5), transparent 24%),
    linear-gradient(135deg, #1f2c42, #312841 46%, #50324a);
  position: relative;
}

.breakout-art::before,
.breakout-art::after {
  content: "";
  position: absolute;
}

.breakout-art::before {
  width: 64%;
  height: 14%;
  left: 18%;
  bottom: 12%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9f67, #ffd166);
}

.breakout-art::after {
  width: 12%;
  aspect-ratio: 1;
  left: 58%;
  top: 34%;
  border-radius: 50%;
  background: #f4f6ff;
  box-shadow:
    -64px -8px 0 -10px rgba(111, 255, 151, 0.9),
    -24px -8px 0 -10px rgba(111, 255, 151, 0.9),
    16px -8px 0 -10px rgba(111, 255, 151, 0.9),
    -64px 18px 0 -10px rgba(79, 212, 255, 0.9),
    -24px 18px 0 -10px rgba(79, 212, 255, 0.9),
    16px 18px 0 -10px rgba(79, 212, 255, 0.9);
}

.invaders-art {
  background:
    radial-gradient(circle at 74% 20%, rgba(79, 212, 255, 0.34), transparent 30%),
    linear-gradient(130deg, #11253d, #253753 48%, #3b3150);
  position: relative;
}

.invaders-art::before,
.invaders-art::after {
  content: "";
  position: absolute;
}

.invaders-art::before {
  width: 54%;
  height: 14%;
  left: 22%;
  top: 20%;
  border-radius: 8px;
  background: rgba(255, 210, 123, 0.85);
  box-shadow:
    0 36px 0 rgba(125, 229, 142, 0.85),
    0 72px 0 rgba(92, 215, 255, 0.85);
}

.invaders-art::after {
  width: 26%;
  height: 12%;
  left: 37%;
  bottom: 14%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7bd8ff, #d1f6ff);
}

.puzzle-art {
  background:
    linear-gradient(135deg, rgba(255, 214, 138, 0.16), rgba(255, 135, 108, 0.16)),
    linear-gradient(130deg, #1f2d42, #2e3248 48%, #48364e);
  position: relative;
}

.puzzle-art::before {
  content: "";
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  left: 19%;
  top: 12%;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.08);
  background-size: 25% 25%, 25% 25%, auto;
}

.pong-art {
  background:
    radial-gradient(circle at 72% 20%, rgba(79, 212, 255, 0.3), transparent 26%),
    linear-gradient(130deg, #172b41, #2b3249 46%, #42384e);
  position: relative;
}

.pong-art::before,
.pong-art::after {
  content: "";
  position: absolute;
}

.pong-art::before {
  width: 2%;
  height: 72%;
  left: 49%;
  top: 14%;
  background: rgba(230, 247, 255, 0.42);
}

.pong-art::after {
  width: 10%;
  aspect-ratio: 1;
  left: 44%;
  top: 42%;
  border-radius: 50%;
  background: #f8fbff;
  box-shadow:
    -178px -68px 0 -16px rgba(123, 216, 255, 0.9),
    178px 66px 0 -16px rgba(255, 210, 120, 0.9);
}

.mines-art {
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 191, 105, 0.32), transparent 28%),
    linear-gradient(130deg, #17293b, #25344a 46%, #473748);
  position: relative;
}

.mines-art::before,
.mines-art::after {
  content: "";
  position: absolute;
}

.mines-art::before {
  width: 66%;
  height: 58%;
  left: 17%;
  top: 20%;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    rgba(255, 255, 255, 0.05);
  background-size: 20% 20%, 20% 20%, auto;
}

.mines-art::after {
  width: 12%;
  aspect-ratio: 1;
  left: 52%;
  top: 44%;
  border-radius: 50%;
  background: #ff7288;
  box-shadow:
    -78px -20px 0 -8px rgba(255, 217, 93, 0.95),
    56px -42px 0 -8px rgba(79, 212, 255, 0.9),
    -28px 44px 0 -8px rgba(111, 255, 151, 0.9);
}

.game-card h2 {
  margin-top: 10px;
  font-size: 1rem;
}

.game-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.06rem;
  flex-grow: 1;
}

.play-btn {
  margin-top: 14px;
  text-decoration: none;
  color: #2b1203;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-gold));
  border-radius: 999px;
  padding: 10px 18px;
  width: fit-content;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(255, 147, 80, 0.36);
}

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

@media (max-width: 760px) {
  .top-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-art {
    height: 154px;
  }
}
