:root {
  --bg: #0f0f10;
  --panel: #121212;
  --card: #161616;
  --text: #f6f6f6;
  --muted: #cfcfd3;
  --primary: #ff4f8b;
  --primary-2: #ff7cad;
  --shadow: rgba(0, 0, 0, 0.45);
  --outline: #1f1f1f;
}

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

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.page {
  width: 100%;
  max-width: 1200px;
  padding: 32px 22px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.logo-circle {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #151515;
  border: 2px solid #202020;
  box-shadow: 0 14px 28px var(--shadow), 0 0 0 8px rgba(255, 79, 139, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-circle img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.domain-pill {
  padding: 9px 18px;
  background: #0c0c0c;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #f7f7f7;
  box-shadow: 0 12px 20px var(--shadow), inset 0 0 0 1px var(--outline);
}

.content {
  width: 100%;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.rank-banner {
  position: relative;
  background: linear-gradient(125deg, var(--primary) 0%, #ff6ea6 55%, #ff90b7 100%);
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 26px 42px rgba(255, 79, 139, 0.3), 0 18px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  min-height: 260px;
  z-index: 1;
}

.rank-banner::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 60%);
  top: -80px;
  left: -120px;
}

.rank-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.rank-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.08);
  object-fit: contain;
}

h1 {
  margin: 0;
  font-size: 24px;
  color: #ffffff;
}

.subtitle {
  margin: 2px 0 0;
  color: #ffe6f1;
  font-weight: 500;
}

.perk-list {
  list-style: none;
  padding: 12px 0 6px;
  margin: 0;
  color: #ffe6f0;
  column-count: 1;
}

.perk-list li {
  margin: 4px 0;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.perk-list li::before {
  content: "+";
  font-weight: 700;
  color: #ffffff;
  transform: translateY(-1px);
}

.agent-figure {
  position: absolute;
  right: 14px;
  bottom: -18px;
  width: 320px;
  height: 280px;
  pointer-events: none;
}

.agent-avatar {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 320px;
  height: auto;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.45));
  transform: translateY(6px) rotate(6deg);
  object-fit: contain;
  max-width: 52vw;
}

.pink-glow {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.35), rgba(255, 79, 139, 0.24), transparent 70%);
  filter: blur(0.5px);
}

.crate-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin-top: 38px;
}

.crate-card {
  position: relative;
  background: var(--card);
  border-radius: 16px;
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: 0 20px 34px var(--shadow), 0 0 0 1px var(--outline);
  min-height: 214px;
}

.crate-card h3 {
  margin: 10px 0 2px;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.crate-card .price {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.packs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pack {
  background: #0e0e0f;
  color: #ededed;
  border-radius: 8px;
  padding: 7px 11px;
  border: 1px solid var(--outline);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pack:hover {
  border-color: var(--primary);
  color: #ffffff;
}

.pack.active {
  background: #1d1d1f;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(255, 79, 139, 0.55);
}

.cta {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 10px;
  padding: 10px 0;
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(255, 79, 139, 0.45), 0 4px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(255, 79, 139, 0.5), 0 6px 12px rgba(0, 0, 0, 0.55);
}

.cta:active {
  transform: translateY(0);
}

.key-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 10px;
  position: relative;
  color: #ffffff;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.key-icon::before {
  content: "";
  position: absolute;
  inset: 7px 8px;
  border-radius: 12px;
  border: 5px solid currentColor;
  opacity: 0.9;
}

.key-icon::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 12px;
  background: currentColor;
  top: 50%;
  right: -18px;
  transform: translateY(-50%) rotate(-14deg);
  border-radius: 6px;
  box-shadow: -20px 8px 0 0 currentColor;
}

.key-green {
  color: #6ee37b;
}

.key-blue {
  color: #68b7ff;
}

.key-gold {
  color: #ffc246;
}

.key-purple {
  color: #c28bff;
}

.key-red {
  color: #ff5c5c;
}

.money-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
}

.spawner-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
}

.axe-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

.pickaxe-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
}

.rank-icon-img {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45));
}

.chip {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f68dc9;
  color: #200916;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(246, 141, 201, 0.35);
}

.footer {
  margin-top: 48px;
  width: 100%;
  background: #121212;
  border-radius: 16px 16px 0 0;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -10px 24px var(--shadow), 0 0 0 1px var(--outline);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-left img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #9c9ca3;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-links a:hover {
  color: #ffffff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #121218;
  border-radius: 14px;
  padding: 22px 22px 18px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--outline);
  position: relative;
}

.modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.modal-title-accent {
  color: var(--primary-2);
}

.modal-price {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 600;
}

.modal-steps {
  margin: 0;
  padding-left: 18px;
  color: #e9e9ec;
  line-height: 1.45;
}

.modal-steps li {
  margin: 6px 0;
  font-size: 14px;
}

.modal-steps a {
  color: var(--primary-2);
  text-decoration: none;
  font-weight: 700;
}

.modal-steps a:hover {
  color: #ffffff;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--outline);
  background: #0f0f12;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 900px) {
  .rank-banner {
    flex-direction: column;
    min-height: 280px;
  }

  .agent-figure {
    position: relative;
    width: 100%;
    height: 240px;
    margin-top: 6px;
    right: auto;
    bottom: auto;
  }

  .agent-avatar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(6px) rotate(4deg);
    right: auto;
    bottom: 0;
    width: 240px;
    max-width: 70vw;
  }

  .pink-glow {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .page {
    padding: 24px 16px 36px;
  }

  h1 {
    font-size: 20px;
  }

  .domain-pill {
    font-size: 13px;
  }

  .crate-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}
