/* ============ 全局变量 ============ */
:root {
  --primary: #e53e3e;
  --primary-dark: #c53030;
  --primary-light: #fc8181;
  --secondary: #2d3748;
  --bg: #faf5f5;
  --bg-tertiary: #f0e4e4;
  --card-bg: #ffffff;
  --text: #1a202c;
  --text-light: #4a5568;
  --text-muted: #a0aec0;
  --border: #f0e4e4;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 10px 40px rgba(229,62,62,0.1), 0 4px 12px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 100%;
}

/* ============ 重置 & 基础 ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container { margin: 0 auto; padding: 0 24px; }

/* ============ 头部导航 ============ */
.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(0,0,0,0.04);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(229,62,62,0.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============ 搜索框 ============ */
.search-box {
  position: relative;
}

.search-box input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 36px 8px 14px;
  border-radius: 20px;
  width: 200px;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box input:focus {
  background: #fff;
  border-color: var(--primary);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}

.search-box button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  padding: 6px;
}

/* ============ 按钮系统 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(229,62,62,0.35); }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}
.btn-secondary:hover { color: #fff; opacity: 0.9; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ============ 标签 ============ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(229,62,62,0.08);
  color: var(--primary);
}

.tag-video { background: rgba(234,88,12,0.08); color: #ea580c; }
.tag-article { background: rgba(5,150,105,0.08); color: #059669; }
.tag-image { background: rgba(124,58,237,0.08); color: #7c3aed; }

/* ============ 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0 60px;
}

.pagination button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============ 加载状态 ============ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  gap: 10px;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; color: var(--text-light); }

/* ============ 页脚 ============ */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 24px 20px;
  margin-top: 40px;
}

.footer-inner {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  gap: 4px;
  text-align: center;
}

.footer-inner a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-inner a:hover {
  color: var(--primary);
}

/* ============ Footer 资质行 & 官网按钮 ============ */
.footer-qual-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.footer-qual-row img {
  height: 42px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.footer-qual-row img:hover {
  opacity: 0.85;
}

.footer-official-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.footer-official-btn svg {
  flex-shrink: 0;
}

/* 劲牛公司官网 - 红色主题 */
.footer-btn-company {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #fff;
  border: 1px solid #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.footer-btn-company:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* 劲牛云商官网 - 橙色主题 */
.footer-btn-shop {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #fff;
  border: 1px solid #ea580c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.footer-btn-shop:hover {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* 首页按钮 - 红色主题 */
.footer-btn-home {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #fff;
  border: 1px solid #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.footer-btn-home:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* ============ 头部导航官网按钮区域 ============ */
.header-official-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-official-btns .footer-official-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.header-official-btns .footer-official-btn svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

/* ============ Toast 提示 ============ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-hover);
  animation: slideIn 0.3s ease;
  min-width: 280px;
}

.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: var(--primary); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ 悬浮客服组件 ============ */
.customer-service-float {
  position: fixed;
  right: 16px;
  bottom: 20%;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cs-panel {
  width: 140px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 16px 12px;
  opacity: 1;
  visibility: visible;
  transition: var(--transition);
}

.cs-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.cs-panel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cs-panel-item:last-child {
  border-bottom: none;
}

.cs-panel-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.cs-panel-item-icon.phone {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.cs-panel-item-icon.wechat {
  background: rgba(7, 193, 96, 0.1);
  color: #07c160;
}

.cs-panel-item-info {
  text-align: center;
}

.cs-panel-item-label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
  margin-bottom: 2px;
}

.cs-panel-item-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: break-all;
}

.cs-panel-item-value a {
  color: var(--primary);
}

.cs-panel-qrcode {
  margin-bottom: 4px;
  text-align: center;
}

.cs-panel-qrcode img {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.cs-panel-qrcode p {
  font-size: 11px;
  color: var(--primary);
  margin-top: 6px;
}

/* 响应式：移动端隐藏悬浮客服 */
@media (max-width: 768px) {
  .customer-service-float {
    display: none;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .nav-links { display: none; }
  .header-official-btns { display: none; }
  .search-box input { width: 140px; }
  .search-box input:focus { width: 180px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
