.upgrade-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

@media (max-width: 1200px) {
  .pricing-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 992px) {
  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 3rem auto;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
}

.pricing-card {
  background: white;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  position: relative;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 992px) {
  .pricing-card {
    padding: 2rem;
  }
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.pricing-card.featured {
  border: 2px solid #FF6B6B;
  transform: scale(1.05);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #FF6B6B;
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.plan-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1rem;
}

@media (max-width: 992px) {
  .plan-name {
    font-size: 1.5rem;
  }
}

.plan-price {
  margin: 1.5rem 0;
}

.currency {
  font-size: 1.5rem;
  color: #7f8c8d;
  vertical-align: top;
}

.amount {
  font-size: 3.5rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
}

@media (max-width: 992px) {
  .amount {
    font-size: 3rem;
  }
}

.period {
  font-size: 1.25rem;
  color: #7f8c8d;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  text-align: left;
  flex-grow: 1;
}

.plan-features li {
  padding: 0.5rem 0;
  color: #495057;
  position: relative;
}

.plan-features .credits-info {
  display: flex;
  align-items: center;
  justify-content: start;
}

.btn-select-plan {
  background: #4ECDC4;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  margin-top: auto;
}

.btn-select-plan:hover:not(:disabled) {
  background: #45b8b0;
}

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

.btn-featured {
  background: #FF6B6B;
}

.btn-featured:hover:not(:disabled) {
  background: #ff5252;
}

.included-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature-item {
  padding: 0.5rem;
  color: #495057;
}

.credits-explanation {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.credits-explanation p {
  margin-bottom: 1rem;
  color: #495057;
}

.credits-explanation ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.credits-explanation li {
  padding: 0.5rem 0;
  color: #495057;
}

.credits-note {
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
  margin-top: 1rem;
  margin-bottom: 0;
}

.coming-soon {
  opacity: 0.7;
}

.badge-soon {
  display: inline-block;
  background: #6c757d;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tooltip styles */
.credits-info {
  position: relative;
  cursor: help;
}

.credits-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  margin-bottom: 8px;
  z-index: 10;
  min-width: 200px;
  text-align: left;
}

.credits-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.credits-info:hover .credits-tooltip {
  opacity: 1;
}

.credits-tooltip-content {
  line-height: 1.4;
}

.credits-tooltip-content div {
  margin: 4px 0;
}

.security-note {
  text-align: center;
  margin: 2rem 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.back-link {
  text-align: center;
  margin-top: 2rem;
}

.back-link a {
  color: #007bff;
  text-decoration: none;
}

/* Free Plan and Current Plan Styling */
.pricing-card.current-plan {
  border: 2px solid #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.plan-badge.current {
  background: #28a745;
  color: white;
}

.btn-downgrade {
  background: #dc3545;
  color: white;
}

.btn-downgrade:hover:not(:disabled) {
  background: #c82333;
}

.current-plan-status {
  text-align: center;
}

.current-plan-status .alert {
  display: inline-block;
  margin: 0;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
}

/* Update grid to accommodate 4 cards (Free + 3 paid plans) */
.pricing-cards {
  grid-template-columns: repeat(4, minmax(280px, 1fr));
}

@media (max-width: 1400px) {
  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 2rem auto;
  }
}

/* Modal styling improvements */
.modal-body .alert {
  margin-bottom: 1rem;
}

.modal-body ul {
  padding-left: 1.5rem;
}

.modal-body ul li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}