:root {
  --bg: #07080d;
  --panel: #10131d;
  --panel-soft: #171b27;
  --gold: #ffd13b;
  --red: #e71945;
  --cyan: #20b9ff;
  --text: #fff7d6;
  --muted: #c7bfd3;
  --line: rgba(255, 255, 255, 0.13);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 5%, rgba(231, 25, 69, 0.35), transparent 32rem),
    radial-gradient(circle at 15% 28%, rgba(255, 209, 59, 0.16), transparent 26rem),
    linear-gradient(180deg, #08080b 0%, #101018 48%, #08080b 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black, transparent 80%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 18px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(4, 5, 8, 0.9), rgba(4, 5, 8, 0.35));
  backdrop-filter: blur(14px);
}

.nav-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 13, 19, 0.82);
  box-shadow: var(--shadow);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #161107;
  background: linear-gradient(180deg, #ffe476, #ffb324);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  padding: 46px 18px 34px;
}

.particles span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 20px var(--gold);
  animation: float 7s infinite ease-in-out;
}

.particles span:nth-child(1) { left: 10%; top: 30%; animation-delay: -1s; }
.particles span:nth-child(2) { left: 22%; top: 68%; animation-delay: -3s; background: var(--red); }
.particles span:nth-child(3) { left: 38%; top: 18%; animation-delay: -4s; }
.particles span:nth-child(4) { left: 62%; top: 70%; animation-delay: -2s; background: var(--cyan); }
.particles span:nth-child(5) { left: 78%; top: 24%; animation-delay: -5s; }
.particles span:nth-child(6) { left: 90%; top: 58%; animation-delay: -1.5s; background: var(--red); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.65; }
  50% { transform: translateY(-28px) rotate(45deg); opacity: 1; }
}

.server-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px) minmax(220px, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 50px);
  width: min(1180px, 100%);
  min-width: 0;
}

.main-logo {
  width: min(100%, 420px);
  margin: 0 auto;
  filter: drop-shadow(0 30px 35px rgba(0, 0, 0, 0.65));
  animation: logo-float 3.6s ease-in-out infinite;
}

.server-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid rgba(255, 209, 59, 0.35);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(34, 36, 48, 0.95), rgba(17, 18, 27, 0.95));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.server-pill strong {
  display: block;
  font-size: clamp(0.7rem, 1.4vw, 1rem);
  overflow-wrap: anywhere;
}

.server-pill > span:not(.pill-icon) {
  flex: 1 1 auto;
  min-width: 0;
}

.server-pill small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  text-transform: uppercase;
}

.pill-icon {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 6px;
  color: #180d0d;
  background: linear-gradient(180deg, #ffec78, #ffb21d);
  font-size: 1.3rem;
}

.store-section,
.catalog-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.feature-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.feature-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 209, 59, 0.58);
}

.feature-tile::before,
.feature-tile::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.feature-tile::before {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 32%),
    radial-gradient(circle at 80% 28%, rgba(255, 255, 255, 0.18), transparent 12rem);
}

.feature-tile::after {
  right: -24px;
  bottom: -22px;
  width: 180px;
  height: 180px;
  border: 10px solid rgba(255, 255, 255, 0.15);
  transform: rotate(12deg);
}

.rank-tile {
  background: linear-gradient(135deg, #5b1017, #e21a3f 52%, #ffcc39);
}

.crate-tile {
  background: linear-gradient(135deg, #0f2a44, #18a2d9 52%, #ffd23e);
}

.tile-badge,
.tile-title,
.tile-action {
  position: relative;
  z-index: 1;
}

.tile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tile-title {
  display: block;
  margin-top: 56px;
  font-family: "Press Start 2P", Montserrat, sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.38);
}

.tile-action {
  display: inline-block;
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 6px;
  color: #171207;
  background: #ffe068;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-section {
  padding: 76px 0 0;
}

.catalog-section--first {
  padding-top: 22px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 10px;
  text-align: center;
}

.page-logo {
  width: min(260px, 74vw);
  margin-bottom: 22px;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55));
  animation: logo-float 3.6s ease-in-out infinite;
}

@keyframes logo-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

.section-heading {
  margin-bottom: 24px;
  text-align: center;
}

.section-heading p {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: "Press Start 2P", Montserrat, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  text-transform: uppercase;
}

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

.product-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  padding: 26px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  background: linear-gradient(180deg, rgba(25, 29, 42, 0.96), rgba(12, 13, 19, 0.98));
  box-shadow: var(--shadow);
}

.product-card.featured {
  border-color: rgba(255, 209, 59, 0.58);
  transform: translateY(-10px);
}

.product-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 8px;
  color: #120f08;
  font-size: 1.55rem;
}

