:root {
  --bg: #010205;
  --bg-soft: #070c18;
  --panel: rgba(8, 11, 21, 0.9);
  --panel-2: rgba(12, 16, 28, 0.94);
  --text: #ffdca8;
  --muted: #ffcc92;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #ffcf4d;
  --orange: #ff7a18;
  --purple: #8d68ff;
  --blue: #22daff;
  --pink: #ff4fd7;
  --green: #28d17c;
  --warning: #ffb64d;
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Orbitron", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 102%, rgba(255, 188, 60, 0.62), transparent 10%),
    radial-gradient(circle at 50% 98%, rgba(255, 86, 214, 0.28), transparent 18%),
    radial-gradient(circle at 14% 5%, rgba(255, 81, 86, 0.42), transparent 10%),
    radial-gradient(circle at 84% 7%, rgba(38, 217, 255, 0.34), transparent 14%),
    radial-gradient(circle at 24% 62%, rgba(255, 122, 24, 0.24), transparent 14%),
    radial-gradient(circle at 72% 56%, rgba(143, 107, 255, 0.28), transparent 16%),
    radial-gradient(circle at 50% 36%, rgba(255, 79, 216, 0.16), transparent 24%),
    linear-gradient(180deg, #03030a 0%, #080512 22%, #12061d 48%, #0b0d1d 74%, #04070d 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.85) 0 1px, transparent 1.6px),
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.6px),
    radial-gradient(circle at 66% 78%, rgba(255, 207, 77, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 26% 72%, rgba(34, 218, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 28%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.8px),
    radial-gradient(circle at 62% 34%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.8px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, auto, auto, auto, auto, auto, 40px 40px, 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.76), transparent 96%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 176, 47, 0.42), transparent 12%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 73, 225, 0.22), transparent 22%),
    radial-gradient(ellipse at 50% 100%, rgba(38, 217, 255, 0.12), transparent 30%);
  mix-blend-mode: screen;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.shell {
  width: min(var(--shell), calc(100% - 32px));
  margin: 0 auto;
}

.page-header {
  padding: 32px 0 18px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffe88c 0%, #ffd95a 22%, #fff7fb 44%, #ffb8ef 60%, #98c8ff 78%, #bfffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 14px rgba(255, 208, 93, 0.2),
    0 0 20px rgba(38, 217, 255, 0.08);
}

.page-header p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
  text-shadow: 0 0 14px rgba(255, 140, 20, 0.1);
}

.important-note {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 182, 77, 0.28);
  background: linear-gradient(135deg, rgba(255, 207, 77, 0.14), rgba(255, 79, 215, 0.08));
  color: #ffe2b2;
  font-weight: 700;
}

.page-intro {
  max-width: 980px;
  margin: 20px auto 8px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
  text-shadow: 0 0 14px rgba(255, 140, 20, 0.1);
}

.section {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 170, 38, 0.16), transparent 16%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    var(--panel);
  border: 1px solid rgba(255, 95, 226, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 79, 216, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.46);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.checkout-main {
  display: grid;
  gap: 0;
}

.checkout-sidebar {
  position: sticky;
  top: 118px;
}

.section h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffe88c 0%, #ffd95a 22%, #fff7fb 44%, #ffb8ef 60%, #98c8ff 78%, #bfffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 14px rgba(255, 208, 93, 0.2),
    0 0 20px rgba(38, 217, 255, 0.08);
}

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

.tier-grid,
.device-grid,
.method-grid,
.summary-grid,
.activation-grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.tier-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.device-grid,
.summary-grid,
.activation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tier-option,
.device-option,
.method-card,
.summary-card,
.activation-card {
  --tile-flare: rgba(255, 170, 38, 0.16);
  --tile-border: rgba(255, 140, 20, 0.34);
  --tile-shadow: rgba(255, 140, 20, 0.18);
  border-radius: var(--radius-md);
  border: 1px solid var(--tile-border);
  background:
    radial-gradient(circle at 50% 100%, var(--tile-flare), transparent 16%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    var(--panel-2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 22px var(--tile-shadow);
  height: 100%;
}

.tier-option,
.device-option {
  position: relative;
}

.tier-option input,
.device-option input,
.method-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.tier-option label,
.device-option label,
.method-option label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 18px;
  cursor: pointer;
}

.tier-option strong,
.device-option strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.tier-option strong,
.tier-option span {
  text-align: center;
}

.section-title-center {
  text-align: center;
}

.tier-option span,
.device-option span,
.method-card p,
.summary-card p,
.activation-card p,
.field-note {
  color: var(--muted);
  line-height: 1.6;
  text-shadow: 0 0 14px rgba(255, 140, 20, 0.1);
}

.tier-option input:checked + label,
.device-option input:checked + label,
.method-option input:checked + label {
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 170, 38, 0.22), transparent 18%),
    linear-gradient(135deg, rgba(255, 207, 77, 0.16), rgba(255, 79, 215, 0.18), rgba(34, 218, 255, 0.16));
  box-shadow: 0 0 0 1px rgba(34, 218, 255, 0.36), 0 0 28px rgba(255, 79, 215, 0.14), 0 12px 24px rgba(0, 0, 0, 0.24);
}

