.api-hero {
  background: linear-gradient(135deg, #165DFF 0%, #4080ff 50%, #69b1ff 100%);
  color: #fff;
  padding: 80px 20px 60px;
  text-align: center;
  margin-top: 0;
}

.api-hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 2px;
}

.api-hero-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin: 0 0 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.api-hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.api-stat {
  text-align: center;
}

.api-stat-num {
  display: block;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.api-stat-label {
  display: block;
  font-size: 14px;
  opacity: 0.8;
  margin-top: 4px;
}

.api-section {
  padding: 72px 20px;
}

.api-section-alt {
  background: #f7f9fc;
}

.api-section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #165DFF;
}

.api-section-desc {
  text-align: center;
  font-size: 16px;
  color: #666;
  margin: 0 0 40px;
}

.cap-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cap-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  text-align: center;
}

.cap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cap-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #e6f4ff, #bae0ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cap-icon svg {
  width: 28px;
  height: 28px;
  fill: #4080ff;
}

.cap-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #165DFF;
}

.cap-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 16px;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.cap-tags span {
  font-size: 12px;
  padding: 3px 10px;
  background: #e6f4ff;
  color: #4080ff;
  border-radius: 12px;
  white-space: nowrap;
}

.iface-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.iface-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.iface-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.iface-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.iface-emoji {
  font-size: 20px;
}

.iface-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #165DFF;
  flex: 1;
}

.iface-count {
  font-size: 12px;
  background: #e6f4ff;
  color: #4080ff;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.iface-list {
  list-style: none;
  counter-reset: iface;
  padding: 0;
  margin: 0;
}

.iface-list li {
  font-size: 13px;
  color: #444;
  padding: 5px 0 5px 24px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.iface-list li::before {
  counter-increment: iface;
  content: counter(iface);
  position: absolute;
  left: 0;
  top: 5px;
  font-size: 11px;
  color: #999;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

.iface-list li:last-child {
  border-bottom: none;
}

.security-flow {
  max-width: 1000px;
  margin: 0 auto 32px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.flow-step {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 220px;
}

.flow-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #165DFF, #4080ff);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto 10px;
}

.flow-step h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #165DFF;
}

.flow-step p {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.flow-code {
  margin-top: 8px;
  font-size: 11px;
  background: #f5f5f5;
  padding: 6px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #333;
  word-break: break-all;
}

.flow-arrow {
  font-size: 20px;
  color: #9e9e9e;
  align-self: center;
  padding-top: 20px;
}

.security-features {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sec-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #444;
}

.sec-feat svg {
  width: 16px;
  height: 16px;
  fill: #2e7d32;
  flex-shrink: 0;
}

.qs-steps {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.qs-step {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  position: relative;
  padding-left: 72px;
}

.qs-num {
  position: absolute;
  left: 20px;
  top: 24px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #165DFF, #4080ff);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.qs-step h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #165DFF;
}

.qs-step p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px;
}

.qs-code {
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  background: #2d2d2d;
  padding: 6px 12px;
  font-size: 12px;
  color: #aaa;
}

.qs-code pre {
  margin: 0;
  padding: 12px 16px;
  overflow-x: auto;
}

.qs-code code {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 13px;
  color: #d4d4d4;
  line-height: 1.5;
}

.scene-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.scene-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.scene-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.scene-emoji {
  font-size: 32px;
  margin-bottom: 8px;
}

.scene-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #165DFF;
}

.scene-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px;
}

.scene-flow {
  font-size: 13px;
  color: #165DFF;
  background: #e6f4ff;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
}

.api-cta-section {
  background: linear-gradient(135deg, #165DFF, #4080ff);
  color: #fff;
  text-align: center;
  padding: 64px 20px;
}

.api-cta-section h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
}

.api-cta-section p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0 0 24px;
}

.api-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.api-cta-buttons .btn-primary {
  background: #fff;
  color: #165DFF;
  border: none;
}

.api-cta-buttons .btn-primary:hover {
  background: #e6f4ff;
}

.api-cta-buttons .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.api-cta-buttons .btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {
  .cap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .iface-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .security-flow {
    flex-direction: column;
    align-items: center;
  }
  .flow-arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }
  .flow-step {
    max-width: 400px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .api-hero {
    padding: 60px 16px 40px;
  }
  .api-hero h1 {
    font-size: 28px;
  }
  .api-hero-subtitle {
    font-size: 15px;
  }
  .api-hero-stats {
    gap: 24px;
  }
  .api-stat-num {
    font-size: 28px;
  }
  .cap-grid {
    grid-template-columns: 1fr;
  }
  .iface-grid {
    grid-template-columns: 1fr;
  }
  .scene-grid {
    grid-template-columns: 1fr;
  }
  .security-features {
    grid-template-columns: 1fr;
  }
  .api-section {
    padding: 48px 16px;
  }
  .api-section-title {
    font-size: 22px;
  }
  .qs-step {
    padding-left: 60px;
  }
}

@media (max-width: 480px) {
  .api-hero h1 {
    font-size: 24px;
  }
  .api-hero-stats {
    gap: 16px;
  }
  .api-stat-num {
    font-size: 24px;
  }
  .api-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  .cap-tags {
    gap: 4px;
  }
}