/* ===== Knowledge Payment Site - Design System ===== */
/* --- CSS Variables --- */
:root {
  --primary: #1a56db;
  --primary-light: #e8f0fe;
  --primary-dark: #1341a8;
  --secondary: #059669;
  --secondary-light: #ecfdf5;
  --accent: #d97706;
  --accent-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --bg: #f9fafb;
  --bg-white: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1200px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
}
.text-center { text-align: center; }

/* --- Header / Nav --- */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand svg { width: 28px; height: 28px; }
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--primary);
  color: white !important;
  padding: 8px 16px !important;
  border-radius: var(--radius);
  border-bottom: none !important;
  cursor: pointer;
}
.nav-cart:hover {
  background: var(--primary-dark);
  color: white !important;
}
.cart-count {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--bg-white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-light);
}
.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: #b45309;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 50%, #312e81 100%);
  color: white;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero-content h1 span {
  color: #fbbf24;
  display: block;
}
.hero-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}
.hero-card h3 { font-size: 20px; margin-bottom: 16px; font-weight: 700; }
.hero-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}
.hero-card-item:last-child { border-bottom: none; }
.hero-card-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
  position: relative;
}
/* Hero Simple (no side card) */
.hero-simple { text-align: center; }
.hero-inner-simple {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.hero-inner-simple h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero-inner-simple h1 span {
  color: #fbbf24;
  display: block;
}
.hero-inner-simple p {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-inner-simple .hero-buttons {
  justify-content: center;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #fbbf24;
}
.hero-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}
.feature-icon.blue { background: var(--primary-light); }
.feature-icon.green { background: var(--secondary-light); }
.feature-icon.amber { background: var(--accent-light); }
.feature-icon.red { background: var(--danger-light); }
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Product Cards ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.product-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}
.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  background: #fff;
}
.product-card-img.has-image {
  height: 200px;
  background: #f8fafc;
  padding: 12px;
}
.product-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.product-card-body { padding: 20px; }
.product-card-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-card-body p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}
.product-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--danger);
}
.product-price .unit { font-size: 14px; font-weight: 400; }
.product-price .original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

/* ===== Section Headers ===== */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.section-badge.exam { background: #e8f0fe; color: #1a56db; }
.section-badge.practical { background: #ecfdf5; color: #059669; }
.section-badge.planet { background: #fffbeb; color: #d97706; }
.section-badge.kaoyan { background: #f3e8ff; color: #7c3aed; }
.section-title-left {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.section-subtitle-left {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Product card real image */
.product-card-img-real {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: 4px;
}
.categories-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.cat-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.cat-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== Product Detail ===== */
.product-detail {
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.product-detail-img {
  background: linear-gradient(135deg, var(--primary-light), #dbeafe);
  border-radius: var(--radius-xl);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  overflow: hidden;
}
.product-detail-icon {
  font-size: 80px;
}
.product-detail-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  background: #fff;
}
.product-detail-info h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.product-detail-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.product-detail-meta span {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}
.product-detail-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 24px;
}
.product-detail-price .original {
  font-size: 18px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 12px;
  font-weight: 400;
}
.product-detail-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}
.product-detail-actions { display: flex; gap: 12px; }
.product-detail-features {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}
.product-detail-features h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.product-detail-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.product-detail-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
}

/* ===== Cart ===== */
.cart-page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
}
.cart-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
}
.cart-empty {
  text-align: center;
  padding: 80px 20px;
}
.cart-empty-icon { font-size: 64px; margin-bottom: 16px; }
.cart-empty h2 { font-size: 20px; margin-bottom: 8px; }
.cart-empty p { color: var(--text-secondary); margin-bottom: 24px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}
.cart-item-img {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cart-item-info p { font-size: 13px; color: var(--text-secondary); }
.cart-item-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--danger);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-qty button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-white);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.cart-item-qty button:hover { background: var(--bg); }
.cart-item-qty span { font-size: 15px; font-weight: 600; min-width: 24px; text-align: center; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}
.cart-item-remove:hover { color: var(--danger); }
.cart-summary {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  border: 1px solid var(--border-light);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.cart-summary-row.total {
  font-size: 20px;
  font-weight: 700;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
}
.cart-summary-row.total .price { color: var(--danger); }
.cart-checkout-btn {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  font-size: 17px;
}

/* ===== Checkout ===== */
.checkout-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px;
}
.checkout-steps {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.checkout-step.active { color: var(--primary); }
.checkout-step.done { color: var(--secondary); }
.checkout-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--border-light);
  color: var(--text-muted);
}
.checkout-step.active .checkout-step-num { background: var(--primary); color: white; }
.checkout-step.done .checkout-step-num { background: var(--secondary); color: white; }
.checkout-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  align-self: center;
}
.checkout-form {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-light);
}
.checkout-form h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color 0.15s;
  background: var(--bg-white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Payment QR */
.payment-qr {
  text-align: center;
  padding: 40px;
}
.payment-qr h3 { font-size: 18px; margin-bottom: 20px; }
.qr-container {
  display: inline-block;
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  margin-bottom: 16px;
}
.qr-container canvas { display: block; }
.payment-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 8px;
}
.payment-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
}
.payment-confirm-btn {
  margin-top: 20px;
}
.payment-security-note {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 20px;
  text-align: center;
  line-height: 1.5;
}

