/**
 * help-shell.css — 整站视觉壳层
 * 覆盖 Typecho 默认主题，统一现代化风格
 * 与 help-doc.css（教程卡片层）职责分离
 */

/* =============================================
   1. 全局：字体 / 背景
   ============================================= */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background-color: #f5f6fb;
}

/* =============================================
   2. 顶部 CTA 条（用户中心入口，panelUrl 配置后显示）
   ============================================= */
.help-shell-cta {
  background: linear-gradient(90deg, #3d1f6b 0%, #5a2d9e 50%, #3d1f6b 100%);
  color: #f3e8ff;
  font-size: 13px;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.help-shell-cta .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.help-shell-cta__text {
  margin: 0;
  flex: 1 1 220px;
}
.help-shell-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #3d1f6b;
  background: #fff;
  text-decoration: none;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.help-shell-cta__btn:hover {
  color: #2a1450;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* =============================================
   3. Header：紧凑、扁平、现代
   ============================================= */

/* 修正：不覆盖 float，让 col-9/col-3 正常左右排列 */
#header {
  padding-top: 0 !important;
  background: #fff;
  border-bottom: none;
  box-shadow: 0 1px 0 #e8e8ee, 0 2px 10px rgba(0, 0, 0, 0.04);
}
#header .container {
  padding-top: 14px;
}
#header .row {
  text-align: left;
}
#header .site-name {
  text-align: left;
  /* 注意：不设 float:none，保持 col-9 的 float:left，让搜索框在右侧 */
}

/* 站点标题 */
#logo {
  font-size: 1.3em;
  font-weight: 800;
  color: #1a1d21;
  letter-spacing: -0.3px;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  border-bottom: none;
}
#logo:hover {
  color: #6f42c1;
  border-bottom: none;
}
#logo img {
  max-height: 40px;
  vertical-align: middle;
}

/* 站点描述：隐藏（描述文字在 Typecho 后台设置，这里直接不显示） */
.description {
  display: none !important;
}

/* 搜索框：圆角现代风 */
#search {
  margin-top: 12px;
}
#search input {
  border-radius: 20px !important;
  border: 1.5px solid #e0e3f0 !important;
  padding: 7px 36px 7px 14px !important;
  font-size: 13px;
  background: #f8f9fc;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
#search input:focus {
  border-color: #b89ae0 !important;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.08);
}
#search button {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
}

/* =============================================
   4. 主导航：下划线 Tab 风格（GitHub / MDN 同款）
   ============================================= */
#nav-menu {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  border-bottom: 2px solid #ebebeb !important;
  width: 100%;
  box-sizing: border-box;
  clear: both;
}
#nav-menu a {
  display: inline-flex !important;
  align-items: center !important;
  float: none !important;
  height: auto !important;
  line-height: 1 !important;
  padding: 8px 14px !important;
  margin-right: 0 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  font-size: 13.5px !important;
  color: #555 !important;
  background: transparent !important;
  margin-bottom: -2px !important;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none !important;
}
#nav-menu a:hover {
  color: #6f42c1 !important;
  border-bottom-color: #c5aff0 !important;
  background: transparent !important;
  text-decoration: none !important;
}
#nav-menu a.current {
  color: #6f42c1 !important;
  border-bottom-color: #6f42c1 !important;
  font-weight: 700 !important;
  background: transparent !important;
}

/* =============================================
   5. Body 内容区：背景 + 间距
   ============================================= */
#body {
  background: #f5f6fb;
  padding-top: 28px;
  padding-bottom: 40px;
  min-height: 60vh;
}

/* 宽屏：全局统一容器宽度（header / body / footer 同步，避免左边缘错位） */
@media (min-width: 992px) {
  .container {
    max-width: min(94vw, 1280px);
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: min(96vw, 1440px);
  }
}

/* =============================================
   6. Footer：简洁白色底栏
   ============================================= */
#footer {
  background: #fff !important;
  border-top: 1px solid #eee;
  padding: 20px 0 !important;
  font-size: 13px;
  color: #ccc !important;
}
#footer a {
  color: #aaa;
  border-bottom: none;
}
#footer a:hover {
  color: #6f42c1;
}

/* =============================================
   7. 教程独立页（page.php）：标题栏 + 面包屑
   ============================================= */
.help-page-title-bar {
  padding: 22px 0 16px;
  margin-bottom: 8px;
  border-bottom: 2px solid #f0eefa;
}
.help-page-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6f42c1;
  text-decoration: none;
  letter-spacing: 0.02em;
  border-bottom: none !important;
  opacity: 0.75;
  transition: opacity 0.12s;
}
.help-page-back:hover {
  opacity: 1;
  color: #5a32a3;
  text-decoration: none;
}
.help-page-h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #1a1d21;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.help-page-article .post-content {
  margin-top: 0;
}

/* =============================================
   8. 侧边栏：教程导航（sidebar.php）
   ============================================= */
#secondary {
  padding-top: 28px;
  word-wrap: break-word;
}
.sidebar-cta-section {
  margin-bottom: 20px !important;
  padding: 14px;
  background: linear-gradient(135deg, #f3eeff 0%, #e9f0ff 100%);
  border: 1px solid #ddd5f5;
  border-radius: 10px;
}
.sidebar-cta-btn {
  display: block;
  text-align: center;
  padding: 10px 14px;
  background: #6f42c1;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background 0.15s ease;
}
.sidebar-cta-btn:hover {
  background: #5a32a3;
  color: #fff !important;
}
.sidebar-cta-hint {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: #6b5a8a;
  line-height: 1.4;
  text-align: center;
}
.sidebar-page-list li a {
  display: block;
  padding: 5px 0;
  border-bottom: none !important;
  font-size: 13.5px;
  color: #3354aa;
  transition: color 0.12s;
}
.sidebar-page-list li a:hover {
  color: #6f42c1;
  text-decoration: none;
}
.sidebar-admin-section {
  margin-top: 6px !important;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.sidebar-admin-section .widget-list li a {
  font-size: 12px;
  color: #ccc;
}
.sidebar-admin-section .widget-list li a:hover {
  color: #666;
}

/* =============================================
   9. 全宽教程页：guide-page-wrapper 背景延伸至列边缘
   ============================================= */
.col-12 .help-doc .guide-page-wrapper {
  margin-left: -10px;
  margin-right: -10px;
  border-radius: 0;
}

/* =============================================
   10. 移动端适配
   ============================================= */
@media (max-width: 767px) {
  .help-page-h1 {
    font-size: 20px;
  }
  #body {
    padding-top: 16px;
    padding-bottom: 24px;
  }
}
