/* ==================================
   Deepsea - How It Works Styles
   工作原理页面样式
   ================================== */

.how-it-works-main {
  padding-top: 0;
}

.how-hero {
  padding: calc(6rem + var(--space-4xl)) 0 var(--space-3xl);
  background: radial-gradient(70% 140% at 50% 0%, rgba(26, 167, 214, 0.2) 0%, rgba(4, 11, 22, 0) 70%);
  text-align: center;
  margin-top: -6rem;
}

.how-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-family: var(--font-display);
  margin-bottom: var(--space-md);
}

.how-subtitle {
  font-size: var(--font-size-h5);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

.how-content {
  padding: var(--space-3xl) 0;
}

/* Timeline */
.how-timeline {
  margin-bottom: var(--space-4xl);
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
}

.timeline-step {
  background: rgba(10, 22, 40, 0.6);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(169, 188, 214, 0.12);
  padding: var(--space-lg);
  text-align: center;
  position: relative;
  animation: timelineStepSlideIn 0.6s ease-out backwards;
  transition: all var(--transition-base);
}

.timeline-step:hover {
  border-color: rgba(26, 167, 214, 0.35);
  box-shadow: 0 12px 32px rgba(26, 167, 214, 0.15);
  transform: translateY(-4px);
}

.step-marker {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, var(--color-primary), rgba(26, 167, 214, 0.5));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  color: #fff;
  box-shadow: 0 6px 20px rgba(26, 167, 214, 0.3);
}

.step-content h4 {
  font-size: var(--font-size-h5);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
}

.step-content p {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Sections */
.how-sections {
  display: grid;
  gap: var(--space-3xl);
}

.how-section {
  background: rgba(10, 22, 40, 0.6);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(169, 188, 214, 0.12);
  padding: var(--space-2xl);
}

.how-section-header h2 {
  font-size: var(--font-size-h3);
  margin-bottom: var(--space-sm);
}

.how-section-header p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-body);
}

.how-section-content {
  margin-top: var(--space-lg);
}

/* Steps */
.how-step {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(169, 188, 214, 0.08);
  align-items: flex-start;
}

.how-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.step-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, rgba(26, 167, 214, 0.3), rgba(50, 252, 224, 0.2));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 167, 214, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  flex-shrink: 0;
}

.how-step h3 {
  font-size: var(--font-size-h5);
  margin-bottom: var(--space-sm);
}

.how-step p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  word-break: break-word;
}

/* List */
.how-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}

.how-list li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text-secondary);
  font-size: var(--font-size-body);
}

.how-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* FAQ Section */
.how-faq {
  padding: var(--space-3xl) 0 var(--space-4xl);
  background: linear-gradient(180deg, rgba(26, 167, 214, 0.1), transparent);
}

.how-faq h2 {
  font-size: var(--font-size-h2);
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.faq-grid {
  display: grid;
  gap: var(--space-lg);
}

.faq-item {
  background: rgba(10, 22, 40, 0.6);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(169, 188, 214, 0.12);
  overflow: hidden;
  animation: faqItemFadeIn 0.6s ease-out backwards;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: rgba(26, 167, 214, 0.3);
  box-shadow: 0 8px 24px rgba(26, 167, 214, 0.1);
}

.faq-question {
  width: 100%;
  padding: var(--space-lg);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  transition: all var(--transition-base);
}

.faq-question:hover {
  background: rgba(26, 167, 214, 0.08);
  color: var(--color-primary);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 1px solid rgba(169, 188, 214, 0.08);
}

.faq-answer.open {
  max-height: 400px;
}

.faq-answer p {
  padding: var(--space-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.faq-question.open svg {
  transform: rotate(180deg);
}

/* Animations */
@keyframes timelineStepSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive */
@media (max-width: 768px) {
  .timeline-steps {
    grid-template-columns: 1fr;
  }

  .how-section {
    padding: var(--space-lg);
  }

  .how-step {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-md);
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-body);
  }
}
