/* Subscription Plans Page Specific Styles */

/* Go back button styling */
.go-back-button {
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.go-back-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 122, 182, 0.3);
}

/* Purchase button animations */
.purchase-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.purchase-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.purchase-btn:hover::before {
  left: 100%;
}

.purchase-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Plan selection animation */
.pricing-card {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Selected plan styling */
.pricing-card.selected {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(255, 122, 182, 0.2);
  border-color: rgba(255, 122, 182, 0.4);
  background: rgba(255, 122, 182, 0.05);
}

.pricing-card.selected .purchase-btn {
  background: linear-gradient(135deg, #ff7ab6, #ff9ac6);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 122, 182, 0.3);
}

/* Plan badge animations */
.badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Features list animations */
.features li {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.6s ease forwards;
}

.features li:nth-child(1) { animation-delay: 0.1s; }
.features li:nth-child(2) { animation-delay: 0.2s; }
.features li:nth-child(3) { animation-delay: 0.3s; }
.features li:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pricing section animations */
.pricing-section {
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .go-back-button {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .pricing-card {
    margin-bottom: 1rem;
  }

  .pricing-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .purchase-btn {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .go-back-button {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
  }

  .pricing-card {
    padding: 1rem;
  }

  .purchase-btn {
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
  }
}

/* Loading state for purchase buttons */
.purchase-btn.loading {
  position: relative;
  color: transparent;
}

.purchase-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success state for purchase buttons */
.purchase-btn.success {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
}

.purchase-btn.success::before {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  font-weight: bold;
}

/* Error state for purchase buttons */
.purchase-btn.error {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
}

/* Modal styles for purchase confirmation */
.purchase-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.purchase-modal.active {
  opacity: 1;
  visibility: visible;
}

.purchase-modal-content {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.purchase-modal.active .purchase-modal-content {
  transform: scale(1);
}

/* Plan comparison table */
.plan-comparison {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-comparison h3 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.comparison-table .feature-name {
  font-weight: 500;
}

.comparison-table .check {
  color: #10b981;
  font-weight: bold;
}

.comparison-table .cross {
  color: #ef4444;
  font-weight: bold;
}

/* Responsive table */
@media (max-width: 768px) {
  .plan-comparison {
    padding: 1rem;
    margin-top: 2rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
}

/* FAQ section */
.faq-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Testimonial section */
.testimonial-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.testimonial {
  font-style: italic;
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.testimonial-author {
  font-weight: 600;
  color: #ff7ab6;
}

/* Scroll animations */
.reveal-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.purchase-btn:focus,
.go-back-button:focus {
  outline: 2px solid #ff7ab6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .pricing-card {
    border: 2px solid white;
  }
  
  .pricing-card:hover {
    border-color: #ff7ab6;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .pricing-card,
  .purchase-btn,
  .go-back-button,
  .features li,
  .pricing-section {
    animation: none;
    transition: none;
  }
  
  .reveal-card {
    opacity: 1;
    transform: none;
  }
}
