/* Reset & Base Variables */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #10b981;
  --bg-main: #f9fafb;
  --bg-light: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utility Classes */
.bg-white { background-color: var(--bg-light); }
.bg-light { background-color: var(--bg-main); }
.section { padding: 80px 0; }
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: var(--text-main);
}

/* Grid System */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background-color: var(--primary); color: white; transform: translateY(-2px); }
.btn-large { padding: 14px 32px; font-size: 1.1rem; }
.btn-block { display: flex; width: 100%; }

/* Cards */
.card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.nav { display: flex; gap: 30px; }
.nav a { font-weight: 500; color: var(--text-muted); }
.nav a:hover { color: var(--primary); }

/* Hero Section */
.hero {
  padding: 100px 0;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  overflow: hidden;
}
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}
.hero-content { 
  flex: 1;
  max-width: 600px; 
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  background: linear-gradient(to right, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 20px;
}

/* Hero Visual & Animations */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}
.dynamic-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 400px;
  transform: rotateY(-5deg) rotateX(5deg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0px) rotateY(-5deg) rotateX(5deg); }
  50% { transform: translateY(-15px) rotateY(-2deg) rotateX(8deg); }
  100% { transform: translateY(0px) rotateY(-5deg) rotateX(5deg); }
}
.connection-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  font-weight: 600;
  color: var(--secondary);
  background: rgba(16, 185, 129, 0.1);
  padding: 10px 15px;
  border-radius: 12px;
}
.status-dot {
  width: 12px;
  height: 12px;
  background: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--secondary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.node-list { display: flex; flex-direction: column; gap: 15px; }
.node-item {
  display: flex;
  justify-content: space-between;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
  font-weight: 500;
  opacity: 0;
  transform: translateX(20px);
}
.node-item .ms { color: var(--secondary); font-family: monospace; font-weight: 700; }
.fly-1 { animation: slideIn 0.5s forwards 0.5s; }
.fly-2 { animation: slideIn 0.5s forwards 1.0s; }
.fly-3 { animation: slideIn 0.5s forwards 1.5s; }
@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}

/* Feature Cards */
.feature-card { text-align: center; }
.feature-card .icon { font-size: 3rem; margin-bottom: 20px; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.feature-card p { color: var(--text-muted); }

/* Streaming Cards */
.streaming-card h3 { font-size: 1.5rem; margin-bottom: 20px; }
.streaming-card p { color: var(--text-muted); margin-bottom: 20px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  background: var(--bg-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  border: 1px solid var(--border);
}

/* Pricing Cards */
.pricing-card { position: relative; text-align: center; display: flex; flex-direction: column; }
.pricing-card.popular { border: 2px solid var(--primary); transform: scale(1.05); }
.pricing-card.popular:hover { transform: scale(1.05) translateY(-5px); }
.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}
.pricing-card h3 { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 15px; }
.pricing-card .price { font-size: 3rem; font-weight: 800; color: var(--text-main); margin-bottom: 30px; }
.pricing-card .currency { font-size: 1.5rem; vertical-align: super; }
.pricing-card .period { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.feature-list { margin-bottom: 30px; text-align: left; flex-grow: 1; }
.feature-list li { margin-bottom: 15px; padding-left: 24px; position: relative; color: var(--text-main); }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: bold;
}

/* Testimonials */
.testimonial-card { display: flex; flex-direction: column; justify-content: space-between; }
.quote { font-size: 1.1rem; font-style: italic; color: var(--text-main); margin-bottom: 20px; flex-grow: 1; }
.user-info { display: flex; align-items: center; gap: 15px; }
.avatar { font-size: 2.5rem; }
.user-details .name { font-weight: 700; }
.user-details .title { font-size: 0.875rem; color: var(--text-muted); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 30px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.faq-item:last-child { border-bottom: none; }
.faq-question { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; color: var(--text-main); }
.faq-answer { color: var(--text-muted); }

/* Footer */
.footer { background: white; border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-muted); font-weight: 500; }
.footer-links a:hover { color: var(--primary); }
.copyright { color: var(--text-muted); font-size: 0.875rem; }

/* Responsive Media Queries */
@media (max-width: 768px) {
  /* 头部保持单行：logo 在左，登录/注册常驻在右，导航收进汉堡菜单 */
  .header-inner { flex-direction: row; height: 60px; padding: 0 20px; gap: 10px; }
  .logo { order: 1; font-size: 1.35rem; }
  .header-inner > .btn-primary { order: 2; margin-left: auto; padding: 9px 16px; font-size: 0.95rem; }
  .nav-toggle { order: 3; }
  .nav {
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 20px 12px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .header.nav-open .nav { display: flex; }
  .nav a { padding: 15px 4px; border-bottom: 1px solid var(--border); font-size: 1.05rem; color: var(--text-main); }
  .nav a:last-child { border-bottom: none; }
  .hero { padding: 60px 0; }
  .hero-container { flex-direction: column; text-align: center; }
  .hero-actions { justify-content: center; flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
  .hero-title { font-size: 2.5rem; }
  .hero-visual { margin-top: 30px; }
  .pricing-card.popular { transform: none; }
  .pricing-card.popular:hover { transform: translateY(-5px); }
  .section-title { font-size: 2rem; }
}

/* ===== 新增：小标题引导语 ===== */
.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 720px;
  margin: -20px auto 40px;
  line-height: 1.8;
}

/* ===== 新增：官网入口卡片 ===== */
.entry-box {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.entry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.entry-row:last-of-type { border-bottom: none; }
.entry-label {
  flex: 0 0 88px;
  font-weight: 700;
  color: var(--text-main);
}
.entry-value {
  flex: 1 1 300px;
  color: var(--text-muted);
  word-break: break-all;
}
.entry-value a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.entry-note {
  margin-top: 20px;
  padding: 16px;
  background: #fff7ed;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== 新增：使用教程步骤卡片 ===== */
.step-card { position: relative; padding-left: 76px; }
.step-num {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step-card p { color: var(--text-muted); line-height: 1.8; }
.step-card a { color: var(--primary); text-decoration: underline; }
.guide-tip {
  max-width: 820px;
  margin: 30px auto 0;
  padding: 18px 20px;
  background: #eef2ff;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  color: var(--text-main);
  line-height: 1.8;
}
.guide-tip a { color: var(--primary); text-decoration: underline; font-weight: 500; }

@media (max-width: 600px) {
  .step-card { padding-left: 24px; padding-top: 72px; }
  .entry-label { flex-basis: 100%; }
}

/* 教程区 4 张步骤卡在宽屏下排成 2×2，避免 auto-fit 产生 3+1 的残缺布局 */
@media (min-width: 900px) {
  #guide .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* 头部为 sticky，锚点跳转时预留出头部高度，避免标题被盖住 */
section[id] { scroll-margin-top: 86px; }
html { scroll-behavior: smooth; }

/* ===== 汉堡菜单按钮：仅 ≤768px 显示（见上方断点） ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-main);
  transition: transform 0.25s ease, opacity 0.15s ease;
}
.header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 菜单展开时锚点留白按 60px 头部计算 */
@media (max-width: 768px) {
  section[id] { scroll-margin-top: 76px; }
}

/* 汉堡按钮的显示必须声明在基础 .nav-toggle{display:none} 之后，否则会被其覆盖 */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
}
