/* ============================================================
   Scarlett 产品展示站 — 设计系统
   基于参考截图：极简白底 / 黑字 / 大标题 / 卡片浮动风格
   ============================================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Colors - Minimal Light Theme */
  --color-bg: #FFFFFF;
  --color-bg-secondary: #F8F9FA;
  --color-bg-card: #FFFFFF;
  --color-bg-code: #F1F3F5;
  --color-text-primary: #1A1A2E;
  --color-text-secondary: #4A4A6A;
  --color-text-muted: #8E8EA0;
  --color-border: #E8E8ED;
  --color-border-light: #F0F0F3;

  /* Accent */
  --color-accent: #1A1A2E;
  --color-accent-hover: #2D2D4A;
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-success: #10B981;
  --color-success-bg: #D1FAE5;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 26, 46, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
  --shadow-lg: 0 8px 30px rgba(26, 26, 46, 0.08);
  --shadow-xl: 0 16px 50px rgba(26, 26, 46, 0.10);
  --shadow-card: 0 2px 16px rgba(26, 26, 46, 0.06);
  --shadow-card-hover: 0 8px 32px rgba(26, 26, 46, 0.12);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.9rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.3rem, 1.1rem + 1vw, 1.5rem);
  --text-2xl: clamp(1.6rem, 1.3rem + 1.5vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 2.8rem);
  --text-4xl: clamp(2.5rem, 1.8rem + 3.5vw, 3.8rem);
  --text-hero: clamp(2.8rem, 2rem + 4vw, 4.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-section: clamp(4rem, 3rem + 4vw, 8rem);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--space-xl) * 2);
  max-width: calc(var(--max-width) + var(--space-xl) * 2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  padding: var(--space-sm) var(--space-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.02em;
}

.navbar-brand .brand-icon {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-text-primary);
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .navbar {
    width: calc(100% - var(--space-md) * 2);
    top: var(--space-sm);
  }

  .nav-toggle {
    display: flex;
  }

  .navbar-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    gap: var(--space-xl);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: 999;
  }

  .navbar-links.open {
    right: 0;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Overlay for mobile menu */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
}

.nav-overlay.show {
  display: block;
}

/* ---------- Hero / Landing Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-text-primary);
  border-radius: 50%;
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: var(--space-lg);
}

.hero-title .highlight {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF3D81 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  background: var(--color-accent);
  color: white;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.hero-cta:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* Decorative books at bottom of hero */
.hero-decor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 280px;
  overflow: hidden;
  pointer-events: none;
}

.hero-decor-inner {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.decor-book {
  position: absolute;
  bottom: -20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-slow);
}

.decor-book:hover {
  transform: translateY(-10px) rotate(0deg) !important;
}

