/* ==========================================================================
   海獭 HaiTa - 专属“海洋极客 Otter Neon”高互动无障碍设计系统
   ========================================================================== */

:root {
  /* 海洋海獭核心调色板 - 高清晰度极速无障碍版 */
  --bg-dark: #030812;
  --bg-deep: #061526;
  --bg-card: rgba(8, 22, 38, 0.75);
  --bg-card-hover: rgba(14, 34, 58, 0.9);
  --bg-glass: rgba(0, 245, 212, 0.05);
  
  /* 海獭品牌色彩：碧海青 + 极光蓝 + 珍珠金 + 珊瑚粉 */
  --primary: #00f5d4;
  --primary-blue: #00bbf9;
  --primary-purple: #7209b7;
  --accent-gold: #ffb703;
  --accent-coral: #f72585;
  --accent-green: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #a0aec0;
  --text-dim: #94a3b8; /* 优化对比度 >= 4.5:1 */
  
  /* 渐变系统 */
  --gradient-otter: linear-gradient(135deg, #00f5d4 0%, #00bbf9 50%, #ffb703 100%);
  --gradient-btn: linear-gradient(135deg, #00f5d4 0%, #0096c7 100%);
  --gradient-btn-hover: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  --gradient-gold: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  --gradient-purple: linear-gradient(135deg, #7209b7 0%, #f72585 100%);
  
  --border-subtle: rgba(0, 245, 212, 0.2);
  --border-glow: rgba(0, 245, 212, 0.5);
  
  --shadow-glow: 0 0 30px rgba(0, 245, 212, 0.25);
  --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* 使用系统高灵敏度原生字体栈，移除外部 HTTP 字体请求 */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  background: radial-gradient(circle at 50% 0%, #092036 0%, #050d18 70%);
  position: relative;
  min-height: 100vh;
}

/* 键盘 Tab 键高亮焦点规范 */
:focus-visible {
  outline: 3px solid var(--primary) !important;
  outline-offset: 3px !important;
}

/* 键盘无障碍跳过入口 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary);
  color: #030812;
  padding: 12px 24px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 20px;
}

/* 锚点防遮挡 */
section[id], article[id] {
  scroll-margin-top: 90px;
}

/* 动态深海发光气泡背景特效 */
.bubbles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.35;
}

.bubble {
  position: absolute;
  bottom: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 245, 212, 0.25), rgba(0, 245, 212, 0));
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: 50%;
  animation: bubbleRise 18s infinite linear;
}

@keyframes bubbleRise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-120vh) scale(1.2); opacity: 0; }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* 文字与渐变特效 */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-otter);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* 按钮与触控区域规范 (手机端 ≥ 44x44 CSSpx) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #050d18;
  box-shadow: 0 6px 25px rgba(0, 245, 212, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 35px rgba(0, 245, 212, 0.6);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(10, 26, 44, 0.8);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(15, 38, 64, 0.95);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.15);
}

.btn-lg {
  padding: 18px 36px;
  min-height: 52px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 10px 22px;
  min-height: 44px;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.1);
}

/* 顶栏 Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 13, 24, 0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
}

.logo-icon-otter {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 245, 212, 0.1);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  animation: otterFloat 4s ease-in-out infinite;
}

@keyframes otterFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}

.logo-icon-otter svg {
  width: 28px;
  height: 28px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-fast);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero 区域设计 */
.hero-section {
  padding: 90px 0 70px;
  text-align: center;
}

.hero-otter-mascot {
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.25) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatMascot 3s ease-in-out infinite;
}

@keyframes floatMascot {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* 互动测速模拟挂件 */
.speed-test-widget {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  text-align: left;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ping-display {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar-fill {
  height: 100%;
  width: 98%;
  background: var(--gradient-btn);
  border-radius: 4px;
  transition: width 1s ease;
}

.widget-nodes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.node-chip {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  min-height: 44px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.node-chip:hover, .node-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 245, 212, 0.1);
}

/* 核心优势卡片 */
.features-section {
  padding: 90px 0;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition-smooth);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--bg-card-hover);
}

