/* ==========================================================================
   牛牛CMS 官网样式（domian/css/app.css）
   覆盖：首页 index.html / 文档 doc.html / 系统消息 msg.html
   设计基准：牛牛CMS 默认模板设计令牌（深色主题 + 金色主色）
     --bg-base: #0a0a0a / --bg-surface: #111111 / --bg-elevated: #1a1a1a
     --color-primary: #FAC33D（hover #FFD700 / active #E5B82F）
     --text-primary: #f5f5f5 / --text-secondary: #a0a0a0 / --text-tertiary: #666666
     --border-subtle: rgba(255,255,255,0.06)
   ========================================================================== */

/* ---------- 基础与重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #a0a0a0; background: #0a0a0a; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: #FAC33D; text-decoration: none; transition: color 0.2s; }
a:hover { color: #FFD700; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }
::selection { background: rgba(250, 195, 61, 0.3); color: #f5f5f5; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ---------- 工具类 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---------- 页头 ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(17,17,17,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06); height: 64px;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { font-size: 22px; font-weight: 700; color: #f5f5f5; display: flex; align-items: center; gap: 10px; }
.logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: #FAC33D; border-radius: 8px; color: #1a1a1a; font-size: 16px; font-weight: 700;
}
.nav { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav a { color: #a0a0a0; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.active { color: #FAC33D; }
.header-btn {
  display: inline-flex; align-items: center; padding: 8px 20px;
  background: #FAC33D; color: #1a1a1a !important; border-radius: 8px;
  font-size: 14px; font-weight: 600; transition: all 0.2s;
}
.header-btn:hover { background: #FFD700; transform: translateY(-1px); box-shadow: 0 0 20px rgba(250,195,61,0.4); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #f5f5f5; border-radius: 2px; transition: 0.3s; }
.mobile-nav { display: none; }

/* ---------- 通用页头 Hero（doc/msg 与首页风格统一） ---------- */
.page-hero {
  padding: 112px 0 40px;
  background: radial-gradient(ellipse 900px 360px at 50% -10%, rgba(250,195,61,0.12), transparent 60%), #0a0a0a;
  text-align: center;
}
.page-hero h1 { font-size: 36px; font-weight: 800; color: #f5f5f5; line-height: 1.2; margin-bottom: 12px; }
.page-hero p { font-size: 16px; color: #a0a0a0; max-width: 640px; margin: 0 auto; line-height: 1.7; }
.page-hero .hero-decoration { margin-top: 24px; }

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
  background: radial-gradient(ellipse 900px 420px at 50% -10%, rgba(250,195,61,0.12), transparent 60%), #0a0a0a;
  text-align: center;
}
.hero h1 { font-size: 48px; font-weight: 800; color: #f5f5f5; line-height: 1.2; margin-bottom: 16px; }
.hero p { font-size: 20px; color: #a0a0a0; max-width: 640px; margin: 0 auto 36px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px;
  border-radius: 10px; font-size: 16px; font-weight: 600; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: #FAC33D; color: #1a1a1a; }
.btn-primary:hover { background: #FFD700; transform: translateY(-2px); box-shadow: 0 0 24px rgba(250,195,61,0.45); }
.btn-outline { background: transparent; color: #FAC33D; border: 2px solid #FAC33D; }
.btn-outline:hover { background: rgba(250,195,61,0.08); transform: translateY(-2px); }
.hero-decoration {
  margin-top: 48px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px;
  background: rgba(250,195,61,0.1); border: 1px solid rgba(250,195,61,0.2);
  color: #FAC33D; border-radius: 20px; font-size: 13px; font-weight: 500;
}

/* ---------- 通用区块 ---------- */
.section { padding: 80px 0; }
.section-title {
  font-size: 32px; font-weight: 700; color: #f5f5f5; text-align: center; margin-bottom: 12px;
}
.section-desc {
  font-size: 16px; color: #a0a0a0; text-align: center; max-width: 640px; margin: 0 auto 48px;
}

/* ---------- 特性卡片 ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: #111111; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 32px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: all 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px); border-color: rgba(250,195,61,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(250,195,61,0.08);
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: rgba(250,195,61,0.12); border-radius: 12px;
  font-size: 22px; color: #FAC33D; margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; font-weight: 600; color: #f5f5f5; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: #a0a0a0; line-height: 1.7; }

/* ---------- 数据统计 ---------- */
.stats { background: #111111; border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat-item { padding: 24px; }
.stat-number { font-size: 40px; font-weight: 800; color: #FAC33D; margin-bottom: 4px; }
.stat-label { font-size: 15px; color: #a0a0a0; }

/* ---------- 模板市场 ---------- */
.template-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.template-card {
  background: #111111; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: all 0.3s;
}
.template-card:hover {
  transform: translateY(-4px); border-color: rgba(250,195,61,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(250,195,61,0.08);
}
.template-img {
  height: 200px; background: linear-gradient(135deg, #1c1a10 0%, #14110a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: #FAC33D; font-size: 14px; font-weight: 500;
}
.template-body { padding: 20px; }
.template-body h4 { font-size: 16px; font-weight: 600; color: #f5f5f5; margin-bottom: 4px; }
.template-body p { font-size: 13px; color: #a0a0a0; line-height: 1.6; }
.view-all { text-align: center; margin-top: 32px; }

/* ---------- 下载区块 ---------- */
.download-section {
  background: #111111; border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06); text-align: center;
}
.download-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.version-info { color: #666666; font-size: 14px; margin-top: 12px; }

/* ---------- 页脚 ---------- */
.footer {
  background: #0d0d0d; color: #a0a0a0; padding: 48px 0 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px;
}
.footer-brand h3 { color: #f5f5f5; font-size: 20px; margin-bottom: 8px; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { color: #f5f5f5; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; color: #a0a0a0; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: #FAC33D; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: #666666;
}

/* ---------- 文档页布局（居中单列，与首页/消息页风格统一） ---------- */
.doc-content { max-width: 900px; margin: 0 auto; padding-bottom: 64px; }

/* 章节导航（居中吸顶胶囊，与消息页筛选条同风格） */
.doc-nav {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  position: sticky; top: 64px; z-index: 90;
  background: rgba(10,10,10,0.92); backdrop-filter: blur(10px);
  padding: 12px 20px; margin: 0 -20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.doc-nav a {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1); background: #111111;
  font-size: 13px; color: #a0a0a0; transition: all 0.2s; white-space: nowrap;
}
.doc-nav a:hover { border-color: #FAC33D; color: #FAC33D; }
.doc-nav a.active { background: #FAC33D; color: #1a1a1a; border-color: #FAC33D; }

/* 正文卡片（裁切 + 内部滚动，防长代码/长表格撑破） */
.content { min-width: 0; }
.doc-card {
  overflow: hidden;
  background: #111111; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); padding: 40px 48px;
}
.content pre { max-width: 100%; }
.content table { display: block; overflow-x: auto; max-width: 100%; }
/* 锚点跳转补偿固定页头 + 吸顶导航，标题不被遮挡 */
.content h1, .content h2, .content h3 { scroll-margin-top: 128px; }
.content h1 {
  font-size: 32px; font-weight: 700; color: #f5f5f5; margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.content h2 {
  font-size: 22px; font-weight: 600; color: #f5f5f5; margin: 40px 0 16px; padding-top: 8px;
}
.content h3 {
  font-size: 18px; font-weight: 600; color: #f5f5f5; margin: 28px 0 12px;
}
.content p { margin-bottom: 16px; font-size: 15px; line-height: 1.8; color: #a0a0a0; }
.content ul, .content ol { margin: 12px 0 20px 24px; }
.content li { margin-bottom: 8px; font-size: 15px; line-height: 1.7; color: #a0a0a0; }
.content a { color: #FAC33D; }
.content a:hover { color: #FFD700; }

.content pre {
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.06); color: #e5e5e5; border-radius: 10px; padding: 20px;
  overflow-x: auto; font-size: 13px; line-height: 1.7; margin: 16px 0 24px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: rgba(250,195,61,0.1); color: #FAC33D; padding: 2px 8px;
  border-radius: 4px; font-size: 13px;
}
.content pre code { background: none; color: inherit; padding: 0; border-radius: 0; }

.content .note {
  background: rgba(250,195,61,0.06); border-left: 4px solid #FAC33D;
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 16px 0 24px;
}
.content .note p { margin: 0; font-size: 14px; color: #a0a0a0; }
.content .note strong { color: #FAC33D; }

.content table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  font-size: 14px;
}
.content th, .content td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.content th { background: #1a1a1a; font-weight: 600; color: #f5f5f5; }
.content td { color: #a0a0a0; }
.content tr:hover td { background: #1a1a1a; }

/* ---------- 消息页 ---------- */
.msg-section { padding: 40px 0 64px; }

/* 筛选条 */
.filter-bar {
  display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
  background: #111111; font-size: 13px; color: #a0a0a0; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { border-color: #FAC33D; color: #FAC33D; }
.filter-btn.active { background: #FAC33D; color: #1a1a1a; border-color: #FAC33D; }
.filter-btn .count {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  background: rgba(255,255,255,0.08); border-radius: 10px; font-size: 11px;
}
.filter-btn.active .count { background: rgba(0,0,0,0.15); }

/* 消息列表 */
.msg-list { display: flex; flex-direction: column; gap: 12px; }

.msg-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: #111111; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: all 0.2s; cursor: pointer;
}
.msg-card:hover { transform: translateY(-2px); border-color: rgba(250,195,61,0.25); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.msg-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.msg-icon.update { background: rgba(250,195,61,0.12); color: #FAC33D; }
.msg-icon.security { background: rgba(232,93,74,0.12); color: #E85D4A; }
.msg-icon.notice { background: rgba(45,212,191,0.12); color: #2DD4BF; }

.msg-body { flex: 1; min-width: 0; }
.msg-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap;
}
.msg-title { font-size: 16px; font-weight: 600; color: #f5f5f5; }
.msg-tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.msg-tag.update { background: rgba(250,195,61,0.12); color: #FAC33D; }
.msg-tag.security { background: rgba(232,93,74,0.12); color: #E85D4A; }
.msg-tag.notice { background: rgba(45,212,191,0.12); color: #2DD4BF; }

.msg-desc { font-size: 14px; color: #a0a0a0; line-height: 1.6; margin-bottom: 8px; }
.msg-footer { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #666666; }
.msg-time { display: flex; align-items: center; gap: 4px; }
.msg-unread {
  width: 8px; height: 8px; border-radius: 50%; background: #FAC33D; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(250,195,61,0.6);
}

/* 分页 */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1); background: #111111; color: #a0a0a0;
  font-size: 14px; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.page-btn:hover { border-color: #FAC33D; color: #FAC33D; }
.page-btn.active { background: #FAC33D; color: #1a1a1a; border-color: #FAC33D; }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.page-ellipsis { color: #666666; font-size: 14px; padding: 0 4px; }

/* 空状态 */
.empty-state {
  text-align: center; padding: 80px 20px; background: #111111; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.empty-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(250,195,61,0.08); display: inline-flex;
  align-items: center; justify-content: center; font-size: 28px; color: #FAC33D; margin-bottom: 16px;
}
.empty-state h3 { font-size: 18px; font-weight: 600; color: #f5f5f5; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: #666666; }

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .doc-card { padding: 32px 28px; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }

  .nav, .header-btn { display: none; }
  .hamburger { display: flex; }

  .mobile-nav.active {
    display: block; position: fixed; top: 64px; left: 0; right: 0;
    background: #111111; padding: 16px 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 99;
  }
  .mobile-nav a {
    display: block; padding: 12px 0; color: #a0a0a0; font-size: 16px; font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .mobile-nav a:last-child { border-bottom: none; }
  .mobile-nav a.active { color: #FAC33D; }
  .mobile-nav .mobile-btn {
    display: block; text-align: center; margin-top: 12px; padding: 12px;
    background: #FAC33D; color: #1a1a1a; border-radius: 8px; font-weight: 600;
  }

  .features-grid { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* 文档页移动端：胶囊导航横向滚动，卡片内边距收紧 */
  .doc-nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 10px 20px; }
  .doc-content { padding-bottom: 48px; }
  .doc-card { padding: 24px 20px; }
  .content h1 { font-size: 26px; }

  /* 消息页移动端 */
  .page-hero { padding: 96px 0 32px; }
  .page-hero h1 { font-size: 28px; }
  .page-hero p { font-size: 14px; }
  .msg-card { flex-direction: column; gap: 12px; padding: 16px; }
  .msg-header { flex-wrap: wrap; }
}