.product-icon.gold { background: linear-gradient(180deg, #fff078, #ffb624); }
.product-icon.red { background: linear-gradient(180deg, #ff6c88, #df183e); color: white; }
.product-icon.blue { background: linear-gradient(180deg, #71d4ff, #2174ff); color: white; }
.product-icon.cyan { background: linear-gradient(180deg, #77efff, #17a4db); }
.product-icon.purple { background: linear-gradient(180deg, #d896ff, #8d36ff); color: white; }

.rank-card-icon {
  display: block;
  width: 122px;
  height: 122px;
  object-fit: contain;
  margin: -12px auto 6px;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.18));
}

.rank-card-icon--wide {
  width: 142px;
}

.product-card h2 {
  margin: 8px 0 12px;
  color: var(--text);
  font-family: "Press Start 2P", Montserrat, sans-serif;
  font-size: 1.18rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-card p {
  display: none;
}

.price {
  display: block;
  margin: 0 0 26px;
  color: #2f9c47;
  font-family: "Press Start 2P", Montserrat, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.6;
}

.price::after {
  content: " / MONTH";
}

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  border-radius: 6px;
  color: #161107;
  background: linear-gradient(180deg, #ffe576, #ffb11c);
  box-shadow: 0 6px 0 #b87408;
  font-family: "Press Start 2P", Montserrat, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
}

.buy-button:hover {
  transform: translateY(1px);
  box-shadow: 0 5px 0 #b87408;
}

.buy-button:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #b87408;
}

.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 14px;
}

.purchase-modal.is-open,
.qr-modal.is-open {
  display: flex;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
}

.purchase-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.76);
  backdrop-filter: blur(12px);
}

.purchase-dialog {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 8px;
  color: #130911;
  background: #fff;
  box-shadow: 10px 10px 0 rgba(233, 34, 93, 0.55), 0 30px 90px rgba(0, 0, 0, 0.55);
}

.qr-dialog {
  position: relative;
  width: min(574px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 34px 26px 36px;
  border-radius: 16px;
  color: #130911;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.purchase-close {
  position: absolute;
  top: 28px;
  right: 28px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #ffc5d8;
  border-radius: 50%;
  color: #cc0040;
  background: #fff4f8;
  cursor: pointer;
}

.purchase-logo {
  display: block;
  width: 160px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.2));
}

.purchase-divider {
  border: 0;
  border-top: 1px solid #f2bfd0;
  margin: 0 0 22px;
}

.purchase-form {
  display: grid;
  gap: 14px;
}

.purchase-panel {
  padding: 16px;
  border: 1px solid #f4bfd1;
  border-radius: 8px;
  background: #fff;
}

.purchase-panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #efc7d5;
  color: #c4003d;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.purchase-panel h2 span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 6px;
  background: #ffe8f0;
}

.purchase-panel label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.purchase-panel em {
  color: #f03769;
  font-style: normal;
}

.purchase-panel small {
  color: #6b6670;
  font-style: italic;
}

.purchase-panel input,
.purchase-panel select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #edc4d1;
  border-radius: 8px;
  color: #130911;
  background: #fffafa;
  font: inherit;
}

.selected-rank-row,
.payment-choice,
.purchase-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.selected-rank-row {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #edc4d1;
  border-radius: 8px;
  background: #fffafa;
}

.selected-rank-row span {
  font-weight: 900;
}

.payment-choice {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #ff2f69;
  border-radius: 8px;
  background: #fff8fb;
}

.payment-choice i {
  color: #d40034;
  font-size: 1.4rem;
}

.payment-choice span {
  width: 18px;
  height: 18px;
  border: 5px solid #ff3b75;
  border-radius: 50%;
}

.purchase-total {
  min-height: 68px;
  padding: 0 20px;
  border: 1px solid #ff8bad;
  border-radius: 8px;
  background: #ffe5ee;
}

.purchase-total span {
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-total i {
  color: #c4003d;
}

.purchase-total strong {
  color: #bf174c;
  font-size: 1.7rem;
}

.submit-purchase,
.copy-khqr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #e40045, #b50038);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.submit-purchase:disabled {
  cursor: wait;
  background: #cfc3ca;
}

.qr-panel {
  width: min(484px, 100%);
  margin: 22px auto 18px;
  padding: 24px 18px 20px;
  border: 1px solid #ffb8cf;
  border-top: 3px solid #d10042;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(140deg, #fff, #fff6fa);
}

.qr-panel h2 {
  margin: 0 0 18px;
  color: #0b0508;
  font-size: 1.25rem;
  font-weight: 900;
}

.khqr-card {
  position: relative;
  width: min(256px, 100%);
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(143, 0, 43, 0.12);
}

.khqr-card::before,
.khqr-card::after,
.khqr-card-body::before,
.khqr-card-body::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #c4003d;
  content: "";
}

.khqr-card::before {
  top: -1px;
  left: -1px;
  border-top: 3px solid;
  border-left: 3px solid;
  border-top-left-radius: 7px;
}

.khqr-card::after {
  top: -1px;
  right: -1px;
  border-top: 3px solid;
  border-right: 3px solid;
  border-top-right-radius: 7px;
}

.khqr-card-body::before {
  bottom: -1px;
  left: -1px;
  border-bottom: 3px solid;
  border-left: 3px solid;
  border-bottom-left-radius: 7px;
}

.khqr-card-body::after {
  right: -1px;
  bottom: -1px;
  border-right: 3px solid;
  border-bottom: 3px solid;
  border-bottom-right-radius: 7px;
}

.khqr-card-header {
  position: relative;
  min-height: 48px;
  padding: 10px 22px;
  color: #fff;
  background: #d90000;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0;
}

.khqr-card-header::after {
  position: absolute;
  right: 0;
  bottom: -23px;
  width: 0;
  height: 0;
  border-top: 23px solid #d90000;
  border-left: 23px solid transparent;
  content: "";
}

.khqr-card-body {
  position: relative;
  padding: 16px 24px 28px;
  text-align: left;
}

.khqr-card-body small {
  display: block;
  margin-bottom: 8px;
  color: #3d353b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.khqr-card-body strong {
  display: block;
  color: #181015;
  font-size: 1.08rem;
  font-weight: 900;
}

.khqr-card-body strong span {
  font-size: 0.6rem;
  font-weight: 800;
}

.khqr-card-divider {
  margin: 10px 0 18px;
  border-top: 1px dashed #b9a9af;
}

.payment-success {
  padding: 18px 8px 12px;
  text-align: center;
}

.success-ring {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #4ee889, #0fae55);
  box-shadow: 0 0 0 0 rgba(28, 205, 104, 0.42), 0 18px 38px rgba(15, 174, 85, 0.24);
  animation: success-pulse 1.8s ease-out infinite;
}

.success-ring::before,
.success-ring::after {
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(28, 205, 104, 0.55);
  border-radius: 50%;
  content: "";
  animation: success-ring 1.8s ease-out infinite;
}

.success-ring::after {
  animation-delay: 450ms;
}

.success-ring i {
  font-size: 3rem;
  animation: success-pop 520ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.payment-success h2 {
  margin-bottom: 10px;
  color: #108b49;
  text-transform: uppercase;
}

.payment-success p {
  max-width: 340px;
  margin: 0 auto;
  color: #4f4a51;
  font-weight: 800;
  line-height: 1.55;
}

@keyframes success-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(28, 205, 104, 0.42), 0 18px 38px rgba(15, 174, 85, 0.24);
  }

  50% {
    box-shadow: 0 0 0 16px rgba(28, 205, 104, 0), 0 18px 38px rgba(15, 174, 85, 0.24);
  }
}