.decor-book:nth-child(1) { left: 5%; width: 140px; height: 190px; background: linear-gradient(135deg, #1A1A2E 0%, #2D2D4A 100%); transform: rotate(-8deg); }
.decor-book:nth-child(2) { left: 18%; width: 130px; height: 180px; background: linear-gradient(135deg, #E8E0D5 0%, #D4C9B8 100%); transform: rotate(-3deg); }
.decor-book:nth-child(3) { left: 32%; width: 150px; height: 200px; background: linear-gradient(135deg, #FFE066 0%, #F9C74F 100%); transform: rotate(2deg); }
.decor-book:nth-child(4) { right: 32%; width: 145px; height: 195px; background: linear-gradient(135deg, #FFF 0%, #F0F0F3 100%); border: 1px solid var(--color-border); transform: rotate(-2deg); }
.decor-book:nth-child(5) { right: 18%; width: 135px; height: 185px; background: linear-gradient(135deg, #69DB7C 0%, #40C057 100%); transform: rotate(5deg); }
.decor-book:nth-child(6) { right: 5%; width: 140px; height: 190px; background: linear-gradient(135deg, #FF8FA3 0%, #F06595 100%); transform: rotate(-5deg); }

@media (max-width: 768px) {
  .hero-decor { height: 200px; }
  .decor-book:nth-child(1),
  .decor-book:nth-child(2),
  .decor-book:nth-child(5),
  .decor-book:nth-child(6) { display: none; }
  .decor-book:nth-child(3) { left: 15%; width: 120px; height: 160px; }
  .decor-book:nth-child(4) { right: 15%; width: 120px; height: 160px; }
}

/* ---------- Section Common ---------- */
.section {
  padding: var(--space-section) 0;
}

.section-header {
  margin-bottom: var(--space-3xl);
}

.section-number {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
  max-width: 560px;
}

/* ---------- Product Cards Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-md) 0;
}

.product-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, var(--color-primary));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.product-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--card-bg, var(--color-bg-secondary));
  flex-shrink: 0;
}

.product-card-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg-code);
  color: var(--color-text-secondary);
}

.product-card-name {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.product-card-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.product-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-success);
  background: var(--color-success-bg);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.product-card-arrow {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition-base);
}

.product-card:hover .product-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Product Detail Page ---------- */

/* Detail Hero */
.detail-hero {
  padding: calc(var(--nav-height) + var(--space-4xl)) 0 var(--space-3xl);
  text-align: center;
  position: relative;
}

.detail-hero-back {
  position: absolute;
  top: calc(var(--nav-height) + var(--space-lg));
  left: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.detail-hero-back:hover {
  color: var(--color-text-primary);
}

.detail-hero-back svg {
  width: 18px;
  height: 18px;
}

.detail-product-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  margin: 0 auto var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: var(--shadow-lg);
}

.detail-product-name {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.detail-product-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.detail-product-tagline {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto var(--space-xl);
}

.detail-product-price {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-base);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
}

/* Phone Mockup Section */
.phone-showcase {
  padding: var(--space-3xl) 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: #1A1A2E;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 2px #2D2D4A;
  position: relative;
}

.phone-mockup-screen {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-mockup-notch {
  width: 120px;
  height: 28px;
  background: #1A1A2E;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  flex-shrink: 0;
}

.phone-mockup-content {
  flex: 1;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.phone-mockup-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.phone-mockup-content p {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Feature Cards Horizontal Scroll */
.feature-scroll-section {
  padding: var(--space-2xl) 0;
  overflow: hidden;
}

.feature-scroll {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  padding: var(--space-md) 0 var(--space-xl);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.feature-scroll::-webkit-scrollbar {
  display: none;
}

.feature-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  scroll-snap-align: start;
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-light);
  cursor: default;
}

.feature-card:hover {
  background: var(--color-bg-card);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: var(--shadow-sm);
}

.feature-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.feature-card-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Activation Code Section */
.code-section {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin: var(--space-2xl) 0;
}

.code-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.code-display {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.15em;
  position: relative;
  overflow: hidden;
}

.code-value {
  flex: 1;
  color: var(--color-text-primary);
  user-select: all;
}

.code-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
  font-weight: 400;
  letter-spacing: normal;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--color-accent-hover);
}

.btn-copy.copied {
  background: var(--color-success);
}

.btn-copy svg {
  width: 16px;
  height: 16px;
}

/* Download Buttons */
.download-section {
  margin: var(--space-2xl) 0;
}

.download-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.download-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.download-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.download-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.download-card-platform {
  font-weight: 600;
  font-size: var(--text-base);
}

.download-card-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.download-link-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.download-link {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-copy-sm:hover {
  background: var(--color-bg-code);
  color: var(--color-text-primary);
}

.btn-copy-sm.copied {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: var(--color-success);
}

/* Tutorial Section */
.tutorial-section {
  margin: var(--space-3xl) 0;
}

.tutorial-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}

.tutorial-tab {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.tutorial-tab:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
}

.tutorial-tab.active {
  color: var(--color-accent);
  background: var(--color-bg-secondary);
  font-weight: 600;
}

.tutorial-content {
  display: none;
}

.tutorial-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.tutorial-steps {
  counter-reset: step;
}

.tutorial-step {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border-light);
  counter-increment: step;
}

.tutorial-step:last-child {
  border-bottom: none;
}

.tutorial-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.tutorial-step-num::before {
  counter-content: step;
}

.tutorial-step-text {
  flex: 1;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.tutorial-notes {
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.tutorial-notes-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #92400E;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tutorial-notes ul {
  list-style: disc;
  padding-left: var(--space-lg);
}

.tutorial-notes li {
  font-size: var(--text-sm);
  color: #78350F;
  line-height: 1.8;
  margin-bottom: var(--space-xs);
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-accent);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--color-success);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-2xl) 0 var(--space-lg);  /* 原 4rem/2rem → 3rem/1.5rem，整体上移、贴近上方内容 */
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.footer-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}

.decor-book {
  animation: float 4s ease-in-out infinite;
}
.decor-book:nth-child(2) { animation-delay: -0.5s; --rot: -3deg; }
.decor-book:nth-child(3) { animation-delay: -1s; --rot: 2deg; }
.decor-book:nth-child(4) { animation-delay: -1.5s; --rot: -2deg; }
.decor-book:nth-child(5) { animation-delay: -2s; --rot: 5deg; }
.decor-book:nth-child(6) { animation-delay: -2.5s; --rot: -5deg; }

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

  .download-grid {
    grid-template-columns: 1fr;
  }

  .phone-mockup {
    width: 240px;
    height: 480px;
  }

  .feature-card {
    width: 170px;
  }

  .code-display {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy {
    justify-content: center;
  }

  .tutorial-step {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
