/* Upgrade Modal - Dark Theme */

.upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 12, 22, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  padding: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.upgrade-modal {
  background: #0f1419;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.upgrade-modal-header {
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.upgrade-modal-header .upgrade-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
  animation: iconBounce 0.6s ease;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.upgrade-modal-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 1.5rem;
  color: #9ca3af;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
  font-weight: 300;
}

.modal-close:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  transform: rotate(90deg) scale(1.1);
}

.upgrade-modal-body {
  padding: 2rem;
}

.upgrade-modal-body p {
  font-size: 1.1rem;
  color: #e5e7eb;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.upgrade-modal-body strong {
  color: #60a5fa;
  font-weight: 600;
}

.current-plan {
  font-size: 0.95rem;
  color: #9ca3af;
  margin-bottom: 2rem;
}

.limit-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
}

.limit-used {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.limit-separator {
  font-size: 2.5rem;
  color: #6b7280;
  font-weight: 300;
}

.limit-total {
  font-size: 3.5rem;
  font-weight: 700;
  color: #6b7280;
}

.feature-benefits {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2rem;
}

.feature-benefits h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-align: center;
}

.feature-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-benefits li {
  padding: 0.75rem 0;
  color: #e5e7eb;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.feature-benefits li:last-child {
  border-bottom: none;
}

.feature-benefits li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Plan Cards */
.upgrade-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.plan-card {
  position: relative;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.plan-card.plan-recommended {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.recommended-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.plan-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 0.5rem;
}

.plan-price span {
  font-size: 1rem;
  color: #9ca3af;
  font-weight: 400;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  flex-grow: 1;
}

.plan-features li {
  padding: 0.75rem 0;
  color: #e5e7eb;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plan-features li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.plan-card .btn-primary {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1.5rem;
  border: none;
}

.upgrade-modal-footer {
  padding: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  background: rgba(7, 12, 22, 0.5);
}

.upgrade-modal-footer .btn {
  flex: 1;
  max-width: 200px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 400px;
  height: 400px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: #9ca3af;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #e5e7eb;
  transform: translateY(-2px);
}

.modal-upgrade {
  position: relative;
  z-index: 1;
}

.modal-cancel {
  position: relative;
  z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .upgrade-modal {
    max-width: 95%;
    margin: 1rem;
    border-radius: 20px;
  }

  .upgrade-modal-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .upgrade-modal-header .upgrade-icon {
    font-size: 3rem;
  }

  .upgrade-modal-header h2 {
    font-size: 1.5rem;
  }

  .upgrade-modal-body {
    padding: 1.5rem;
  }

  .upgrade-modal-body p {
    font-size: 1rem;
  }

  .upgrade-modal-footer {
    flex-direction: column;
    padding: 1.5rem;
  }

  .upgrade-modal-footer .btn {
    max-width: 100%;
    width: 100%;
  }

  .limit-display {
    padding: 1.5rem;
  }

  .limit-used,
  .limit-total {
    font-size: 2.5rem;
  }

  .limit-separator {
    font-size: 2rem;
  }

  .feature-benefits {
    padding: 1.5rem;
  }

  .upgrade-plans {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .plan-card {
    padding: 1.5rem;
  }

  .plan-card h3 {
    font-size: 1.25rem;
  }

  .plan-price {
    font-size: 2rem;
  }

  .plan-card .btn-primary {
    padding: 0.8rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .upgrade-modal-header .upgrade-icon {
    font-size: 2.5rem;
  }

  .upgrade-modal-header h2 {
    font-size: 1.25rem;
  }

  .limit-used,
  .limit-total {
    font-size: 2rem;
  }

  .limit-separator {
    font-size: 1.5rem;
  }
}

/* Smooth Scrolling */
.upgrade-modal::-webkit-scrollbar {
  width: 8px;
}

.upgrade-modal::-webkit-scrollbar-track {
  background: rgba(15, 20, 25, 0.5);
  border-radius: 4px;
}

.upgrade-modal::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

.upgrade-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .upgrade-modal-overlay,
  .upgrade-modal,
  .upgrade-modal-header .upgrade-icon,
  .modal-close,
  .btn-primary,
  .btn-secondary {
    animation: none !important;
    transition: none !important;
  }

  .upgrade-modal {
    opacity: 1;
    transform: none;
  }
}
