@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

.subscription-page i[class*="fa-"],
.subscription-page .fas,
.subscription-page .far,
.subscription-page .fab {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  font-style: normal;
}

.subscription-page .fas,
.subscription-page .fa-solid { font-weight: 900; }
.subscription-page .fab { font-family: "Font Awesome 6 Brands" !important; font-weight: 400; }

.subscription-page {
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  padding: 90px 20px 60px;
}

.pricing-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.pricing-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 10px;
}

.pricing-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

.pricing-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #64748b;
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 36px 28px 32px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.pricing-card.featured {
  box-shadow: 0 16px 48px rgba(36, 107, 206, 0.18);
  border: 2px solid rgba(36, 107, 206, 0.15);
}

.pricing-coin {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.pricing-card:hover .pricing-coin {
  transform: scale(1.08) rotate(-6deg);
}

/* Basic — cool silver */
.pricing-coin.coin-basic {
  background: linear-gradient(145deg, #f1f5f9, #94a3b8 55%, #64748b);
  box-shadow:
    0 6px 14px rgba(100, 116, 139, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}

/* Publisher — rich gold (most popular) */
.pricing-coin.coin-popular {
  background: linear-gradient(145deg, #fde68a, #f59e0b 50%, #d97706);
  box-shadow:
    0 6px 16px rgba(217, 119, 6, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

/* Agency — premium violet */
.pricing-coin.coin-agency {
  background: linear-gradient(145deg, #e9d5ff, #a855f7 45%, #7c3aed);
  box-shadow:
    0 6px 18px rgba(124, 58, 237, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.pricing-ribbon {
  position: absolute;
  top: -6px;
  right: 20px;
  width: 56px;
  background: linear-gradient(180deg, #3b82f6 0%, #246bce 100%);
  color: #fff;
  text-align: center;
  padding: 14px 8px 20px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%);
  box-shadow: 0 4px 12px rgba(36, 107, 206, 0.4);
}

.pricing-ribbon .price {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.pricing-ribbon .period {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

.pricing-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pricing-card h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 12px;
}

.pricing-features li i {
  color: #246bce;
  font-size: 0.85rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.pricing-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #3b82f6, #246bce);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(36, 107, 206, 0.35);
}

.pricing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(36, 107, 206, 0.45);
}

.pricing-btn.outline {
  background: #fff;
  color: #246bce;
  border: 2px solid #246bce;
  box-shadow: none;
}

.pricing-btn.outline:hover {
  background: #eff6ff;
}

/* Payment modal */
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pay-modal.is-open {
  display: flex;
}

.pay-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  animation: payModalIn 0.35s ease;
}

@keyframes payModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pay-modal-box h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #1e293b;
}

.pay-modal-box p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.pay-modal-box label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.pay-modal-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.pay-modal-box input:focus {
  outline: none;
  border-color: #246bce;
}

.pay-modal-actions {
  display: flex;
  gap: 12px;
}

.pay-modal-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.pay-modal-actions .cancel-btn {
  background: #f1f5f9;
  color: #64748b;
}

.pay-modal-actions .confirm-btn {
  background: linear-gradient(135deg, #3b82f6, #246bce);
  color: #fff;
}

.sub-toast-area {
  max-width: 1100px;
  margin: 0 auto 20px;
}

.sub-alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  display: none;
}

.sub-alert.ok { background: #dcfce7; color: #166534; display: block; }
.sub-alert.err { background: #fee2e2; color: #991b1b; display: block; }

@media (max-width: 960px) {
  .pricing-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    max-width: 100%;
    padding: 8px 20px 24px;
    margin: 0 auto;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
  }

  .pricing-grid::-webkit-scrollbar {
    height: 6px;
  }

  .pricing-grid::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
  }

  .pricing-card {
    flex: 0 0 min(88vw, 300px);
    min-width: 260px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .pricing-card.featured {
    scroll-snap-align: center;
  }
}

@media (max-width: 768px) {
  .subscription-page {
    padding-top: 90px;
    padding-bottom: 0;
  }
}
