/* 凌蓝模板 theme.css - 参考零途云风格 */
:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-light: #e6f4ff;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --bg: #f5f7fa;
  --card-bg: #fff;
  --border: #e8e8e8;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(22,119,255,0.15);
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.site-header {
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #4096ff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
}
.main-nav {
  display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center;
}
.main-nav a {
  padding: 8px 16px; color: var(--text); font-size: 15px;
  white-space: nowrap; border-radius: 6px; transition: all .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: var(--primary-light); }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-actions a { color: var(--text-secondary); font-size: 14px; white-space: nowrap; }
.header-actions a:hover { color: var(--primary); }
.btn-register {
  background: var(--primary); color: #fff !important; padding: 8px 20px;
  border-radius: 6px; font-weight: 500;
}
.btn-register:hover { background: var(--primary-dark); }

/* 汉堡按钮（手机端） */
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }

/* ===== 轮播 Banner ===== */
.hero {
  background: linear-gradient(135deg, #f0f5ff 0%, #e6f4ff 50%, #bae0ff 100%);
  padding: 60px 0; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -100px; top: 50%; transform: translateY(-50%);
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22,119,255,0.1), transparent 70%);
}
.hero-content { max-width: 600px; position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; background: var(--primary); color: #fff;
  padding: 2px 12px; border-radius: 4px; font-size: 13px; margin-bottom: 16px;
}
.hero h1 { font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; color: var(--text); }
.hero p { font-size: 16px; color: var(--text-secondary); margin-bottom: 28px; }
.hero .btn-group { display: flex; gap: 12px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 10px 28px; border-radius: 6px;
  font-size: 15px; font-weight: 500; cursor: pointer; border: none;
  transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-block { display: block; width: 100%; }

/* ===== 特性图标行 ===== */
.features { padding: 40px 0; background: #fff; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.feature-text { font-size: 15px; font-weight: 500; }

/* ===== 产品区 ===== */
.section { padding: 50px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.section-title p { color: var(--text-muted); font-size: 14px; }

.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.product-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: all 0.3s; border: 1px solid transparent;
}
.product-card:hover { box-shadow: var(--shadow-hover); border-color: var(--primary); transform: translateY(-2px); }
.product-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.product-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; min-height: 40px; }
.product-price { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.product-price .price-unit { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.rec-tag {
  display: inline-block; background: #fff2e8; color: #fa8c16;
  font-size: 12px; padding: 1px 8px; border-radius: 4px; margin-left: 8px; font-weight: 400;
}

/* 分类卡片 */
.group-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.group-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px;
  text-align: center; box-shadow: var(--shadow); transition: all 0.3s;
}
.group-card:hover { box-shadow: var(--shadow-hover); }
.group-card .card-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.group-card .card-desc { font-size: 13px; color: var(--text-muted); }

/* ===== 公告 ===== */
.notice-panel {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px 28px;
  box-shadow: var(--shadow);
}
.news-list { list-style: none; }
.news-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f5f5f5;
}
.news-list li:last-child { border-bottom: none; }
.news-time { color: var(--text-muted); font-size: 13px; }
.news-more { text-align: center; margin-top: 12px; }

/* ===== 底部统计条 ===== */
.stats-bar {
  background: #1a1a2e; color: #fff; padding: 40px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.stats-num { font-size: 36px; font-weight: 700; color: #fff; }
.stats-label { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ===== Footer ===== */
.site-footer {
  background: #fafafa; border-top: 1px solid var(--border);
  padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* ===== 通用面板（内页） ===== */
.panel {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}

/* ===== 产品详情页 ===== */
.detail-box { margin-top: 20px; }
.detail-head { margin-bottom: 24px; }
.detail-head h2 { font-size: 28px; font-weight: 700; margin: 8px 0; }
.detail-head p { color: var(--text-secondary); font-size: 15px; }

.panel-section { margin-bottom: 32px; }
.section-title {
  font-size: 20px; font-weight: 600; text-align: center;
  margin-bottom: 20px; color: var(--text);
}

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px 16px;
  text-align: center; box-shadow: var(--shadow); transition: all 0.3s;
  border-top: 3px solid var(--primary);
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.feature-icon { font-size: 32px; margin-bottom: 8px; }
.feature-name { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 15px; }
.feature-desc { font-size: 13px; color: var(--primary); font-weight: 500; }

.config-list {
  background: var(--card-bg); border-radius: var(--radius); padding: 8px 24px;
  box-shadow: var(--shadow);
}
.config-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px;
}
.config-item:last-child { border-bottom: none; }
.config-key { color: var(--text-secondary); font-weight: 500; }
.config-val { color: var(--text); font-weight: 600; }
.empty-tip { text-align: center; color: var(--text-muted); padding: 20px 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
table th { background: #fafafa; font-weight: 600; font-size: 14px; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-success { background: #f6ffed; color: var(--success); }
.badge-warning { background: #fffbe6; color: var(--warning); }
.badge-danger { background: #fff2f0; color: var(--danger); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-actions .nav-link { display: none; }
  .hamburger { display: block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px 0; border-bottom: none; border-left: 3px solid transparent; }
  .main-nav a.active, .main-nav a:hover { border-left-color: var(--primary); }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; gap: 30px; }
}
/* 登录页样式补充 */
.auth-wrap { display: flex; justify-content: center; padding: 60px 20px; }
.auth-box { width: 100%; max-width: 420px; background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 36px 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.auth-box h2 { margin: 0 0 24px; font-size: 22px; text-align: center; color: #1a1a1a; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; margin-bottom: 6px; font-size: 14px; color: #666; }
.form-item input { width: 100%; padding: 10px 14px; border: 1px solid #e8e8e8; border-radius: 8px; font-size: 15px; box-sizing: border-box; }
.form-item .btn { width: 100%; background: #1677ff; color: #fff; padding: 12px; font-size: 16px; border: none; border-radius: 8px; cursor: pointer; }
.form-links { margin-top: 16px; text-align: center; font-size: 14px; }
.form-links a { margin: 0 8px; }
.site-footer { background: #fff; padding: 24px 0; text-align: center; color: #999; font-size: 13px; margin-top: 40px; border-top: 1px solid #f0f0f0; }
.site-footer a { margin: 0 6px; font-size: 13px; }

/* ===== 页面标题区 ===== */
.page-head { padding: 30px 0 20px; }
.page-head h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.page-head p { color: var(--text-muted); font-size: 14px; }

/* ===== 产品类型Tab ===== */
.type-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px; padding: 6px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.type-tab {
  padding: 8px 20px; border-radius: 6px; font-size: 14px;
  color: var(--text-secondary); transition: all .2s; white-space: nowrap;
}
.type-tab:hover { color: var(--primary); background: var(--primary-light); }
.type-tab.active { background: var(--primary); color: #fff; }

/* ===== 产品列表布局 ===== */
.product-layout { display: flex; gap: 24px; align-items: flex-start; }
.product-sidebar {
  width: 220px; flex-shrink: 0; background: #fff;
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.sidebar-title {
  font-size: 15px; font-weight: 600; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
}
.region-tree { font-size: 14px; }
.region-item {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--text-secondary); cursor: pointer; margin-bottom: 2px;
}
.region-item:hover { background: var(--primary-light); color: var(--primary); }
.region-item.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.region-group { margin-bottom: 4px; }
.region-group-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  color: var(--text); font-weight: 500;
}
.region-group-header:hover { background: #f5f5f5; }
.region-group-header.active { color: var(--primary); }
.region-list { padding-left: 8px; }
.product-main { flex: 1; min-width: 0; }

/* ===== 文章详情页 ===== */
.article-detail-box {
  background: #fff; border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); margin-top: 20px;
}
.article-detail-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.article-category {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  padding: 2px 10px; border-radius: 4px; font-size: 12px; margin-bottom: 12px;
}
.article-detail-title { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.article-detail-meta { color: var(--text-muted); font-size: 13px; display: flex; gap: 16px; }
.article-detail-content { font-size: 15px; line-height: 1.8; color: var(--text); }
.article-detail-content img { border-radius: var(--radius); margin: 12px 0; }
.article-detail-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.back-to-list a { font-size: 14px; color: var(--text-secondary); }
.back-to-list a:hover { color: var(--primary); }

/* ===== 用户中心布局 ===== */
.user-layout { display: flex; gap: 24px; margin-top: 20px; align-items: flex-start; }
.user-sidebar {
  width: 200px; flex-shrink: 0; background: #fff;
  border-radius: var(--radius); padding: 16px 0; box-shadow: var(--shadow);
}
.user-sidebar a {
  display: block; padding: 10px 20px; color: var(--text-secondary); font-size: 14px;
  border-left: 3px solid transparent; transition: all .2s;
}
.user-sidebar a:hover { background: #f8f9fa; color: var(--primary); }
.user-sidebar a.active { border-left-color: var(--primary); color: var(--primary); background: var(--primary-light); font-weight: 500; }
.user-content { flex: 1; min-width: 0; }

/* ===== 响应式补充 ===== */
@media (max-width: 768px) {
  .product-layout, .user-layout, .article-layout { flex-direction: column; }
  .product-sidebar, .user-sidebar, .article-sidebar { width: 100%; }
  .article-detail-box { padding: 20px; }
  .article-detail-title { font-size: 20px; }
  .type-tabs { overflow-x: auto; flex-wrap: nowrap; }

  /* 手机端导航栏 */
  .header-actions .nav-link { display: none; }
  .header-actions .btn-register { display: none; }
  .nav-toggle { display: block; font-size: 22px; padding: 4px 8px; background: none; border: none; cursor: pointer; color: var(--text); }
  .navbar { position: relative; flex-wrap: nowrap; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-direction: column; padding: 8px 20px; gap: 0;
    border-top: 1px solid #f0f0f0; z-index: 999;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 12px 0; border-bottom: 1px solid #f5f5f5; border-radius: 0;
    text-align: left; display: block;
  }
  .main-nav a:last-child { border-bottom: none; }
  .logo-text { font-size: 16px; }
  .logo-icon { width: 30px; height: 30px; font-size: 14px; }
}

/* ===== 文章列表页 ===== */
.article-layout { display: flex; gap: 24px; align-items: flex-start; margin-top: 20px; }
.article-sidebar { width: 220px; flex-shrink: 0; }
.sidebar-box {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.category-nav { list-style: none; }
.category-item { margin-bottom: 2px; }
.category-item > a, .category-item > .category-subnav > li > a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--text-secondary); font-size: 14px;
}
.category-item > a:hover, .category-subnav a:hover { background: var(--primary-light); color: var(--primary); }
.category-item.active > a, .category-subitem.active > a {
  background: var(--primary-light); color: var(--primary); font-weight: 500;
}
.category-subnav { list-style: none; padding-left: 12px; }
.category-subitem { margin-bottom: 1px; }
.category-subitem a {
  display: block; padding: 6px 10px; border-radius: 4px;
  color: var(--text-muted); font-size: 13px;
}
.article-main { flex: 1; min-width: 0; }
.current-category-info { margin-bottom: 20px; }
.current-category-info h3 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.current-category-info p { color: var(--text-muted); font-size: 13px; }
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-card {
  background: #fff; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: all .2s;
}
.article-card:hover { box-shadow: var(--shadow-hover); }
.article-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.article-date { color: var(--text-muted); font-size: 13px; }
.article-card .article-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.article-card .article-title a { color: var(--text); }
.article-card .article-title a:hover { color: var(--primary); }
.article-summary {
  color: var(--text-secondary); font-size: 14px; line-height: 1.6;
  margin-bottom: 12px;
}
.article-card-footer { margin-top: 8px; }
.read-more { font-size: 14px; color: var(--primary); }
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-state .btn { margin-top: 16px; }
