/* ==========================================
   СТРАНИЦА ТАРИФОВ - ЕДИНЫЙ ДИЗАЙН
   6 карточек: 3 подписки + 3 Top-up
   ========================================== */

.pricing-page {
  min-height: 100vh;
  background: var(--bg, #0b0b0f);
  padding-bottom: 100px;
  overflow-y: auto;
}

.pricing-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.pricing-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.pricing-title {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 1px;
}

.pricing-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Баланс звезд */
.pricing-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(108, 229, 177, 0.1);
  border: 1px solid rgba(108, 229, 177, 0.3);
  border-radius: 12px;
  margin: 0 auto 32px;
  width: fit-content;
}

.balance-star {
  font-size: 20px;
  color: var(--accent, #6ce5b1);
}

.balance-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent, #6ce5b1);
}

/* Активная подписка */
.pricing-active-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(108, 229, 177, 0.1);
  border: 1px solid rgba(108, 229, 177, 0.2);
  border-radius: 12px;
  margin: 0 auto 40px;
  max-width: 600px;
  flex-wrap: wrap;
}

.active-sub-check {
  width: 28px;
  height: 28px;
  background: var(--accent, #6ce5b1);
  color: #0b0b0f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.pricing-active-sub span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.active-sub-link {
  padding: 6px 14px;
  background: rgba(108, 229, 177, 0.15);
  border-radius: 8px;
  color: var(--accent, #6ce5b1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.active-sub-link:hover {
  background: rgba(108, 229, 177, 0.25);
}

/* Секция */
.pricing-section {
  margin-bottom: 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.section-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Сетка карточек */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Карточка */
.pricing-card {
  background: #16161a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Популярная карточка */
.pricing-card.popular {
  border-color: var(--accent, #6ce5b1);
  background: linear-gradient(180deg, rgba(108, 229, 177, 0.08) 0%, #16161a 100%);
}

.pricing-card.popular::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent, #6ce5b1);
  border-radius: 16px 16px 0 0;
}

/* Бейдж */
.card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent, #6ce5b1);
  color: #0b0b0f;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Название */
.card-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 8px 0 20px;
}

/* Цена */
.card-price {
  margin-bottom: 16px;
}

.price-value {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
}

.price-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

/* Звезды */
.card-stars {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 215, 70, 0.1);
  border: 1px solid rgba(255, 215, 70, 0.2);
  border-radius: 10px;
  margin-bottom: 12px;
}

.card-stars .stars-icon {
  font-size: 18px;
  color: #ffd746;
}

.card-stars .stars-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffd746;
}

.card-stars .stars-period,
.card-stars .stars-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* Top-up звезды (больше) */
.card-stars.topup-main {
  padding: 16px 24px;
  margin-bottom: 16px;
}

.card-stars.topup-main .stars-icon {
  font-size: 28px;
}

.card-stars.topup-main .stars-value {
  font-size: 32px;
}

/* Цена за звезду */
.card-per-star {
  font-size: 13px;
  color: rgba(108, 229, 177, 0.9);
  margin-bottom: 20px;
}

/* Кнопка - ЕДИНЫЙ СТИЛЬ */
.card-btn {
  width: 100%;
  padding: 14px 24px;
  background: #c4ffc1;
  color: #0b0b0f;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.card-btn:hover:not(:disabled) {
  background: #b0eb9f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 255, 193, 0.3);
}

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

.card-btn.loading {
  background: rgba(196, 255, 193, 0.3);
  color: rgba(255, 255, 255, 0.6);
}

/* Фичи */
.card-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.card-features li {
  padding: 8px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-features li:last-child {
  border-bottom: none;
}

/* Загрузка */
.pricing-loading {
  text-align: center;
  padding: 80px 20px;
}

.pricing-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent, #6ce5b1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.pricing-loading p {
  color: rgba(255, 255, 255, 0.5);
}

/* Ошибка */
.pricing-error {
  text-align: center;
  padding: 60px 20px;
}

.pricing-error p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

/* Уведомления */
.pricing-notification {
  padding: 14px 20px;
  border-radius: 10px;
  margin: 20px auto;
  max-width: 500px;
  text-align: center;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

.pricing-notification.success {
  background: rgba(108, 229, 177, 0.15);
  border: 1px solid rgba(108, 229, 177, 0.3);
  color: #6ce5b1;
}

.pricing-notification.warning {
  background: rgba(255, 215, 70, 0.15);
  border: 1px solid rgba(255, 215, 70, 0.3);
  color: #ffd746;
}

.pricing-notification.error {
  background: rgba(255, 92, 122, 0.15);
  border: 1px solid rgba(255, 92, 122, 0.3);
  color: #ff5c7a;
}

.pricing-notification.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* АДАПТИВНОСТЬ */
@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pricing-grid > .pricing-card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .pricing-title {
    font-size: 36px;
  }
  
  .pricing-subtitle {
    font-size: 16px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pricing-grid > .pricing-card:nth-child(3) {
    max-width: none;
  }
  
  .pricing-hero {
    padding: 40px 0 30px;
  }
}

@media (max-width: 480px) {
  .pricing-title {
    font-size: 28px;
  }
  
  .pricing-card {
    padding: 24px 20px;
  }
  
  .price-value {
    font-size: 32px;
  }
  
  .pricing-active-sub {
    flex-direction: column;
    text-align: center;
  }
}
