:root {
  --bg: #0a0d8e86;
  --panel: rgba(255, 255, 255, 0.065);
  --panel-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.58);
  --soft: rgba(255, 255, 255, 0.38);
  --blue: #8ab4ff;
  --pink: #ff8fb7;
  --green: #8bffb0;
  --yellow: #ffd36a;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #050816;
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--bg);

  background-image:
    linear-gradient(rgba(2, 3, 36, 0.471) 1px, transparent 1.2px),
    linear-gradient(90deg, rgba(3, 4, 43, 0.454) 1px, transparent 1.2px);
  color: var(--text);

  background-size: 42px 42px;
  background-position: top center;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;

  background-color: #06073d4f;

  background-size: 42px 42px;
  display: none;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to bottom,
    rgba(5, 5, 81, 0.524),
    rgba(6, 9, 74, 0.54)
  );

  pointer-events: none;
}

.page-wrap {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
  padding: 24px 0 70px;
}

/* =====================
   TOP BAR
===================== */

.site-topbar {
  position: relative;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 62px;
  padding: 0 14px;
}

.site-logo {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 15px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.menu-toggle {
  width: 44px;
  height: 44px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);

  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);

  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover,
.menu-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: white;
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.menu-toggle {
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  width: 20px;
  height: 2px;

  border-radius: 999px;
  background: currentColor;

  transition:
    transform 0.28s ease,
    opacity 0.28s ease;
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =====================
   SIDE MENU
===================== */

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;

  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease;
}

.menu-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000;

  width: 20vw;
  min-width: 280px;
  max-width: 420px;
  height: 100vh;

  padding: 28px;
  border-left: 1px solid rgba(255,255,255,.14);
  background: rgba(0, 0, 50, 0.5);
  box-shadow: -30px 0 80px rgba(0,0,0,.45);

  transform: translateX(100%);
  transition: transform 0.28s ease;
}

.side-menu.show {
  transform: translateX(0);
}

.side-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.side-menu-kicker {
  margin: 0 0 6px;

  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-menu h2 {
  margin: 0;

  color: white;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.side-menu-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.side-menu-links a {
  padding: 13px 14px;

  border-radius: 16px;

  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;

  font-size: 15px;
  font-weight: 850;

  background: rgba(255, 255, 255, 0.045);
  border: 1px solid transparent;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.side-menu-links a:hover,
.side-menu-links a.active {
  color: white;
  background: rgba(138, 180, 255, 0.12);
  border-color: rgba(138, 180, 255, 0.22);
  transform: translateX(-2px);
}

.side-menu-bottom {
  margin-top: auto;
  padding-top: 18px;
}

.menu-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0);
  background: rgba(255,255,255,.08);
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.menu-close:hover {
  background: rgba(255,255,255,.14);
}

.support-button {
  position: relative;

  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 14px 15px;

  border-radius: 18px;
  border: 1px solid rgba(143, 156, 255, 0.32);

  background:
    radial-gradient(circle at top right, rgba(143, 162, 255, 0.28), transparent 45%),
    rgba(143, 158, 255, 0.1);

  color: white;
  text-decoration: none;

  overflow: hidden;

  box-shadow:
    0 16px 45px rgba(79, 100, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.support-button::before {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.16),
    transparent
  );

  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.support-button:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 156, 255, 0.58);

  background:
    radial-gradient(circle at top right, rgba(143, 151, 255, 0.38), transparent 45%),
    rgba(143, 149, 255, 0.16);

  box-shadow:
    0 20px 60px rgba(79, 103, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.support-button:hover::before {
  transform: translateX(120%);
}

.support-icon {
  width: 38px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  border-radius: 14px;

  color: #008cff;

  font-size: 35px;
  font-weight: 900;
}

.support-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.support-text strong {
  color: white;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* =====================
   HERO
===================== */

.minigames-main {
  padding-top: 95px;
}

.minigames-hero {
  width: min(780px, 100%);
  margin: 0 auto 46px;

  text-align: center;
}

.minigames-hero h1 {
  margin: 0;

  color: white;
  font-size: clamp(54px, 9vw, 118px);
  line-height: 0.82;
  letter-spacing: -0.09em;
}

.hero-text {
  width: min(620px, 100%);
  margin: 26px auto 0;

  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  font-weight: 650;
}

/* =====================
   GAME CARDS
===================== */

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

.game-card {
  position: relative;

  min-height: 310px;
  padding: 22px;

  display: flex;
  flex-direction: column;

  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.25);

  background:
    radial-gradient(circle at top right, rgba(14, 49, 208, 0.20), transparent 50%),
    rgba(0, 74, 127, 0.5);

  color: white;
  text-decoration: none;

  overflow: hidden;

  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  transition:
    transform 0.26s ease,
    border-color 0.26s ease,
    background 0.26s ease,
    box-shadow 0.26s ease;
}

.game-card::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255, 255, 255, 0.08),
      transparent
    );

  transform: translateX(-120%);
  transition: transform 0.65s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(135, 235, 255, 0.35);

  background:
    radial-gradient(circle at top right, rgba(125, 205, 255, 0.20), transparent 50%),
    rgba(34, 183, 224, 0.553);

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(138, 218, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.game-card:hover::before {
  transform: translateX(120%);
}

.game-card.coming-soon {
  opacity: 0.72;
}

.game-card.coming-soon:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.13);
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  margin-bottom: 22px;
}

.game-status,
.game-tag {
  width: fit-content;

  padding: 6px 9px;
  border-radius: 999px;

  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-status.playable {
  color: rgba(5, 7, 22, 0.95);
  background: rgba(139, 255, 176, 0.88);
}

.game-status.soon {
  color: rgba(255, 255, 255, 0.60);
  background: rgba(255, 255, 255, 0.08);
}

.game-tag {
  color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.07);
}

.game-icon {
  width: 64px;
  height: 64px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;

  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: 15px;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 16px 38px rgba(0, 0, 0, 0.18);
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: #0b143bc2;
}

.game-card h2 {
  margin: 0 0 12px;

  color: white;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.game-card p {
  margin: 0;

  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 650;
}

.game-card-bottom {
  margin-top: auto;
  padding-top: 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 900;
}

.arrow {
  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.08);
  color: white;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.game-card:hover .arrow {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.14);
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 820px) {
  .page-wrap {
    width: min(1180px, calc(100% - 34px));
    margin: 0 auto;
    padding: 24px 0 70px;
    background: transparent;
  }

  .site-topbar {
    height: 58px;
    border-radius: 19px
  }

  .minigames-main {
    padding-top: 70px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 280px;
  }

  .side-menu {
    top: 82px;
    right: 12px;
    bottom: auto;

    width: calc(100vw - 24px);
    max-height: calc(100dvh - 100px);

    padding: 18px;
    border-radius: 22px;

    overflow-y: auto;

    justify-content: flex-start;
  }

  .side-menu h2 {
    font-size: 28px;
  }

  .side-menu-links {
    gap: 7px;
  }

  .side-menu-links a {
    padding: 11px 12px;
    border-radius: 14px;
    font-size: 14px;
  }

  .side-menu-bottom {
    margin-top: 18px;
    padding-top: 14px;
  }

  .support-button {
    padding: 12px;
    border-radius: 16px;
  }

  .support-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
}

/* Footer */
footer {
  margin:50px 0 0;
  padding:20px;
  color:var(--muted);
  text-align:center;
}