/* ========== PREMIUM MODAL STYLES ========== */
.premium-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.premium-modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.premium-modal {
  background: white;
  border-radius: 20px;
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.premium-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: #6c757d;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.premium-modal-close:hover {
  background: #f8f9fa;
  color: #212529;
  transform: rotate(90deg);
}

/* ========== HEADER ========== */
.premium-modal-header {
  text-align: center;
  padding: 50px 30px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px 20px 0 0;
}

/* Thêm vào file premium-modal.css */

.premium-icon {
  /* Giữ kích thước 60x60 */
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto; /* CĂN GIỮA VÀ KHOẢNG CÁCH */
}

.premium-icon img {
  width: 100%;   /* Vừa vặn 60px */
  height: 100%;  /* Vừa vặn 60px */
  object-fit: contain; /* Đảm bảo ảnh nằm trọn vẹn, không bị méo */
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.premium-modal-header h2 {
  margin: 0 0 10px 0;
  font-size: 32px;
  font-weight: 700;
}

.premium-subtitle {
  margin: 0;
  font-size: 16px;
  opacity: 0.95;
}

/* ========== FEATURES ========== */
.premium-features {
  padding: 40px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: #f8f9fa;
  transform: translateX(5px);
}

.feature-icon {
  flex-shrink: 0;
  margin-top: 3px;
}

.feature-text strong {
  display: block;
  font-size: 15px;
  color: #212529;
  margin-bottom: 5px;
}

.feature-text small {
  display: block;
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
}

/* ========== PRICING ========== */
.premium-pricing {
  padding: 20px 30px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  background: #f8f9fa;
}

.pricing-card {
  background: white;
  border-radius: 16px;
  padding: 30px 25px;
  border: 2px solid #e9ecef;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
  border-color: #667eea;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.08) translateY(-5px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-badge.best {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}
/* --- CSS CHO GÓI TUẦN (WEEKLY PLAN) --- */

/* Thu nhỏ kích thước tổng thể xuống 90% so với gói thường */
.pricing-card[data-plan="weekly"] {
  transform: scale(0.9); /* Thu nhỏ lại */
  transform-origin: center bottom; /* Căn đáy để nó không bị bay lơ lửng */
  border-color: #dee2e6; /* Viền nhạt hơn chút cho đỡ gắt */
  z-index: 0;
}

/* Giảm cỡ chữ số tiền một chút cho cân đối */
.pricing-card[data-plan="weekly"] .amount {
  font-size: 36px; /* Nhỏ hơn mặc định là 42px */
}

/* Đổi màu cái nhãn NEW cho nổi bật */
.pricing-card[data-plan="weekly"] .pricing-badge {
  background: #7720c9; /*NEW Label*/
}

/* Hiệu ứng: Khi di chuột vào thì phóng to lên bằng anh em */
.pricing-card[data-plan="weekly"]:hover {
  transform: scale(0.92) translateY(-1px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  z-index: 1; /* Nổi lên trên */
  border-color: #7420c9;
}

.pricing-card h3 {
  margin: 20px 0 15px 0;
  font-size: 20px;
  color: #212529;
  text-align: center;
}

.pricing-price {
  text-align: center;
  margin-bottom: 10px;
}

.pricing-price .currency {
  font-size: 20px;
  color: #6c757d;
  vertical-align: top;
  margin-right: 3px;
}

.pricing-price .amount {
  font-size: 42px;
  font-weight: 700;
  color: #212529;
}

.pricing-price .period {
  font-size: 16px;
  color: #6c757d;
  margin-left: 5px;
}

.pricing-save {
  text-align: center;
  color: #28a745;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 25px 0;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 14px;
  color: #495057;
  border-bottom: 1px solid #f1f3f5;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.premium-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

/* .premium-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
} */

.premium-btn.featured {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

/* .premium-btn.featured:hover {
  box-shadow: 0 8px 25px rgba(245, 87, 108, 0.5);
} */

/* ========== FOOTER ========== */
.premium-footer {
  text-align: center;
  padding: 30px;
  border-top: 1px solid #e9ecef;
}

.premium-footer p {
  margin: 10px 0;
  font-size: 14px;
  color: #6c757d;
}

.premium-footer p:first-child {
  font-size: 15px;
  color: #28a745;
  font-weight: 600;
}

.premium-note {
  font-size: 12px !important;
  color: #adb5bd !important;
}

/* ========== DARK MODE ========== */
body.dark-mode .premium-modal {
  background: #2d2d2d;
}

body.dark-mode .premium-modal-close {
  color: #adb5bd;
}

body.dark-mode .premium-modal-close:hover {
  background: #3a3a3a;
  color: #f8f9fa;
}

body.dark-mode .feature-item:hover {
  background: #3a3a3a;
}

body.dark-mode .feature-text strong {
  color: #f8f9fa;
}

body.dark-mode .feature-text small {
  color: #adb5bd;
}

body.dark-mode .premium-pricing {
  background: #1a1a1a;
}

body.dark-mode .pricing-card {
  background: #2d2d2d;
  border-color: #495057;
}

body.dark-mode .pricing-card h3 {
  color: #f8f9fa;
}

body.dark-mode .pricing-price .amount {
  color: #f8f9fa;
}

body.dark-mode .pricing-features li {
  color: #adb5bd;
  border-bottom-color: #495057;
}

body.dark-mode .premium-footer {
  border-top-color: #495057;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .premium-modal {
    width: 98%;
    max-height: 95vh;
  }

  .premium-modal-header {
    padding: 40px 20px 25px;
  }

  .premium-modal-header h2 {
    font-size: 24px;
  }

  .premium-features {
    padding: 30px 20px;
    grid-template-columns: 1fr;
  }

  .premium-pricing {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .pricing-card.featured:hover {
    transform: translateY(-5px);
  }

  .pricing-price .amount {
    font-size: 36px;
  }
}
/* --- FIX LỖI MODAL BỊ CHE BỞI GÓI WEEKLY --- */

/* 1. Ép Modal Thanh Toán luôn có z-index cao nhất vũ trụ */
#paymentModalOverlay {
    z-index: 2147483647 !important; /* Số lớn nhất của CSS */
    position: fixed !important; /* Đảm bảo nó thoát khỏi mọi luồng */
    isolation: isolate; /* Tạo ra một không gian riêng biệt, không bị ảnh hưởng bởi transform bên dưới */
}

/* 2. Giảm z-index của cái Modal Bảng Giá xuống thấp hơn */
.premium-modal-overlay {
    z-index: 10000 !important; /* Thấp hơn cái paymentModalOverlay */
}

/* 3. Xử lý riêng cho thẻ Weekly đang dùng transform */
/* Khi modal bảng giá đang ẩn, ép các thẻ con không được nổi lên */
.premium-modal-overlay:not(.active) .pricing-card {
    z-index: -1 !important;
    transform: none !important; /* Tắt transform tạm thời khi đóng modal để tránh glitch */
}