@keyframes success-ring {
  from {
    opacity: 0.8;
    transform: scale(0.82);
  }

  to {
    opacity: 0;
    transform: scale(1.26);
  }
}

@keyframes success-pop {
  from {
    opacity: 0;
    transform: scale(0.55);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.khqr-generated-image {
  display: block;
  width: min(194px, 100%);
  margin: 0 auto;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.qr-waiting-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  width: min(310px, 100%);
  margin: 0 auto;
  color: #70747a;
  text-align: left;
}

.qr-waiting-row strong:last-child {
  color: #b50038;
}

.qr-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #ffd0df;
  border-top-color: #d60048;
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.copy-khqr {
  min-height: 49px;
  margin-top: 12px;
  border: 1px solid #ff2f69;
  color: #b50038;
  background: #fff7fb;
}

.copy-khqr i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #e40056, #b60042);
  box-shadow: 0 8px 18px rgba(190, 0, 70, 0.28);
}

.qr-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  color: #140610;
  background: #e83f97;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.purchase-status {
  margin: 10px 0 0;
  color: #bf174c;
  font-weight: 900;
  text-align: center;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 80px auto 28px;
  padding: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .server-strip,
  .store-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .main-logo {
    order: -1;
    max-width: 330px;
  }

  .product-card.featured {
    transform: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 12px;
  }

  .nav-bar {
    width: auto;
    max-width: 340px;
    justify-content: stretch;
    gap: 6px;
  }

  .nav-link {
    flex: 1 1 0;
    min-width: 0;
    gap: 5px;
    padding: 0 6px;
    font-size: 0.6rem;
  }

  .hero {
    min-height: 460px;
    padding-top: 26px;
  }

  .server-pill {
    justify-content: center;
    min-height: 74px;
    gap: 10px;
    text-align: center;
  }

  .server-strip {
    max-width: calc(100vw - 36px);
  }

  .server-pill strong {
    font-size: 0.78rem;
  }

  .server-pill small {
    font-size: 0.68rem;
  }

  .pill-icon {
    display: none;
  }

  .feature-tile {
    min-height: 220px;
  }
}