.feature-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.feature-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-desc {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 生态应用卡片 */
.ecosystem-section {
  padding: 60px 0 90px;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.eco-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.eco-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 245, 212, 0.2);
  background: var(--bg-card-hover);
}

.eco-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
}

.eco-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.eco-tag {
  font-size: 0.75rem;
  color: var(--primary);
  margin-top: 4px;
  font-weight: 600;
}

/* 价格对比表 */
.pricing-section {
  padding: 90px 0;
}

.pricing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
}

.toggle-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-label.active {
  color: var(--primary);
}

.toggle-switch {
  width: 56px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
}

.toggle-switch.active {
  background: var(--primary);
}

.toggle-dot {
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 4px;
  transition: var(--transition-fast);
}

.toggle-switch.active .toggle-dot {
  left: 28px;
  background: #050d18;
}

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

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 0 40px rgba(0, 245, 212, 0.3);
  background: rgba(10, 32, 54, 0.85);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  right: 28px;
  background: var(--gradient-gold);
  color: #050d18;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: var(--radius-full);
}

.plan-name {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 20px 0;
}

.plan-currency {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.plan-price {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
}

.plan-period {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin-bottom: 36px;
  flex-grow: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.plan-features li svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  flex-shrink: 0;
}

/* 用户评价 */
.reviews-section {
  padding: 80px 0;
}

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

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}

.review-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.review-stars {
  color: var(--accent-gold);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* 原生 details/summary 无障碍 FAQ 样式 (无需 JS 亦可开合!) */
.faq-section {
  padding: 80px 0 100px;
}

.faq-container-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.faq-container-wrap .section-header {
  text-align: left;
  margin-bottom: 32px;
}

.faq-container-wrap .section-desc {
  margin: 8px 0 0 0;
}

.faq-list {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
  backdrop-filter: blur(12px);
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 245, 212, 0.15);
}

.faq-item summary {
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  color: var(--text-main);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  flex-shrink: 0;
  stroke: var(--primary);
  stroke-width: 2.5;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item[open] summary {
  color: var(--primary);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  stroke: var(--accent-gold);
}

.faq-answer-content {
  padding: 16px 24px 24px;
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.8;
  border-top: 1px solid rgba(0, 245, 212, 0.1);
}

/* 页脚 */
.site-footer {
  background: #030810;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  text-align: center;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
}

.footer-nav a {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--primary);
}

/* 子页面通用布局 */
.page-header {
  padding: 70px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 22, 40, 0.5);
}

.page-title {
  font-size: 2.75rem;
  margin-bottom: 12px;
}

.page-content-wrap {
  padding: 60px 0 100px;
  max-width: 860px;
  margin: 0 auto;
}

.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(16px);
  margin-bottom: 30px;
}

.content-box h2 {
  font-size: 1.5rem;
  margin: 28px 0 14px;
  color: var(--primary);
  border-bottom: 1px solid rgba(0, 245, 212, 0.1);
  padding-bottom: 8px;
}

.content-box h2:first-child {
  margin-top: 0;
}

/* 📱 响应式 @media */
@media (max-width: 1024px) {
  .nav-links { gap: 16px; font-size: 0.9rem; }
  .hero-title { font-size: 2.75rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .ecosystem-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-section { padding: 50px 0 40px; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-cta-group { flex-direction: column; width: 100%; }
  .hero-cta-group .btn { width: 100%; }
  .features-grid, .pricing-grid, .reviews-grid { grid-template-columns: 1fr; }
  .ecosystem-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-nav { flex-direction: column; gap: 18px; }
}

/* 动效降级处理 (Reduced Motion) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bubble, .hero-otter-mascot, .logo-icon-otter {
    animation: none !important;
  }
}
