/* ==========================================================
   CHECKOUT & SUCCESS STYLES
   ========================================================== */
:root {
  --bg-main: #0a0a0f;
  --bg-card: rgba(20, 21, 30, 0.85);
  --bg-card-hover: rgba(28, 30, 44, 0.95);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-active: rgba(34, 158, 217, 0.6);

  --accent-pink: #ff2d75;
  --telegram-blue: #229ED9;
  --telegram-gradient: linear-gradient(135deg, #2AABEE 0%, #229ED9 50%, #1783b8 100%);
  --pix-green: #00c977;
  --pix-gradient: linear-gradient(135deg, #00e676 0%, #00c977 50%, #00a85d 100%);
  --pix-glow: 0 8px 30px rgba(0, 201, 119, 0.35);

  --text-primary: #ffffff;
  --text-secondary: #9fa0b8;
  --text-muted: #62637a;

  --success-green: #00e676;
  --warning-amber: #f59e0b;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  animation: pulseAmbient 10s ease-in-out infinite alternate;
}

.glow-1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #229ED9, transparent 70%);
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-2 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #ff2d75, transparent 70%);
  bottom: -40px;
  right: -50px;
}

@keyframes pulseAmbient {
  0% { transform: scale(1); opacity: 0.28; }
  100% { transform: scale(1.15); opacity: 0.42; }
}

.checkout-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Top bar with Back button */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}

.btn-back:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.badge-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #a3ffc6;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.22);
  padding: 5px 12px;
  border-radius: 30px;
}

/* Header profile mini card */
.header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-avatar {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-icon {
  color: #2AABEE;
  display: inline-flex;
}

.header-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Section Title */
.section-headline {
  text-align: center;
  margin-top: 4px;
}

.section-headline h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-headline p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Payment Method Cards */
.payment-methods-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.method-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.method-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.method-card.active {
  background: rgba(34, 158, 217, 0.08);
  border-color: var(--border-active);
  box-shadow: 0 0 25px rgba(34, 158, 217, 0.2);
}

.method-card.active.pix-theme {
  background: rgba(0, 201, 119, 0.08);
  border-color: rgba(0, 201, 119, 0.55);
  box-shadow: 0 0 25px rgba(0, 201, 119, 0.2);
}

.method-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.method-card.active .method-radio {
  border-color: var(--telegram-blue);
  background: var(--telegram-blue);
}

.method-card.active.pix-theme .method-radio {
  border-color: var(--pix-green);
  background: var(--pix-green);
}

.method-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.2s ease;
}

.method-card.active .method-radio::after {
  transform: scale(1);
}

.method-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.method-details {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.method-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.method-price-tag {
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.method-price {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.method-period {
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Feature bullets */
.features-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.80rem;
  color: #e5e5f0;
  white-space: nowrap;
}

.feature-item svg {
  color: var(--success-green);
  flex-shrink: 0;
}

/* CTA Main Button */
.btn-submit-payment {
  width: 100%;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  user-select: none;
  font-family: inherit;
}

.btn-submit-payment.pix-action {
  background: var(--pix-gradient);
  box-shadow: var(--pix-glow);
}

.btn-submit-payment.card-action {
  background: var(--telegram-gradient);
  box-shadow: 0 8px 30px rgba(34, 158, 217, 0.4);
}

.btn-submit-payment:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-submit-payment:active {
  transform: scale(0.98);
}

.btn-submit-payment:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Trust badges */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================
   VIEW 2: PIX PAYMENT DISPLAY
   ========================================================== */
.pix-display-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pix-qr-container {
  background: #ffffff;
  padding: 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.pix-qr-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 0.80rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
}

.pix-copy-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pix-input-group {
  display: flex;
  position: relative;
  width: 100%;
}

.pix-code-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #e5e5f0;
  font-size: 0.80rem;
  font-family: monospace;
  outline: none;
  user-select: all;
}

.btn-copy-pix {
  width: 100%;
  padding: 15px 18px;
  background: var(--pix-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--pix-glow);
  font-family: inherit;
}

.btn-copy-pix:active {
  transform: scale(0.98);
}

.status-polling-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  width: 100%;
  justify-content: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==========================================================
   VIEW 3: SUCCESS SCREEN
   ========================================================== */
.success-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 230, 118, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 230, 118, 0.2);
  border-radius: var(--radius-lg);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.success-icon-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.15);
  border: 2px solid rgba(0, 230, 118, 0.4);
  color: var(--success-green);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceSuccess 1.6s ease infinite alternate;
}

@keyframes bounceSuccess {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.05); }
}

.success-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.success-subtitle {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Steps Box */
.success-step-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--telegram-blue);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-num.green {
  background: var(--success-green);
  color: #0b0f19;
}

.step-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #fff;
}

.step-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-left: 36px;
}

/* Telegram store download badges */
.store-downloads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-left: 36px;
}

.btn-store {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-store:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-store svg {
  flex-shrink: 0;
}

.btn-store-full {
  grid-column: 1 / -1;
  justify-content: center;
}

/* Big VIP Action in Success */
.btn-enter-vip {
  width: 100%;
  padding: 18px 20px;
  background: var(--telegram-gradient);
  box-shadow: 0 10px 35px rgba(34, 158, 217, 0.6);
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  user-select: none;
  animation: pulseVipBtn 2.5s infinite;
}

@keyframes pulseVipBtn {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.5);
  }
  50% {
    box-shadow: 0 12px 42px rgba(34, 158, 217, 0.85);
  }
}

.btn-enter-vip:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-enter-vip:active {
  transform: scale(0.98);
}

.backup-link-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
}

.backup-link-input-row {
  display: flex;
  gap: 6px;
}

.backup-link-input {
  flex-grow: 1;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  outline: none;
  font-family: monospace;
}

.btn-backup-copy {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-backup-copy:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Toast message */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #14151e;
  border: 1px solid var(--pix-green);
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 201, 119, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Utility hidden */
.hidden {
  display: none !important;
}
