/**
 * Subscription Page Styles - Enhanced with Animations and Modal
 * UPDATED: Added cancel subscription button styles
 */

/* ============================
   ANIMATIONS
   ============================ */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ============================
   HEADER NAVIGATION
   ============================ */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(165, 29, 42, 0.95);
  padding: 1rem 2rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.download-btn {
  background: transparent;
  border: 2px solid white;
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s;
  text-decoration: none;
}

.download-btn:hover {
  background: white;
  color: #a51d2a;
}

/* ============================
   SUBSCRIPTION CONTAINER
   ============================ */
.profile-container {
  min-height: calc(100vh - 80px);
  padding: 150px 0 4rem;
  background: #f5f5f5;
}

.section-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #333;
  text-transform: uppercase;
  font-weight: 700;
}

.section-header p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #666;
}

/* ============================
   CURRENT SUBSCRIPTION STATUS CARD
   ============================ */
.subscription-status-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  animation: slideInDown 0.5s ease;
}

.current-subscription-header {
  margin-bottom: 2rem;
}

.subscription-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  color: #10b981;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.current-subscription-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  text-transform: uppercase;
}

.subscription-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.sub-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
  opacity: 0;
}

.sub-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.sub-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sub-stat-info {
  flex: 1;
}

.sub-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.sub-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
}

/* No Subscription Notice */
.no-subscription-notice {
  text-align: center;
  padding: 3rem 2rem;
}

.no-sub-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: rgba(165, 29, 42, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-subscription-notice h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

.no-subscription-notice p {
  color: #666;
  font-size: 1rem;
}

/* ============================
   SUBSCRIPTION ACTIONS (Cancel)
   ============================ */
.subscription-actions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #E0E0E0;
  text-align: center;
}

.btn-cancel-subscription {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: 2px solid #ef4444;
  border-radius: 12px;
  color: #ef4444;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-cancel-subscription:hover {
  background: #ef4444;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-cancel-subscription svg {
  flex-shrink: 0;
}

.cancel-info {
  margin-top: 1rem;
  color: #666;
  font-size: 0.875rem;
  font-style: italic;
}

/* Remaining styles continue from document... */
/* ============================
   PRICING PLANS
   ============================ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.plan-card {
  position: relative;
  background: white;
  border: 2px solid #E0E0E0;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  animation: slideInUp 0.5s ease;
}

.plan-card:hover {
  border-color: #a51d2a;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.plan-featured {
  border-color: #a51d2a;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 2rem;
  background: #a51d2a;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.plan-card h3 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.price {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
}

.period {
  color: #808080;
  font-size: 1rem;
}

.plan-desc {
  margin-bottom: 2rem;
  color: #666;
  font-size: 1.05rem;
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.plan-features li {
  padding: 0.5rem 0;
  color: #666;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Active Plan Notice */
.active-plan-notice {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 20px;
  border: 2px solid #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
}

.active-plan-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.active-plan-notice h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

.active-plan-notice p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.active-plan-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ============================
   PAYMENT TYPE MODAL
   ============================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid #E0E0E0;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 2rem;
}

.modal-description {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.payment-type-options {
  display: grid;
  gap: 1.5rem;
}

.payment-type-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 2px solid #E0E0E0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
}

.payment-type-card:hover {
  border-color: #a51d2a;
  background: rgba(165, 29, 42, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-type-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a51d2a 0%, #d32f2f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-type-icon svg {
  color: white;
}

.payment-type-info {
  flex: 1;
}

.payment-type-info h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.5rem 0;
}

.payment-type-info p {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
}

.recommended-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================
   BUTTONS
   ============================ */
.btn-block {
  width: 100%;
}

.btn-primary {
  background: #000;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: #a51d2a;
  border: 2px solid #a51d2a;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-outline:hover {
  background: #a51d2a;
  color: white;
}

/* ============================
   LOADING STATES
   ============================ */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #e0e0e0 50%,
    #f0f0f0 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #E0E0E0;
  border-top-color: #a51d2a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

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

/* ============================
   RESPONSIVE DESIGN
   ============================ */
@media (max-width: 968px) {
  .profile-container {
    padding: 120px 1rem 2rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .plans-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
  
  .navbar-actions {
    gap: 0.5rem;
  }
  
  .download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .subscription-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-container {
    padding: 100px 1rem 2rem;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .modal-header,
  .modal-body {
    padding: 1.5rem;
  }
  
  .payment-type-card {
    flex-direction: column;
    text-align: center;
  }
  
  .active-plan-actions {
    flex-direction: column;
  }
}