/* 经管智谷 PC 站样式基线 · 主色 #4d72ff */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; background: #f5f5f5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 1200px; margin: 0 auto; }

/* 头部 */
.hd { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.hd-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo { font-size: 20px; font-weight: 700; color: #4d72ff; white-space: nowrap; }
.nav { display: flex; gap: 24px; flex: 1; }
.nav a { color: #333; }
.nav a:hover { color: #4d72ff; }
.search { display: flex; }
.search input { width: 200px; height: 34px; padding: 0 12px; border: 1px solid #e0e0e0; border-radius: 4px 0 0 4px; outline: none; }
.search button { height: 34px; padding: 0 16px; border: 0; background: #4d72ff; color: #fff; border-radius: 0 4px 4px 0; cursor: pointer; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }

.main { padding: 24px 0; min-height: 60vh; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.card-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #eee; }
.card-body { padding: 12px; }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.4; height: 42px; overflow: hidden; }
.card-meta { margin-top: 8px; color: #999; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
/* 无封面的文字卡片（文档表无 cover 字段） */
.card-text .card-body { padding: 16px; }
.card-desc { color: #999; font-size: 13px; margin-top: 8px; height: 40px; overflow: hidden; }
.price { color: #e93323; font-weight: 700; font-size: 16px; }
.price-free { color: #4d72ff; font-weight: 600; }

/* 区块标题 */
.sec { margin-bottom: 32px; }
.sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sec-title { font-size: 20px; font-weight: 700; }
.sec-more { color: #999; font-size: 13px; }

/* 轮播 */
.banner { margin-bottom: 24px; border-radius: 8px; overflow: hidden; }
.banner img { width: 100%; aspect-ratio: 1200/380; object-fit: cover; }

/* 详情页 */
.detail { display: flex; gap: 24px; align-items: flex-start; }
.detail-main { flex: 1; background: #fff; border-radius: 8px; padding: 24px; min-width: 0; }
.detail-side { width: 300px; background: #fff; border-radius: 8px; padding: 20px; }
.detail-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.detail-meta { color: #999; font-size: 13px; margin-bottom: 20px; }
.detail-content { line-height: 1.8; }
.detail-content img { margin: 12px 0; border-radius: 4px; }

/* 列表页筛选 */
.filter { background: #fff; border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.filter a { padding: 4px 14px; border-radius: 14px; color: #666; }
.filter a.on { background: #4d72ff; color: #fff; }

/* 分页 */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pager a, .pager span { min-width: 34px; height: 34px; line-height: 34px; text-align: center; padding: 0 10px; background: #fff; border-radius: 4px; color: #666; }
.pager .on { background: #4d72ff; color: #fff; }

/* 空状态 */
.empty { text-align: center; padding: 60px 0; color: #999; }

/* 底部 */
.ft { background: #fff; padding: 24px 0; text-align: center; color: #999; font-size: 13px; margin-top: 40px; }
.ft-tip { margin-top: 6px; }

/* 平板 768-1199 */
@media (max-width: 1199px) {
    .wrap { width: 100%; padding: 0 16px; }
    .grid { grid-template-columns: repeat(3, 1fr); }
    .detail { flex-direction: column; }
    .detail-side { width: 100%; }
}

/* 手机 <768 */
@media (max-width: 767px) {
    .hd-inner { height: 52px; gap: 12px; }
    .logo { font-size: 17px; }
    .nav-toggle { display: block; order: 3; }
    .nav { display: none; position: absolute; top: 52px; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 8px 16px; box-shadow: 0 4px 8px rgba(0,0,0,.08); }
    .nav.open { display: flex; }
    .nav a { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
    .search { flex: 1; }
    .search input { width: 100%; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-title { font-size: 14px; height: 40px; }
    .detail-main, .detail-side { padding: 16px; }
    .detail-title { font-size: 19px; }
    .sec-title { font-size: 17px; }
    .main { padding: 16px 0; }
}

/* 移动版入口按钮 */
.btn-h5 { display: block; margin-top: 16px; padding: 10px 0; background: #4d72ff; color: #fff; text-align: center; border-radius: 4px; font-size: 15px; }
.btn-h5:hover { opacity: .9; }

/* 扫码登录 */
.login-box { max-width: 380px; margin: 40px auto; background: #fff; border-radius: 8px; padding: 32px 24px; text-align: center; }
.login-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.login-qr { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.login-qr img { width: 100%; height: 100%; }
.login-mask { position: absolute; inset: 0; background: rgba(255,255,255,.95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.login-mask a { color: #4d72ff; }
.login-tip { margin-top: 16px; color: #333; }
.login-sub { margin-top: 6px; color: #999; font-size: 12px; }
.login-error { color: #e93323; padding: 40px 0; }
/* 手机上无法扫本机屏幕，改为长按识别引导 */
.login-tip-mobile { display: none; }
@media (max-width: 767px) {
    .login-tip-pc { display: none; }
    .login-tip-mobile { display: block; }
}

/* 头部登录态 */
.hd-user { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.hd-login { color: #4d72ff; }
.hd-name { color: #333; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.hd-logout { color: #999; font-size: 13px; }
@media (max-width: 767px) {
    .hd-name { max-width: 60px; }
    .hd-user { gap: 8px; font-size: 13px; }
}
