/* ==========================================================================
   PDFW.COM - 开放平台 (Open Platform) 专属设计系统
   Executive Light Aurora & Developer Console Aesthetics
   ========================================================================== */

/* 页面根容器 */
.open-page {
  background-color: var(--bg-body, #f8fafc);
  color: var(--text-main, #0f172a);
  overflow-x: hidden;
}

/* ==========================================================================
   1. 极光光晕开发者首屏 (Hero Section)
   ========================================================================== */
.open-hero {
  position: relative;
  background: radial-gradient(circle at 50% -10%, #ffffff 0%, #f0f6ff 48%, #eaf2fc 100%);
  padding: 84px 0 92px;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
}

.open-hero-bg-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.open-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(22, 119, 255, 0.09) 1px, transparent 1px),
    linear-gradient(to right, rgba(22, 119, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 119, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px, 96px 96px, 96px 96px;
  background-position: center top;
  opacity: 0.85;
}

.open-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.open-aurora-1 {
  top: -110px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.24) 0%, rgba(99, 102, 241, 0.14) 50%, transparent 70%);
}

.open-aurora-2 {
  top: 14%;
  left: 6%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 68%);
}

.open-aurora-3 {
  top: 18%;
  right: 6%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 68%);
}

.open-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.open-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

/* 顶部流光胶囊徽章 */
.open-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 4px 14px rgba(22, 119, 255, 0.08), inset 0 1px 0 #ffffff;
  margin-bottom: 24px;
  transition: var(--transition);
}

.open-pill:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(22, 119, 255, 0.12);
  transform: translateY(-1px);
}

.open-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #1677ff);
  box-shadow: 0 0 10px rgba(22, 119, 255, 0.6);
  animation: pulse-dot 2s infinite ease-in-out;
}

.open-pill-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
}

/* 核心大标题与副标题 */
.open-hero-title {
  font-size: clamp(2.3rem, 3.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.28;
  color: #0b192c;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.open-hero-gradient {
  background: linear-gradient(135deg, #0ea5e9 0%, #1677ff 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.open-hero-subtitle {
  font-size: clamp(0.98rem, 1.8vw, 1.15rem);
  line-height: 1.85;
  color: #475569;
  margin-bottom: 34px;
  max-width: 780px;
}

.open-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
}

/* 首屏指标徽章条 */
.open-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  border-top: 1px solid #dbeafe;
  padding-top: 24px;
  width: 100%;
}

.open-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #334155;
  font-weight: 600;
}

.open-badge-item i {
  color: #1677ff;
  font-size: 1rem;
}

/* 右侧交互式代码终端卡片 */
.open-terminal-card {
  background: #0b1528;
  border-radius: var(--radius-xl, 24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px -10px rgba(11, 21, 40, 0.45), 0 0 0 1px rgba(22, 119, 255, 0.15);
  overflow: hidden;
  color: #e2e8f0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
}

.terminal-header {
  background: #070d19;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #eab308; }
.terminal-dots span:nth-child(3) { background: #22c55e; }

.terminal-tabs {
  display: flex;
  gap: 10px;
}

.terminal-tab {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 3px 10px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.terminal-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.terminal-tab.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.28);
}

.terminal-body {
  padding: 22px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-pane {
  display: none;
}

.code-pane.active {
  display: block;
}

.syntax-cmd { color: #f43f5e; font-weight: 700; }
.syntax-flag { color: #a78bfa; }
.syntax-str { color: #4ade80; }
.syntax-key { color: #38bdf8; }
.syntax-val { color: #fde047; }
.syntax-comment { color: #64748b; font-style: italic; }

.terminal-response {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.response-status {
  font-size: 0.76rem;
  color: #22c55e;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* ==========================================================================
   2. 核心开放能力全景 (Capabilities Grid)
   ========================================================================== */
.open-caps-section {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.open-caps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.open-cap-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg, 16px);
  padding: 30px 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.open-cap-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 16px 36px rgba(22, 119, 255, 0.1);
}

.open-cap-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-purple { background: #faf5ff; color: #7c3aed; }
.icon-amber { background: #fffbeb; color: #d97706; }

.open-cap-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.open-cap-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #64748b;
  margin-bottom: 18px;
  flex-grow: 1;
}

.open-cap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px dashed #e2e8f0;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.open-cap-list li {
  font-size: 0.82rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

.open-cap-list li i {
  color: #1677ff;
  font-size: 0.76rem;
}

/* ==========================================================================
   3. 极简集成三步走 (Integration Workflow)
   ========================================================================== */
.open-flow-section {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.open-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.open-flow-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl, 24px);
  padding: 36px 30px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  transition: var(--transition);
}

.open-flow-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 16px 36px rgba(22, 119, 255, 0.1);
}

.flow-step-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  display: inline-block;
  margin-bottom: 16px;
}

.open-flow-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.open-flow-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #64748b;
  margin-bottom: 18px;
}

.flow-code-snippet {
  background: #0f172a;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.76rem;
  color: #4ade80;
  overflow-x: auto;
}

/* ==========================================================================
   4. 实时事件推流 Webhooks (Webhooks Section)
   ========================================================================== */
.open-webhook-section {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.open-webhook-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.webhook-info h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 18px;
}

.webhook-info p {
  font-size: 0.96rem;
  line-height: 1.85;
  color: #475569;
  margin-bottom: 24px;
}

.webhook-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.webhook-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
}

.webhook-event-item code {
  font-weight: 700;
  color: #1677ff;
  font-size: 0.85rem;
}

.webhook-event-item span {
  color: #64748b;
  font-size: 0.82rem;
}

/* ==========================================================================
   5. 开发者资源与文档直达 (Developer Resources Grid)
   ========================================================================== */
.open-docs-section {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.open-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.open-doc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl, 24px);
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: var(--transition);
}

.open-doc-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 16px 36px rgba(22, 119, 255, 0.1);
}

.doc-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1677ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.open-doc-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.open-doc-card h3 i {
  font-size: 0.85rem;
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.25s ease;
}

.open-doc-card:hover h3 i {
  color: #1677ff;
  transform: translateX(4px);
}

.open-doc-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #64748b;
  flex-grow: 1;
  margin-bottom: 18px;
}

.doc-link-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1677ff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   6. 底部行动呼应卡片 (Developer CTA)
   ========================================================================== */
.open-cta-section {
  background: #ffffff;
}

.open-cta-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f1fe 45%, #f8fafc 100%);
  border: 1px solid #cfe2fe;
  border-radius: var(--radius-xl, 24px);
  padding: 48px 42px;
  box-shadow: 0 12px 32px rgba(22, 119, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.open-cta-copy h3 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.open-cta-copy p {
  font-size: 0.96rem;
  color: #475569;
  line-height: 1.7;
}

.open-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   7. 响应式媒体查询 (Responsive)
   ========================================================================== */
@media (max-width: 1024px) {
  .open-caps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .open-flow-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .open-webhook-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .open-docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .open-cta-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .open-hero {
    padding: 56px 0 60px;
  }

  .open-hero-title {
    font-size: 2.1rem;
  }

  .open-hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 26px;
    gap: 12px;
  }

  .open-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .open-hero-badges {
    gap: 12px 18px;
    padding-top: 18px;
  }

  .open-caps-grid {
    grid-template-columns: 1fr;
  }

  .open-docs-grid {
    grid-template-columns: 1fr;
  }

  .open-cta-card {
    padding: 30px 20px;
  }
}
