/* 基础复位与全局样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8fafc; color: #1e293b; -webkit-text-size-adjust: 100%; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; }
input { font: inherit; border: none; outline: none; }
.pd16 { padding: 16px; }
.pt16 { padding-top: 16px; }
.mt16 { margin-top: 16px; }
/* 公共图标 */
.icon-svg { width: 24px; height: 24px; }

/* 头部样式 (Header) */
.sticky-header { position: sticky; top: 0; z-index: 50; background-color: #ffffff; border-bottom: 1px solid #e2e8f0; }
.header-top { padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.header-logo { display: flex; align-items: center; gap: 8px; }
.header-logo img { height: 32px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions button { color: #475569; display: flex; align-items: center; }

/* 展开式搜索 */
.search-expand-container { display: flex; align-items: center; }
.search-input-expand { width: 0; opacity: 0; padding: 0; background-color: #f1f5f9; border-radius: 9999px; font-size: 14px; transition: all 0.3s ease; border: none; outline: none; pointer-events: none; }
.search-expand-container.active .search-input-expand { width: 150px; opacity: 1; padding: 6px 12px; margin-right: 4px; pointer-events: auto; }

/* 底部样式 (Footer) */
.main-footer { background-color: #1e293b; color: #ffffff; padding: 24px 24px 40px 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-about-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-about-text { font-size: 10px; color: #94a3b8; line-height: 1.625; }
.footer-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qr-container { text-align: center; }
.qr-container img { width: 64px; height: 64px; margin: 0 auto 8px auto; background-color: #ffffff; padding: 4px; }
.qr-container p { font-size: 8px; }
.footer-copyright { border-top: 1px solid #334155; padding-top: 24px; text-align: center; font-size: 10px; color: #64748b; }
.footer-copyright p + p { margin-top: 4px; }

/* 移动端侧边菜单 (Overlay Menu) */
.overlay-menu { position: fixed; inset: 0; z-index: 100; }
.overlay-menu.hidden { display: none; }
.menu-backdrop { position: fixed; inset: 0; background-color: rgba(0,0,0,0.5); transition: opacity 0.3s; }
.menu-content { position: fixed; top: 0; bottom: 0; right: 0; width: 75%; max-width: 384px; background-color: #ffffff; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #f1f5f9; background-color: #002b5c; color: #ffffff; }
.user-profile { display: flex; align-items: center; gap: 12px; }
.avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background-color: #cbd5e1; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.avatar-placeholder svg { width: 24px; height: 24px; color: #64748b; }
.avatar-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.user-info p:first-child { font-size: 14px; font-weight: 700; }
.user-info p:last-child { font-size: 10px; color: rgba(255,255,255,0.7); }
.user-info .user-rank { display: inline-block; padding: 2px 6px; background: rgba(255,255,255,0.2); border-radius: 4px; margin-top: 4px; font-size: 9px; }
.menu-body { flex: 1; overflow-y: auto; padding: 16px; }
.nav-group { margin-bottom: 24px; }
.nav-group-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; font-weight: 700; margin-bottom: 16px; }
.menu-body .nav-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.menu-body .nav-grid .nav-item { background-color: #f8fafc; padding: 8px; border-radius: 4px; font-size: 10px; color: #475569; text-align: center; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.menu-body .nav-grid .nav-item.highlight { color: #2563eb; font-weight: 700; }
.menu-body .nav-grid .nav-item .iconfont { font-size:12px;margin-left: 2px; }

/* 退出登录样式 */
.menu-footer { padding: 16px; border-top: 1px solid #f1f5f9; }
.logout-btn-side { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: #fff1f2; color: #ef4444; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* 子菜单样式 */
.nav-item-group { position: relative; grid-column: span 1; }
.nav-item-group.active .nav-item { background-color: #e2e8f0; color: #2563eb; }
.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 130px;
}
.nav-item-group.active .nav-submenu { display: block; }
.nav-submenu a { display: block; padding: 12px 16px; font-size: 11px; color: #475569; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.nav-submenu a:last-child { border-bottom: none; }
.nav-submenu a:active { background-color: #e2e8f0; }
.has-submenu svg { transition: transform 0.3s ease; }
.nav-item-group.active .has-submenu svg { transform: rotate(180deg); }


/* 分页 */
.pagination-container {margin-top:20px; display: flex; align-items: center; justify-content: center; }
.pagination-container a ,.pagination-container b{ padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500; color: #6b7280; background-color: #ffffff; border: 1px solid #d1d5db; border-radius: 0.375rem; }
.pagination-container a:hover { background-color: #f9fafb; }
.pagination-container b{ font-weight: 700; color: #1e40af; background-color: #eff6ff; border: 1px solid #1e40af; }

/* 面包屑导航 */
.breadcrumbs { padding: 0.5rem 16px; background-color: #f3f4f6; font-size: 0.75rem; color: #6b7280; display: flex; align-items: center; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.breadcrumbs a{margin:0 8px;}
.breadcrumbs a:first-child{margin-left:0;}

/* 推荐区域通用样式 (用于列表页/详情页/专家列表) */
.recommendations-section, .bottom-aside, .recommend-grid { display: flex; flex-direction: column; gap: 2rem; }
.recommend-card, .recommend-section { background-color: #ffffff; padding: 1rem; border-radius: 0.5rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.card-header, .recommend-header, .rec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title, .recommend-title, .rec-title { font-size: 1rem; font-weight: 700; color: #111827; margin: 0; display: flex; align-items: center; }
.card-title::before, .recommend-title::before, .rec-title .indicator { content: ''; display: inline-block; width: 4px; height: 1rem; background-color: #1e40af; margin-right: 0.5rem; }

.card-list, .recommend-list, .rec-list { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: #374151; list-style: none; }
.list-item-ellipsis, .truncate, .rec-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }


/* 推荐区域 */
.recommend-section.article-box { border-top: 3px solid #ef4444; }
.recommend-section.audio-box { border-top: 3px solid #2563eb; }
.article-box .indicator { background-color: #ef4444; }
.audio-box .indicator { background-color: #2563eb; }
.more-link { color: #ef4444; font-size: 12px; font-weight: 500; display: flex; align-items: center; }
.audio-box .more-link { color: #2563eb; }
.rec-item .bullet { color: #ef4444; font-weight: bold; }

/* 推荐音频专有样式 */
.rec-item { display: flex; align-items: start; gap: 8px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 智力小卖部 */
.store-banner {  }