/* PayJS 支付状态指示器 */
.payment-auto-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 16px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 13px;
  color: #3b82f6;
}
.payment-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #dbeafe;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Dashboard ===== */
.dashboard {
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 24px;
}
.dashboard h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.dashboard-subtitle { color: var(--text-secondary); margin-bottom: 32px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}
.dashboard-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
  height: fit-content;
}
.dashboard-sidebar a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
  transition: all 0.15s;
}
.dashboard-sidebar a:hover, .dashboard-sidebar a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.dashboard-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
}
.dashboard-content h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.order-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.order-item:last-child { border-bottom: none; }
.order-item-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.order-item-info { flex: 1; }
.order-item-info h4 { font-size: 15px; font-weight: 600; }
.order-item-info p { font-size: 13px; color: var(--text-secondary); }
.order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.order-status.paid { background: var(--secondary-light); color: var(--secondary); }
.order-status.pending { background: var(--accent-light); color: var(--accent); }
.order-status.pending-confirmation { background: #fef3c7; color: #d97706; font-weight: 600; }
.order-status.cancelled { background: var(--danger-light); color: var(--danger); }

/* ===== Trust Section ===== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.trust-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  border: 1px solid var(--border-light);
}
.trust-card-icon { font-size: 40px; margin-bottom: 16px; }
.trust-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.trust-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.faq-question {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-question:hover { background: var(--bg); }
.faq-answer {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { color: var(--primary); }
.faq-arrow { transition: transform 0.2s; font-size: 12px; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

/* ===== Footer ===== */
.footer {
  background: #111827;
  color: var(--text-muted);
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer-brand { font-size: 20px; font-weight: 700; color: white; margin-bottom: 12px; }
.footer-desc { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.footer h4 { color: white; font-size: 15px; margin-bottom: 16px; }
.footer a { color: var(--text-muted); font-size: 14px; display: block; padding: 4px 0; }
.footer a:hover { color: white; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid #1f2937;
  text-align: center;
  font-size: 13px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.toast.success { background: var(--secondary); }
.toast.error { background: var(--danger); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 { font-size: 20px; margin-bottom: 20px; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 登录拦截弹窗 */
.modal-login-required {
  text-align: center;
  max-width: 400px;
}
.modal-login-icon {
  font-size: 56px;
  margin-bottom: 12px;
}
.modal-login-required h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.modal-login-required p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}
.modal-login-actions {
  display: flex;
  gap: 12px;
}
.modal-login-actions .btn {
  flex: 1;
  padding: 12px 20px;
}

/* ===== Download Links ===== */
.download-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.download-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.download-item-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* ===== Section Tabs (板块导航) ===== */
.section-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.section-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-white);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  text-align: left;
}
.section-tab:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.section-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
}
.section-tab-icon { font-size: 28px; flex-shrink: 0; }
.section-tab-text strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.section-tab-text small { font-size: 12px; color: var(--text-secondary); }

/* ===== Section Panels ===== */
.section-panel { display: none; }
.section-panel.active { display: block; }

/* ===== Sub Tabs (实操子分类) ===== */
.sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.sub-tab {
  padding: 10px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}
.sub-tab:hover { border-color: var(--primary); color: var(--primary); }
.sub-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== Video Intro Section ===== */
.video-intro-section {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-intro-hero {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.video-intro-poster {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.video-intro-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 40px;
  align-items: start;
}
.video-intro-text h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.video-intro-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.video-intro-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.video-intro-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.video-intro-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 700;
}
.video-intro-notes {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.video-intro-notes li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.video-intro-notes li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-weight: 700;
  font-size: 12px;
}

.video-intro-cta {
  display: flex;
  align-items: center;
  gap: 24px;
}
.video-intro-qr {
  text-align: center;
}
.video-intro-qr img {
  width: auto;
  max-width: 160px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.video-intro-qr p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.video-intro-portrait {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.video-intro-portrait img {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Two images displayed side by side below text */
.video-intro-images {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 12px;
  flex-wrap: wrap;
}
.video-intro-images .video-intro-qr,
.video-intro-images .video-intro-portrait {
  flex: 0 0 auto;
}
.video-intro-images .video-intro-qr img {
  width: 200px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.video-intro-images .video-intro-portrait img {
  width: 200px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ===== Planet Images ===== */
.planet-images {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.planet-poster-img {
  max-width: 380px;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.planet-qr-box {
  text-align: center;
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.planet-qr-box img {
  width: auto;
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}
.planet-qr-box p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.planet-qr-box strong {
  color: var(--accent);
  font-size: 16px;
}
.video-course-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.video-course-preview {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  position: relative;
  background: #000;
}
.video-course-preview iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-course-preview-banner {
  width: 100%;
  background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-course-preview-banner img {
  max-width: 600px;
  width: 100%;
  height: auto;
}
.video-course-info {
  padding: 24px;
}
.video-course-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.video-course-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Consulting Card ===== */
.consulting-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.consulting-card-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 32px;
  background: linear-gradient(135deg, var(--primary-light), #ede9fe);
}
.consulting-card-header h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.consulting-card-header p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.consulting-card-features {
  padding: 24px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.consulting-feature-item {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
}
.consulting-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-top: 1px solid var(--border-light);
}

/* ===== News List ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all 0.15s;
}
.news-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.news-item-date {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  flex-shrink: 0;
  min-width: 80px;
}
.news-item-title {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}
.news-item-arrow {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== Planet Intro ===== */
.planet-intro {
  max-width: 800px;
  margin: 0 auto;
}
.planet-hero {
  text-align: center;
  padding: 48px 0 40px;
}
.planet-hero-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.planet-hero h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}
.planet-hero p {
  font-size: 16px;
  color: var(--text-secondary);
}
.planet-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.planet-feature {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
}
.planet-feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.planet-feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.planet-feature p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.planet-cta {
  text-align: center;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius-xl);
  padding: 40px;
}
.planet-cta p { font-size: 16px; color: var(--text); }
.planet-qr-placeholder {
  margin-top: 20px;
  padding: 24px;
  background: white;
  border-radius: var(--radius-lg);
  display: inline-block;
}
.planet-qr-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ===== Placeholder Section ===== */
.placeholder-section {
  text-align: center;
  padding: 80px 20px;
  max-width: 600px;
  margin: 0 auto;
}
.placeholder-icon { font-size: 64px; margin-bottom: 20px; }
.placeholder-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.placeholder-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.placeholder-status {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 20px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ===== Section Overview Cards (Homepage) ===== */
.section-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.section-overview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.section-overview-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.section-overview-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.section-overview-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-overview-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.section-overview-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ===== Auth Pages ===== */
.auth-page {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 24px;
}
.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-form .form-group {
  margin-bottom: 20px;
}
.auth-form .form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.auth-form .form-group input {
  padding: 12px 16px;
  font-size: 15px;
}
.auth-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 8px;
}
.auth-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
}
.auth-success {
  background: var(--secondary-light);
  color: var(--secondary);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* ===== Nav User Menu ===== */
#nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-login-link {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-login-link:hover {
  color: var(--primary);
}
.nav-register-btn {
  background: var(--primary);
  color: white !important;
  padding: 8px 16px !important;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border-bottom: none !important;
  cursor: pointer;
}
.nav-register-btn:hover {
  background: var(--primary-dark);
  color: white !important;
}
.nav-user-area {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  transition: all 0.15s;
}
.nav-user-trigger:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.nav-user-avatar-text {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.nav-user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-user-arrow {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
}
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
}
.nav-user-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: none !important;
  transition: background 0.1s;
}
.nav-user-dropdown a:hover {
  background: var(--bg);
  color: var(--primary);
}

/* ===== Profile Info Rows ===== */
.profile-info-row {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label {
  width: 80px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}
.profile-info-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

/* ===== 移动端导航系统 ===== */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  position: relative;
}
.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.mobile-nav-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.mobile-nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1098;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav-backdrop.active {
  display: block;
  opacity: 1;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  z-index: 1099;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav-panel.active {
  transform: translateX(0);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.mobile-nav-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg, #f3f4f6);
  border-radius: 50%;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-links {
  flex: 1;
  padding: 12px 0;
}
.mobile-nav-links a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
  min-height: 48px;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: var(--bg-hover, #f0f4ff);
  color: var(--primary);
}
.mobile-nav-links a.nav-cart {
  color: var(--primary);
  font-weight: 600;
}

/* 手机端导航底部用户功能区域 */
.mobile-nav-user-section a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
  min-height: 48px;
}
.mobile-nav-user-section a:hover {
  background: var(--bg-hover, #f0f4ff);
  color: var(--primary);
}

body.mobile-nav-open {
  overflow: hidden;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-stats { display: none; }
  .hero-content h1 { font-size: 32px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-tabs { grid-template-columns: repeat(2, 1fr); }
  .consulting-card-features { grid-template-columns: repeat(2, 1fr); }
  .planet-features { grid-template-columns: 1fr; }
  .section-overview-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 平板 + 大屏手机 */
@media (max-width: 768px) {
  /* 导航 */
  .mobile-nav-toggle { display: flex; }
  .nav-links { display: none; }
  .nav { padding: 0 16px; }
  .nav-brand { font-size: 15px; }
  .nav-avatar { width: 32px; height: 32px; }

  /* 全局 */
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  .section-subtitle { font-size: 14px; }
  .section-subtitle-left { font-size: 13px; }
  .section-title-left { font-size: 20px; }
  .section-badge { font-size: 11px; padding: 3px 10px; }

  /* Hero */
  .hero { padding: 48px 0 32px; }
  .hero-content h1 { font-size: 24px; line-height: 1.3; }
  .hero-content p { font-size: 14px; }
  .hero-card { padding: 16px; }
  .hero-inner-simple h1 { font-size: 24px; }
  .hero-inner-simple p { font-size: 14px; }

  /* 网格 */
  .features-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .trust-grid { grid-template-columns: 1fr; }
  .section-overview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .section-overview-card { padding: 16px 10px; }
  .section-overview-icon { font-size: 28px; }
  .section-overview-card h3 { font-size: 14px; }

  /* 商品卡片 */
  .product-card { border-radius: 12px; }
  .product-card-body { padding: 12px; }
  .product-card-body h3 { font-size: 13px; }
  .product-card-price { font-size: 16px; }

  /* 详情页 */
  .product-detail { grid-template-columns: 1fr; gap: 20px; }
  .product-detail-img { height: 200px; border-radius: 12px; }

  /* 购物车/结算 */
  .cart-table { font-size: 13px; }
  .cart-table th,
  .cart-table td { padding: 10px 8px; }
  .form-row { grid-template-columns: 1fr; }

  /* 底部 */
  .footer { padding: 32px 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-desc { font-size: 13px; }

  /* 标签 */
  .section-tabs { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .section-tab { padding: 12px; gap: 8px; }
  .section-tab-icon { font-size: 22px; }
  .section-tab-text strong { font-size: 13px; }
  .section-tab-text small { font-size: 11px; }
  .sub-tabs { gap: 4px; flex-wrap: wrap; }
  .sub-tab { padding: 7px 12px; font-size: 13px; }

  /* 咨询卡片 */
  .consulting-card-features { grid-template-columns: 1fr; }
  .consulting-card-header { flex-direction: column; padding: 16px; }
  .consulting-card-features { padding: 16px; }
  .consulting-card-footer { flex-direction: column; gap: 12px; padding: 16px; }

  /* 星球 */
  .planet-hero { padding: 20px 0; }
  .planet-hero-icon { font-size: 42px; }
  .planet-hero h2 { font-size: 20px; }
  .planet-cta { padding: 20px; }
  .planet-features { grid-template-columns: 1fr; }
  .planet-images { flex-direction: column; align-items: center; }
  .planet-poster-img { max-width: 240px; }

  /* 视频课程 */
  .video-intro-body { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .video-intro-features { grid-template-columns: 1fr; }
  .video-intro-images { justify-content: flex-start; gap: 20px; }
  .video-intro-images .video-intro-qr img,
  .video-intro-images .video-intro-portrait img { width: 140px; }
  .video-intro-text h2 { font-size: 18px; }
  .video-intro-desc { font-size: 14px; }
  .video-course-info { padding: 14px; }

  /* 新闻 */
  .news-item { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; }
  .news-item-date { min-width: auto; font-size: 12px; }

  /* 登录/注册 */
  .auth-card { padding: 28px 20px; border-radius: 12px; }
  .auth-card h2 { font-size: 20px; }

  /* 弹窗 */
  .modal { width: 92vw; padding: 24px 20px; border-radius: 14px; }
  .checkout-steps { font-size: 11px; gap: 4px; }
  .checkout-step { padding: 6px 8px; }

  /* FAQ */
  .faq-list { max-width: 100%; }
  .faq-question { padding: 14px 16px; font-size: 14px; }
  .faq-answer { padding: 0 16px 14px; font-size: 13px; }
}

/* 小屏手机 */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .section { padding: 32px 0; }

  .hero { padding: 36px 0 28px; }
  .hero-content h1 { font-size: 20px; }
  .hero-inner-simple h1 { font-size: 20px; }
  .section-title-left { font-size: 18px; }

  .products-grid { grid-template-columns: 1fr; gap: 10px; }
  .section-overview-grid { grid-template-columns: 1fr; gap: 8px; }
  .section-tabs { grid-template-columns: 1fr; gap: 6px; }

  .nav-brand { font-size: 14px; }
  .nav-avatar { width: 28px; height: 28px; }

  /* 按钮触控优化 */
  .btn { min-height: 44px; padding: 10px 20px; font-size: 14px; }
  .btn-lg { min-height: 48px; padding: 12px 28px; font-size: 15px; }
  .product-detail-actions .btn { min-height: 48px; width: 100%; margin-bottom: 8px; }

  /* 表单 */
  input, select, textarea {
    font-size: 16px; /* 防止iOS缩放 */
    min-height: 44px;
    padding: 10px 12px;
  }

  /* 商品详情 */
  .product-detail-info h1 { font-size: 18px; }
  .product-detail-price { font-size: 22px; }
  .product-detail-actions { flex-direction: column; }

  /* 后台订单表 */
  .dashboard-grid { gap: 16px; }

  /* 弹窗链接 */
  .modal-login-actions { flex-direction: column; }
  .modal-login-actions .btn { width: 100%; }
  .modal-login-icon { font-size: 40px; }

  /* 赠品展示 */
  .gift-showcase { padding: 20px 16px; }
  .gift-showcase h3 { font-size: 18px; }
  .gift-showcase .gift-icon { font-size: 36px; }

  /* 视频课程图片 */
  .video-intro-images { flex-direction: row; justify-content: flex-start; align-items: flex-start; gap: 16px; }
  .video-intro-images .video-intro-qr img,
  .video-intro-images .video-intro-portrait img { width: 130px; height: auto; }
  .video-intro-text h2 { font-size: 17px; }
  .video-intro-text h3 { font-size: 15px; }
  .video-intro-features li { font-size: 13px; }
  .video-intro-notes li { font-size: 12px; }

  /* Footer */
  .footer-brand { font-size: 16px; }
  .footer h4 { font-size: 13px; }
  .footer a, .footer p { font-size: 12px; }

  /* 分类过滤 */
  .category-filter { flex-wrap: wrap; gap: 6px; }
  .category-filter-btn { padding: 6px 12px; font-size: 12px; }

  /* 轻量弹窗关闭 */
  .img-lightbox-close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 20px; }
}

/* ===== 触控友好全局 ===== */
@media (hover: none) and (pointer: coarse) {
  /* 增大点击区域 */
  a, button, .btn, .nav-links a, .sub-tab, .category-filter-btn {
    cursor: pointer;
    touch-action: manipulation;
  }
  /* 移除hover依赖的效果 */
  .product-card:hover { transform: none; }
  .product-card:active { transform: scale(0.98); }
}

/* ===== Image Lightbox ===== */
.img-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}
.img-lightbox-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  cursor: default;
}
.img-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 24px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.img-lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* Make product images look clickable */
.product-card-image,
.product-card-img-real,
.product-detail-image,
.planet-poster-img,
.video-intro-qr img,
.video-intro-images img,
.planet-qr-box img,
.payment-qr img {
  cursor: pointer;
  transition: transform 0.15s;
}
.product-card-image:hover,
.product-card-img-real:hover,
.product-detail-image:hover,
.planet-poster-img:hover,
.video-intro-qr img:hover,
.video-intro-images img:hover,
.planet-qr-box img:hover {
  transform: scale(1.03);
}

/* Gift display-only section */
.gift-showcase {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  border: 2px dashed #f59e0b;
  text-align: center;
}
.gift-showcase h3 {
  font-size: 22px;
  color: #92400e;
  margin: 0 0 8px;
}
.gift-showcase .gift-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.gift-showcase p {
  color: #a16207;
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto 16px;
}
.gift-showcase .gift-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.gift-showcase .gift-tag {
  background: #fff;
  border: 1px solid #fbbf24;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  color: #78350f;
  font-weight: 500;
}
.gift-showcase .gift-note {
  font-size: 13px;
  color: #a16207;
  margin-top: 8px;
}
