* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Gradient */
.bg-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 40%), #050505;
}

.container {
  position: relative;
  z-index: 10;
  padding: 32px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #9ca3af;
}

.status {
  display: none;
}

/* Pricing Section */
.pricing-section {
  position: relative;
  z-index: 10;
  padding: 6.25rem 1.5rem;
}

.pricing-container {
  max-width: 1024px;
  margin: 0 auto;
}

.pricing-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #e5e7eb;
  font-weight: 500;
  margin: 16px 0 20px;
}

.pricing-loading.active {
  display: inline-flex;
}

.pricing-grid.loading-hidden {
  visibility: hidden;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Billing Toggle */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 4px;
  margin-bottom: 24px;
}

.toggle-btn {
  position: relative;
  padding: 8px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  color: #ffffff;
}

.toggle-btn.active {
  background: linear-gradient(to right, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: none;
}

.discount-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #10b981;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  justify-content: center;
}

.pricing-card {
  backdrop-filter: none;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pricing-card.popular {
  border-color: #3b82f6;
  background: rgba(37, 99, 235, 0.05);
}

.popular-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.plan-price {
  margin-bottom: 1rem;
  height: 52px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 4px;
  row-gap: 0;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  font-family: "Fira Code", "Roboto Mono", monospace;
  letter-spacing: -0.03em;
}

.period {
  color: #9ca3af;
  font-size: 1rem;
}

.billing-note {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #9ca3af;
  display: none;
}

.plan-description {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  height: 48px;
  display: flex;
  align-items: flex-start;
  line-height: 1.4;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #d1d5db;
}

.plan-features .highlight-feature {
  color: #f8fafc;
}

.plan-features .highlight-feature .highlight-text {
  font-weight: 600;
  color: #ffffff;
}

.plan-features svg {
  color: #93c5fd;
  flex-shrink: 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.btn-full {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
}

/* Unified CTA sizing inside pricing cards */
.pricing-card .cta-btn,
.pricing-card .btn-primary,
.pricing-card .btn-secondary {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 24px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  margin-top: auto;
  line-height: 1;
  box-sizing: border-box;
  border-radius: 12px;
  align-self: stretch;
}

/* Paid emphasis */
.pricing-card .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none !important;
  box-shadow: none;
}

/* Free / secondary */
.pricing-card .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

/* Override .btn-full padding/height inside pricing cards */
.pricing-card .btn-full {
  padding: 0 24px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
}

.cta-btn {
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Current plan state */
.cta-btn.btn-current {
  background: #2d2d2d !important;
  color: #a0a0a0 !important;
  border: 1px solid #404040;
  cursor: default;
  opacity: 1;
  font-weight: 600;
}

.cta-btn.btn-current::before {
  content: "\2713\0020";
  color: #4CAF50;
  font-weight: bold;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal-content {
  width: 100%;
  max-width: 360px;
  background: rgba(24, 24, 27, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
  text-align: center;
}

.modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon .icon {
  width: 36px;
  height: 36px;
  color: #bfdbfe;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-description {
  font-size: 14px;
  color: #a1a1aa;
  margin-bottom: 16px;
  line-height: 1.5;
}

.plan-highlight {
  color: #fff;
  font-weight: 600;
}

.modal-price-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: #e5e7eb;
}

.price-label {
  font-size: 14px;
  color: #a1a1aa;
}

.price-value {
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  line-height: 1.3;
}

.highlight-price {
  font-size: 20px;
  font-weight: 700;
  color: #3b82f6;
}

.price-detail {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  margin-top: 4px;
}

/* Invoice-style proration view */
.invoice-container {
  width: 100%;
  padding: 8px 0;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 8px;
  line-height: 1.5;
  gap: 12px;
}

.invoice-item-name {
  color: #fff;
  font-weight: 500;
}

.invoice-row.credit {
  color: #9ca3af;
  font-size: 13px;
}

.invoice-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 12px 0;
  width: 100%;
}

.invoice-row.total {
  align-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 0;
}

.invoice-row.total .highlight-price {
  color: #3b82f6;
  font-size: 20px;
  font-weight: 700;
}

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

.modal-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.confirm-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 10px 25px -8px rgba(59, 130, 246, 0.6);
}

.confirm-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.modal-state {
  display: block;
}

.spinner {
  width: 32px;
  height: 32px;
  color: #3b82f6;
  animation: spin 0.9s linear infinite;
}

.spinner-circle {
  opacity: 0.6;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: spin-dash 1.5s ease-in-out infinite;
}

.modal-icon.success {
  background: rgba(16, 185, 129, 0.18);
}

.modal-icon.success .icon,
.modal-icon.success svg {
  color: #10b981;
}

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

.modal-state-success .modal-title {
  color: #10b981;
}

@keyframes spin-dash {
  0% {
    stroke-dashoffset: 50;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -50;
  }
}

/* --- Footer Styles --- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.3);
  padding: 80px 20px 40px;
  margin-top: 100px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.footer-logo span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.footer-desc {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 24px;
}

.copyright {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-logo, .footer-desc {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
}
