:root {
  --bg: #1a1c32;
  --text: #eef1ff;
  --muted: #c1c7e6;
  --panel: rgba(32, 36, 72, 0.78);
  --panel-border: rgba(120, 140, 220, 0.35);
  --dot: rgba(140, 170, 255, 0.4);
  --accent: #2a8cff;
  --accent-strong: #1f70ff;
  --shadow: 0 18px 38px rgba(7, 10, 24, 0.6);
  --outline: rgba(255, 255, 255, 0.25);
}

body[data-theme="light"] {
  --bg: #eef1ff;
  --text: #1a1c32;
  --muted: #4f587a;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-border: rgba(26, 28, 50, 0.2);
  --dot: rgba(26, 28, 50, 0.18);
  --shadow: 0 18px 38px rgba(26, 28, 50, 0.18);
  --outline: rgba(26, 28, 50, 0.25);
}

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

body {
  font-family: "Space Grotesk", "Manrope", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

.dot-field {
  position: fixed;
  inset: -35%;
  z-index: 0;
  background-color: var(--bg);
  overflow: hidden;
}

.dot-field::before,
.dot-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    var(--dot) 1.4px,
    transparent 1.7px
  );
  background-size: 32px 32px;
  opacity: 0.55;
  transform-origin: center;
  animation: star-drift 180s linear infinite, star-twinkle 12s ease-in-out infinite;
  will-change: transform, opacity;
}

.dot-field::after {
  background-image: radial-gradient(
    circle,
    rgba(190, 210, 255, 0.45) 2px,
    transparent 2.4px
  );
  background-size: 52px 52px;
  opacity: 0.35;
  animation-duration: 260s, 16s;
  animation-delay: -40s, -4s;
}

@keyframes star-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-320px, 0, 0) scale(1);
  }
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.7;
  }
}

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

.glow {
  transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease,
    color 0.25s ease;
}

.glow:hover {
  box-shadow: 0 0 0 1px rgba(42, 140, 255, 0.6),
    0 0 24px rgba(42, 140, 255, 0.45);
  transform: translateY(-1px);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 52px 0;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.subnav {
  position: relative;
  z-index: 2;
  margin: 16px 52px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 18px;
  width: fit-content;
}

.subnav-link {
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.store-group {
  position: relative;
}

.store-toggle .arrow {
  display: inline-block;
  margin-left: 8px;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.store-toggle[aria-expanded="true"] .arrow {
  transform: rotate(-135deg);
}

.dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  min-width: 180px;
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.25s ease;
}

.dropdown.open {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
  pointer-events: auto;
}

.dropdown-link {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 80px 52px 40px;
}

.hero-content {
  max-width: 720px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.bolt {
  font-size: 1.1rem;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.2rem, 2.6vw + 1.5rem, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2ad2ff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(42, 140, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(42, 140, 255, 0.6),
    0 0 24px rgba(42, 140, 255, 0.5);
}

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

.btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--outline);
}

.wide {
  width: 100%;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 40px 52px;
}

.game-card {
  position: relative;
  border-radius: 22px;
  padding: 150px 22px 22px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 115px;
  background-image: var(--banner);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.game-card h3 {
  font-size: 1.4rem;
}

.game-card p {
  color: var(--muted);
  line-height: 1.5;
}

.slim-section {
  padding: 20px 52px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.slim-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.slim-card {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px 18px;
  min-height: 110px;
  box-shadow: var(--shadow);
}

.slim-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.slim-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.ping-section {
  padding: 40px 52px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ping-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 18px;
}

.ping-bar h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.region-card {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.region-card h4 {
  font-size: 1.05rem;
}

.city-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.city-row:last-child {
  border-bottom: none;
}

.city-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.ping-value {
  min-width: 34px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.ping-value.low {
  color: #a8ffd0;
  background: rgba(40, 200, 120, 0.22);
  border: 1px solid rgba(40, 200, 120, 0.45);
}

.ping-value.med {
  color: #ffe8a2;
  background: rgba(240, 190, 60, 0.2);
  border: 1px solid rgba(240, 190, 60, 0.45);
}

.ping-value.high {
  color: #ffb3b3;
  background: rgba(240, 90, 90, 0.2);
  border: 1px solid rgba(240, 90, 90, 0.45);
}

.dedicated-section {
  padding: 20px 52px 30px;
}

.dedicated-card {
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dedicated-card h2 {
  font-size: clamp(1.8rem, 2.2vw + 1rem, 2.7rem);
}

.location-bar {
  padding: 10px 12px;
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
}

.location-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  font-weight: 600;
}

.dedicated-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.perks-section {
  padding: 10px 52px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.perks-header {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  width: fit-content;
}

.perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.perk-card {
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perk-card p {
  color: var(--muted);
  line-height: 1.45;
}

.feature-panels {
  padding: 20px 52px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-list li {
  position: relative;
  padding-left: 16px;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.feature-tip {
  font-size: 0.9rem;
  color: var(--muted);
}

.feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.cta-wide {
  padding: 10px 52px 100px;
}

.cta-card {
  border-radius: 24px;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cta-copy {
  max-width: 640px;
}

.cta-card h2 {
  font-size: clamp(1.7rem, 2.1vw + 1rem, 2.5rem);
  margin-bottom: 8px;
}

.cta-card p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px 0;
  }

  .subnav {
    margin: 16px 24px 0;
    flex-wrap: wrap;
  }

  .hero {
    padding: 70px 24px 30px;
  }

  .game-grid,
  .slim-section,
  .ping-section,
  .dedicated-section,
  .perks-section,
  .feature-panels,
  .cta-wide {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 600px) {
  .top-actions {
    flex-wrap: wrap;
    border-radius: 18px;
  }

  .nav-btn {
    padding: 6px 10px;
  }

  .hero {
    min-height: auto;
  }
}
