/* Success Page Styles - Dark Theme */

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #070c16;
}

.success-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  background: #070c16;
}

/* Success Animation */
.success-animation {
  margin-bottom: 2rem;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-checkmark {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.checkmark {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #22c55e;
  stroke-miterlimit: 10;
  box-shadow: inset 0 0 0 #22c55e;
  animation: checkmark-fill 0.4s ease-in-out 0.4s forwards,
             checkmark-scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #22c55e;
  fill: none;
  animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #22c55e;
  stroke-width: 3;
  animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes checkmark-stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes checkmark-scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes checkmark-fill {
  100% {
    box-shadow: inset 0 0 0 60px rgba(34, 197, 94, 0.2);
  }
}

/* Success Content */
.success-content {
  max-width: 800px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

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

.success-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #22c55e, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-subtitle {
  font-size: 1.25rem;
  color: #9ca3af;
  margin-bottom: 2rem;
}

/* Subscription Details Card */
.subscription-details {
  background: #0f1419;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #9ca3af;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.subscription-info {
  display: none;
  width: 100%;
}

.subscription-info.loaded {
  display: block;
}

.plan-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50px;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.plan-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #e5e7eb;
  font-size: 0.95rem;
  padding: 0.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.feature-item::before {
  content: "";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

/* Next Steps */
.next-steps {
  margin: 3rem 0;
}

.next-steps h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step-card {
  background: #0f1419;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.05);
}

.step-icon {
  font-size: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.3);
  filter: brightness(1.4) drop-shadow(0 4px 12px rgba(59, 130, 246, 0.3));
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Redirect Notice */
.redirect-notice {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 1rem;
}

#countdown {
  font-weight: 600;
  color: #3b82f6;
}

/* Background Decoration */
.success-bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: 0.15;
  filter: blur(1px);
}

.floating-icon:nth-child(1) {
  top: 10%;
  left: 10%;
}

.floating-icon:nth-child(2) {
  top: 20%;
  right: 15%;
}

.floating-icon:nth-child(3) {
  bottom: 20%;
  left: 20%;
}

.floating-icon:nth-child(4) {
  bottom: 15%;
  right: 10%;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .success-container {
    padding: 1.5rem;
  }

  .success-title {
    font-size: 2rem;
  }

  .success-subtitle {
    font-size: 1rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .plan-features-list {
    grid-template-columns: 1fr;
  }

  .subscription-details {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .success-checkmark {
    width: 80px;
    height: 80px;
  }

  .checkmark {
    width: 80px;
    height: 80px;
  }

  .success-title {
    font-size: 1.75rem;
  }

  .plan-badge-success {
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .success-animation,
  .success-content,
  .checkmark,
  .checkmark-circle,
  .checkmark-check,
  .step-card,
  .btn,
  .floating-icon {
    animation: none !important;
    transition: none !important;
  }

  .success-checkmark {
    opacity: 1;
  }

  .success-content {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Print Styles */
@media print {
  .action-buttons,
  .redirect-notice,
  .success-bg-decoration {
    display: none;
  }

  .subscription-details {
    border: 2px solid #000;
  }
}
