:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

.grid-background {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 245, 255, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(19, 19, 20, 0.14), rgba(19, 19, 20, 0.42));
}

.pixel-blast-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.62;
  pointer-events: auto;
}

.pixel-blast-background canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.status-pulse {
  animation: statusPulse 1.35s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.86);
    box-shadow: 0 0 4px rgba(78, 222, 163, 0.42);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
    box-shadow: 0 0 14px rgba(78, 222, 163, 0.95);
  }
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.flow-view {
  min-height: calc(100vh - 280px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-view.hidden {
  display: none;
}

.field-error {
  min-height: 18px;
  color: #ffb4ab;
  font-size: 12px;
  font-weight: 700;
}

input.invalid {
  border-color: #ffb4ab !important;
  box-shadow: 0 0 0 1px rgba(255, 180, 171, 0.75) !important;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.25rem;
  color: #b9caca;
  background: rgba(32, 31, 32, 0.82);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: #e9feff;
  border-color: rgba(233, 254, 255, 0.45);
}

.pay-method {
  min-height: 40px;
  border-radius: 0.25rem;
  color: rgba(185, 202, 202, 0.76);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.pay-method.active {
  color: #e9feff;
  background: rgba(0, 245, 255, 0.13);
}

.annual-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(0, 245, 255, 0.26);
  border-radius: 0.25rem;
  color: #e9feff;
  background: rgba(0, 245, 255, 0.10);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.pay-method {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(32, 31, 32, 0.62);
}

.pay-method.active {
  border-color: rgba(0, 245, 255, 0.48);
}

.pay-method.unavailable {
  cursor: not-allowed;
  opacity: 0.42;
}

.pay-method.unavailable:hover,
.pay-method.unavailable:focus-visible {
  color: rgba(185, 202, 202, 0.76);
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(32, 31, 32, 0.62);
}

.payment-status {
  min-height: 20px;
  margin: -8px 0 14px;
  color: rgba(185, 202, 202, 0.76);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.payment-status.error {
  color: #ffb4ab;
}

#checkoutButton:disabled {
  cursor: wait;
  opacity: 0.68;
}

.plan {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.25rem;
  padding: 14px;
  background: rgba(19, 19, 20, 0.62);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.plan h3 {
  margin: 0 0 4px;
  color: #e5e2e3;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.plan h3 span {
  color: rgba(185, 202, 202, 0.72);
}

.plan p {
  margin: 0;
  color: rgba(185, 202, 202, 0.56);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.plan strong {
  color: #e5e2e3;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  white-space: nowrap;
}

.radio-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #3a494a;
  border-radius: 50%;
}

.plan.active {
  border-color: #00f5ff;
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.13);
}

.plan.active .radio-dot {
  border: 4px solid #00f5ff;
}

.progress-bar {
  width: 0%;
  background: linear-gradient(90deg, #e9feff, #00f5ff);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.35);
  transition: width 240ms ease;
}

.terminal {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.25rem;
  background: #050707;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px 4px;
}

.terminal-top span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffb020;
}

.terminal-top span:nth-child(2) {
  background: #8b5cf6;
}

.terminal-top span:nth-child(3) {
  background: #4edea3;
}

.terminal-top strong {
  margin-left: 8px;
  color: rgba(185, 202, 202, 0.48);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.terminal pre {
  height: 220px;
  margin: 0;
  overflow-y: auto;
  padding: 10px 14px 16px;
  color: #4edea3;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
}

.terminal pre::-webkit-scrollbar {
  width: 0;
}

.timeline {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: rgba(185, 202, 202, 0.52);
}

.timeline li > span {
  width: 10px;
  height: 10px;
  border: 1px solid #3a494a;
  border-radius: 50%;
}

.timeline li.done > span {
  border-color: #4edea3;
  background: #4edea3;
  box-shadow: 0 0 12px rgba(78, 222, 163, 0.55);
}

.timeline p {
  margin: 0;
  font-size: 13px;
}

.payment-modal,
.success-modal {
  width: min(480px, calc(100vw - 32px));
  border: 1px solid rgba(0, 245, 255, 0.32);
  border-radius: 0.5rem;
  padding: 0;
  color: #e5e2e3;
  background: rgba(19, 19, 20, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 34px rgba(0, 245, 255, 0.12);
}

.payment-modal::backdrop,
.success-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal-body {
  position: relative;
  padding: 28px;
}

.success-modal-body {
  text-align: center;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 245, 255, 0.28);
  border-radius: 0.5rem;
  color: #003739;
  background: #e9feff;
  box-shadow: 0 0 26px rgba(0, 245, 255, 0.2);
}

.success-icon .material-symbols-outlined {
  font-size: 34px;
}

.success-code-panel {
  display: grid;
  gap: 8px;
  margin: 24px 0 14px;
  padding: 18px;
  border: 1px solid rgba(0, 245, 255, 0.26);
  border-radius: 0.25rem;
  background: rgba(0, 245, 255, 0.08);
}

.success-code-panel span {
  color: rgba(185, 202, 202, 0.7);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.success-code-panel strong {
  color: #e9feff;
  font-family: "JetBrains Mono", monospace;
  font-size: 42px;
  line-height: 1;
}

.success-note {
  margin: 0 0 22px;
  color: rgba(185, 202, 202, 0.66);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.25rem;
  color: #b9caca;
  background: rgba(42, 42, 43, 0.56);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.completion-actions {
  padding-top: 8px;
}

@media (max-width: 640px) {
  .flow-view {
    min-height: auto;
  }

  .plan {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .plan strong {
    grid-column: 2;
  }
}
