/* ChatGPT-style Stripe checkout */
.checkout-overlay .modal-wrap {
  width: 100%;
  max-width: min(96vw, 920px);
}

.checkout-shell {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  position: relative;
  text-align: left;
}

.checkout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.checkout-close:hover { background: rgba(0, 0, 0, 0.1); }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 520px;
}

.checkout-summary {
  background: linear-gradient(160deg, #0f0e14 0%, #1c1a26 100%);
  color: #f4f2f7;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.checkout-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #c9a45c, #a67c3a);
  color: #1a1408;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

.checkout-summary h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.02em;
}

.checkout-summary-sub {
  color: rgba(244, 242, 247, 0.7);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.checkout-plan-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px;
  margin-top: auto;
}

.checkout-plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

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

.checkout-plan-name {
  font-weight: 700;
  font-size: 1rem;
}

.checkout-plan-meta {
  font-size: 0.8rem;
  color: rgba(244, 242, 247, 0.6);
}

.checkout-price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-price-line strong {
  font-size: 1.6rem;
  font-weight: 800;
}

.checkout-price-line span {
  font-size: 0.85rem;
  color: rgba(244, 242, 247, 0.65);
}

.checkout-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-features li {
  font-size: 0.88rem;
  color: rgba(244, 242, 247, 0.85);
  padding-left: 22px;
  position: relative;
}

.checkout-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: 700;
}

.checkout-form-panel {
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  overflow: hidden;
}

.checkout-form-panel h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.checkout-form-panel .checkout-form-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 22px;
}

.checkout-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 18px 0 10px;
}

.checkout-section-title:first-of-type { margin-top: 0; }

.checkout-field {
  margin-bottom: 14px;
}

.checkout-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.checkout-optional {
  font-weight: 400;
  color: var(--muted);
}

.checkout-field input,
.checkout-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-field input:focus,
.checkout-field select:focus {
  outline: none;
  border-color: var(--of-blue);
  box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.12);
}

.checkout-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#checkout-form {
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}

.checkout-error {
  color: #dc2626;
  font-size: 0.85rem;
  min-height: 20px;
  margin-bottom: 12px;
}

.checkout-submit {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  background: #171717;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-submit:hover:not(:disabled) { background: #000; }
.checkout-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.checkout-submit:active:not(:disabled) { transform: scale(0.99); }

.checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.checkout-secure svg { opacity: 0.6; }

.checkout-alt {
  text-align: center;
  margin-top: 14px;
  font-size: 0.85rem;
}

.checkout-alt button {
  background: none;
  border: none;
  color: var(--of-blue);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.checkout-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 280px;
  color: var(--muted);
}

.checkout-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--of-blue);
  border-radius: 50%;
  animation: checkoutSpin 0.8s linear infinite;
}

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

.checkout-setup {
  padding: 20px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #9a3412;
}

.checkout-setup code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* Crypto USDT payment */
.crypto-panel {
  overflow-y: auto;
}

.crypto-amount-box {
  text-align: center;
  background: linear-gradient(135deg, #0f0e14, #1a1824);
  color: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 20px;
}

.crypto-amount-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

.crypto-amount-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.crypto-amount-value small {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.75;
}

.crypto-coin {
  color: #26a17b;
  margin-right: 4px;
}

.crypto-network-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(38, 161, 123, 0.2);
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 700;
}

.crypto-qr-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.crypto-qr {
  border-radius: 16px;
  border: 4px solid var(--white);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.crypto-qr-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.crypto-field {
  margin-bottom: 14px;
}

.crypto-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.crypto-copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.crypto-copy-row code {
  flex: 1;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.82rem;
  word-break: break-all;
  line-height: 1.4;
}

.crypto-copy-btn {
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}

.crypto-copy-btn:hover {
  border-color: var(--of-blue);
  color: var(--of-blue);
}

.crypto-wallet-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #26a17b, #1d7a5c);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(38, 161, 123, 0.3);
}

.crypto-wallet-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(38, 161, 123, 0.4);
}

.crypto-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.crypto-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text);
}

.crypto-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f7fd;
  color: var(--of-blue);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crypto-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

.crypto-grid .checkout-form-panel {
  max-height: min(88vh, 720px);
}

.crypto-confirm-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.crypto-confirm-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.crypto-confirm-btn {
  margin-top: 4px;
  background: linear-gradient(135deg, #26a17b, #1d7a5c) !important;
}

.checkout-trial-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: #ecfdf5;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

/* Bot shield */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.checkout-captcha-note {
  margin: 12px 0 4px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

body.captcha-active .modal-overlay.open {
  display: none !important;
}

.turnstile-wrap {
  margin: 12px 0 4px;
  min-height: 65px;
}

/* Auth sign in / sign up */
.auth-card {
  max-width: 440px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: #f3f4f8;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-error {
  margin-bottom: 16px;
}

.auth-switch {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--of-blue);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Account pages */
.account-card {
  max-width: 560px;
  margin: 32px auto;
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.account-head h1 {
  font-size: 1.5rem;
  margin: 0;
}

.account-trial-badge {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #bbf7d0;
  color: #065f46;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.account-status {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.account-status.active {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.account-status.inactive {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.account-status-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.account-status strong {
  display: block;
  margin-bottom: 4px;
}

.account-status p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.account-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.account-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.account-detail-row:last-child { border-bottom: none; }

.account-detail-row span { color: var(--muted); }

.header-account-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-right: 8px;
}

.header-account-link:hover {
  border-color: var(--of-blue);
  color: var(--of-blue);
}

/* Full page checkout */
.checkout-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.checkout-success {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  padding: 40px 28px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.checkout-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.checkout-success h1 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.checkout-success p {
  color: var(--muted);
  margin-bottom: 16px;
}

.checkout-success-model { color: var(--text) !important; }

@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .checkout-summary {
    padding: 28px 22px;
  }

  .checkout-form-panel {
    padding: 28px 22px 24px;
  }

  .checkout-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .checkout-shell {
    border-radius: 20px 20px 0 0;
    max-height: 94vh;
    overflow-y: auto;
  }
}