.tier-option.is-selected label,
.device-option.is-selected label,
.method-option.is-selected label {
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 170, 38, 0.22), transparent 18%),
    linear-gradient(135deg, rgba(255, 207, 77, 0.16), rgba(255, 79, 215, 0.18), rgba(34, 218, 255, 0.16));
  box-shadow: 0 0 0 1px rgba(34, 218, 255, 0.36), 0 0 28px rgba(255, 79, 215, 0.14), 0 12px 24px rgba(0, 0, 0, 0.24);
}

.method-card,
.summary-card,
.activation-card {
  padding: 20px;
}

.method-option label {
  justify-content: flex-start;
}

.method-card h3,
.summary-card h3,
.activation-card h3 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffe88c 0%, #ffd95a 22%, #fff7fb 44%, #ffb8ef 60%, #98c8ff 78%, #bfffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 14px rgba(255, 208, 93, 0.2),
    0 0 20px rgba(38, 217, 255, 0.08);
}

.media-frame {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 14px;
  margin: 12px auto 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 140, 20, 0.14), transparent 18%),
    rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.28));
}

.method-card--wide .media-frame {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  padding: 14px;
}

.method-card h3,
.method-card p {
  text-align: center;
}

.summary-note {
  margin-top: 0;
  margin-bottom: 16px;
}

.summary-panel {
  margin-top: 24px;
}

.summary-stack {
  display: grid;
  gap: 12px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.summary-line span {
  color: var(--muted);
}

.summary-line strong {
  text-align: right;
}

.summary-line-total {
  border-color: rgba(255, 182, 77, 0.22);
  background: linear-gradient(135deg, rgba(255, 207, 77, 0.12), rgba(255, 79, 215, 0.08), rgba(34, 218, 255, 0.08));
}

.order-number-box,
.payment-instructions {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.order-number-box {
  display: grid;
  gap: 10px;
}

.order-number-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.order-number-box strong {
  font-size: 1.08rem;
  word-break: break-word;
}

.summary-actions {
  margin-top: 20px;
}

.tier-grid > *:nth-child(4n + 1),
.device-grid > *:nth-child(4n + 1),
.method-grid > *:nth-child(4n + 1),
.summary-grid > *:nth-child(4n + 1),
.activation-grid > *:nth-child(4n + 1) {
  --tile-flare: rgba(255, 170, 38, 0.2);
  --tile-border: rgba(255, 140, 20, 0.42);
  --tile-shadow: rgba(255, 140, 20, 0.2);
}

.tier-grid > *:nth-child(4n + 2),
.device-grid > *:nth-child(4n + 2),
.method-grid > *:nth-child(4n + 2),
.summary-grid > *:nth-child(4n + 2),
.activation-grid > *:nth-child(4n + 2) {
  --tile-flare: rgba(255, 79, 216, 0.18);
  --tile-border: rgba(255, 79, 216, 0.4);
  --tile-shadow: rgba(255, 79, 216, 0.2);
}

.tier-grid > *:nth-child(4n + 3),
.device-grid > *:nth-child(4n + 3),
.method-grid > *:nth-child(4n + 3),
.summary-grid > *:nth-child(4n + 3),
.activation-grid > *:nth-child(4n + 3) {
  --tile-flare: rgba(132, 108, 255, 0.18);
  --tile-border: rgba(132, 108, 255, 0.42);
  --tile-shadow: rgba(132, 108, 255, 0.2);
}

.tier-grid > *:nth-child(4n + 4),
.device-grid > *:nth-child(4n + 4),
.method-grid > *:nth-child(4n + 4),
.summary-grid > *:nth-child(4n + 4),
.activation-grid > *:nth-child(4n + 4) {
  --tile-flare: rgba(38, 217, 255, 0.18);
  --tile-border: rgba(38, 217, 255, 0.42);
  --tile-shadow: rgba(38, 217, 255, 0.2);
}

.placeholder {
  width: 100%;
  min-height: 200px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 24px;
}

.terms-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-row input {
  margin-top: 5px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

button,
.button-link {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-2px);
}

.primary-button {
  color: #070912;
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 34%, var(--pink) 100%);
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(255, 122, 24, 0.24), 0 0 26px rgba(255, 79, 215, 0.16);
}

.secondary-button {
  color: var(--text);
  background: linear-gradient(135deg, rgba(34, 218, 255, 0.14), rgba(141, 104, 255, 0.12), rgba(255, 79, 215, 0.1));
  border: 1px solid rgba(34, 218, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.status {
  margin-top: 10px;
  color: var(--muted);
  min-height: 22px;
}

.inline-value {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

form {
  display: grid;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input[type="file"] {
  padding: 12px 14px;
  min-height: 52px;
}

option {
  color: var(--text);
  background: #0a1020;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(34, 218, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(34, 218, 255, 0.12);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(680px, 100%);
  padding: 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.modal h2 {
  margin-top: 0;
}

.receipt-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 207, 77, 0.08), rgba(34, 218, 255, 0.05), rgba(255, 79, 215, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-box p {
  margin: 8px 0;
}

@media (max-width: 980px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-sidebar {
    position: static;
  }

  .tier-grid,
  .device-grid,
  .method-grid,
  .summary-grid,
  .activation-grid,
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, var(--shell));
  }

  .tier-grid,
  .device-grid,
  .method-grid,
  .summary-grid,
  .activation-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .section,
  .modal {
    padding: 20px;
  }
}
