/* ===== 重置 ===== */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
    font-size: 14px; line-height: 1.6; color: #333; background: #f5f5f5;
}
a { color: #1e88e5; text-decoration: none; transition: color .2s; }
a:hover { color: #005cbf; }
ul,ol { list-style: none; }
img { max-width: 100%; vertical-align: middle; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.main-wrapper { display: flex; gap: 20px; padding: 20px 0; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex-shrink: 0; }

/* ===== 顶部 Header ===== */
.site-header {
    background: linear-gradient(135deg, #1e88e5, #005cbf);
    color: #fff; padding: 14px 0; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.site-header .container { display: flex; align-items: center; gap: 30px; }
.logo { font-size: 24px; font-weight: 700; color: #fff; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo-sub { font-size: 13px; font-weight: 400; margin-left: 8px; opacity: .85; }

/* ===== 导航栏 ===== */
.nav-bar { background: #fff; border-bottom: 1px solid #e0e0e0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.nav-bar .container { display: grid; grid-template-columns: repeat(11, 1fr); gap: 2px; padding: 6px 16px; }
.nav-bar a {
    color: #555; padding: 6px 4px; border-radius: 4px; font-size: 13px; white-space: nowrap;
    text-align: center; transition: all .2s;
}
.nav-bar a:hover, .nav-bar a.active { color: #1e88e5; background: #e3f2fd; }

/* ===== 搜索框 ===== */
.search-form { display: flex; align-items: center; background: rgba(255,255,255,0.2); border-radius: 20px; padding: 2px 4px 2px 16px; }
.search-form input {
    border: none; background: transparent; color: #fff; outline: none;
    width: 220px; height: 32px; font-size: 13px;
}
.search-form input::placeholder { color: rgba(255,255,255,0.7); }
.search-form button {
    border: none; background: #fff; color: #1e88e5; border-radius: 16px;
    padding: 6px 16px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.search-form button:hover { background: #e3f2fd; }

/* ===== 首页 Banner ===== */
.hero-banner {
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    color: #fff; padding: 40px 0; text-align: center; margin-bottom: 0;
}
.hero-banner h1 { font-size: 30px; margin-bottom: 10px; }
.hero-banner p { font-size: 15px; opacity: .9; max-width: 600px; margin: 0 auto; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 20px; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat-num { font-size: 24px; font-weight: 700; }
.hero-stats .stat-label { font-size: 12px; opacity: .8; }

/* ===== 分类区块 ===== */
.section { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }
.section-title { font-size: 18px; font-weight: 600; color: #333; border-left: 4px solid #1e88e5; padding-left: 10px; }
.section-more { font-size: 13px; color: #999; }
.section-more:hover { color: #1e88e5; }

/* ===== 作品卡片 Grid ===== */
.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.work-card { display: block; background: #fff; border-radius: 6px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.work-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.work-cover {
    width: 100%; aspect-ratio: 3/4; border-radius: 4px; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    color: #fff; text-align: center; padding: 10px; position: relative; overflow: hidden;
}
.work-cover::before {
    content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
}
.work-cover-title { font-size: 18px; font-weight: 700; line-height: 1.3; z-index: 1; writing-mode: vertical-rl; text-orientation: upright; max-height: 70%; }
.work-cover-author { font-size: 11px; opacity: .85; margin-top: 4px; z-index: 1; }
.work-card-info { padding: 8px 4px 4px; }
.work-card-title { font-size: 13px; font-weight: 500; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-card-author { font-size: 12px; color: #999; margin-top: 2px; }

/* ===== 列表页 ===== */
.work-list { display: flex; flex-direction: column; gap: 12px; }
.work-list-item {
    display: flex; gap: 14px; padding: 14px; background: #fff; border-radius: 6px;
    transition: box-shadow .2s;
}
.work-list-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.work-list-cover {
    width: 70px; height: 93px; border-radius: 4px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px;
    text-align: center; padding: 4px;
}
.work-list-info { flex: 1; min-width: 0; }
.work-list-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 4px; }
.work-list-title a { color: #333; }
.work-list-title a:hover { color: #1e88e5; }
.work-list-meta { font-size: 12px; color: #999; margin-bottom: 6px; }
.work-list-meta span { margin-right: 12px; }
.work-list-desc { font-size: 13px; color: #666; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 侧边栏 ===== */
.sidebar-box { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.sidebar-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: #333; border-left: 3px solid #1e88e5; padding-left: 8px; }
.rank-list li { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; }
.rank-list li:last-child { border-bottom: none; }
.rank-num { width: 22px; height: 22px; border-radius: 4px; background: #e0e0e0; color: #999; font-size: 12px; text-align: center; line-height: 22px; margin-right: 10px; flex-shrink: 0; font-weight: 600; }
.rank-list li:nth-child(1) .rank-num { background: #e53935; color: #fff; }
.rank-list li:nth-child(2) .rank-num { background: #fb8c00; color: #fff; }
.rank-list li:nth-child(3) .rank-num { background: #fdd835; color: #333; }
.rank-title { font-size: 13px; color: #333; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-author { font-size: 12px; color: #aaa; }

/* ===== 作品详情页 ===== */
.work-detail { background: #fff; border-radius: 8px; padding: 30px; margin-bottom: 16px; }
.work-detail-header { display: flex; gap: 24px; }
.work-detail-cover {
    width: 120px; height: 160px; border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff;
    font-size: 22px; font-weight: 700; text-align: center; padding: 10px;
}
.work-detail-info { flex: 1; }
.work-detail-info h1 { font-size: 26px; margin-bottom: 12px; color: #333; }
.work-detail-meta { font-size: 14px; color: #666; line-height: 2; }
.work-detail-meta span { margin-right: 20px; }
.work-detail-meta .label { color: #999; }
.work-detail-desc { margin-top: 16px; font-size: 14px; color: #666; line-height: 1.8; }
.work-detail-actions { margin-top: 20px; display: flex; gap: 12px; }
.btn-read {
    display: inline-block; background: #1e88e5; color: #fff !important; padding: 10px 32px;
    border-radius: 4px; font-size: 15px; font-weight: 600; transition: background .2s;
}
.btn-read:hover { background: #005cbf; }
.btn-secondary {
    display: inline-block; background: #fff; color: #1e88e5; border: 1px solid #1e88e5;
    padding: 10px 24px; border-radius: 4px; font-size: 15px;
}
.btn-secondary:hover { background: #e3f2fd; }

/* ===== 章节列表 ===== */
.chapter-list-section { background: #fff; border-radius: 8px; padding: 20px; }
.chapter-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chapter-list a {
    display: block; padding: 8px 12px; border-radius: 4px; font-size: 13px; color: #555;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .2s;
}
.chapter-list a:hover { background: #e3f2fd; color: #1e88e5; }

/* ===== 阅读页 ===== */
.read-page { background: #fff; border-radius: 8px; padding: 40px 60px; max-width: 800px; margin: 0 auto; }
.read-header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.read-header h1 { font-size: 22px; color: #333; margin-bottom: 8px; }
.read-header .read-meta { font-size: 13px; color: #999; }
.read-content { font-size: 18px; line-height: 2.2; color: #444; }
.read-content p { text-indent: 2em; margin-bottom: 16px; }
.read-content p.poem { text-indent: 0; text-align: center; margin-bottom: 8px; }
.read-nav { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.read-nav a { padding: 8px 20px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #666; }
.read-nav a:hover { border-color: #1e88e5; color: #1e88e5; }

/* ===== 作者页 ===== */
.author-detail { background: #fff; border-radius: 8px; padding: 30px; }
.author-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, #1e88e5, #005cbf); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.author-info h1 { font-size: 24px; margin-bottom: 6px; }
.author-info .author-meta { font-size: 14px; color: #888; }
.author-desc { font-size: 14px; color: #666; line-height: 1.8; margin: 16px 0; }

/* ===== 面包屑 ===== */
.breadcrumb { padding: 12px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #1e88e5; }
.breadcrumb .sep { margin: 0 6px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 20px 0; }
.pagination a, .pagination span {
    display: inline-block; min-width: 34px; height: 34px; line-height: 34px;
    text-align: center; border: 1px solid #ddd; border-radius: 4px; font-size: 13px;
    padding: 0 8px; color: #666;
}
.pagination a:hover { border-color: #1e88e5; color: #1e88e5; }
.pagination .current { background: #1e88e5; color: #fff; border-color: #1e88e5; }

/* ===== Footer ===== */
.site-footer { background: #2c2c2c; color: #aaa; padding: 30px 0; margin-top: 20px; }
.site-footer .container { text-align: center; }
.site-footer a { color: #ccc; }
.site-footer p { margin: 4px 0; font-size: 13px; }
.footer-links { margin-bottom: 10px; }
.footer-links a { margin: 0 8px; }

/* ===== 搜索结果 ===== */
.search-bar { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 16px; }
.search-bar form { display: flex; gap: 10px; }
.search-bar input {
    flex: 1; height: 40px; border: 2px solid #1e88e5; border-radius: 4px; padding: 0 16px; font-size: 15px; outline: none;
}
.search-bar button {
    background: #1e88e5; color: #fff; border: none; padding: 0 30px; border-radius: 4px; font-size: 15px; cursor: pointer; font-weight: 600;
}
.search-bar button:hover { background: #005cbf; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .work-grid { grid-template-columns: repeat(4, 1fr); }
    .sidebar { display: none; }
    .main-wrapper { padding: 12px 0; }
    .nav-bar .container { grid-template-columns: repeat(11, 1fr); }
}
@media (max-width: 768px) {
    .nav-bar .container { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 640px) {
    .work-grid { grid-template-columns: repeat(3, 1fr); }
    .chapter-list { grid-template-columns: repeat(2, 1fr); }
    .read-page { padding: 20px; }
    .read-content { font-size: 16px; }
    .hero-banner h1 { font-size: 22px; }
    .hero-stats { gap: 20px; }
    .work-detail-header { flex-direction: column; }
    .search-form input { width: 120px; }
    .logo-sub { display: none; }
    .nav-bar .container { grid-template-columns: repeat(4, 1fr); }
    .nav-bar a { font-size: 12px; padding: 4px 2px; }
}

/* ===== 下载栏 ===== */
.download-bar {
    margin: 24px 0; padding: 16px 20px; background: #f5f7fa; border-radius: 8px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    border: 1px solid #e8eaed;
}
.download-label { font-size: 14px; color: #666; font-weight: 600; }
.dl-link {
    display: inline-block; padding: 5px 16px; border-radius: 4px; font-size: 13px;
    font-weight: 600; color: #fff !important; transition: opacity .2s;
}
.dl-link:hover { opacity: 0.85; color: #fff !important; }
.dl-pdf { background: #e53935; }
.dl-doc { background: #1976d2; }
.dl-xls { background: #2e7d32; }
.dl-ppt { background: #d84315; }
.dl-rtf { background: #6a1b9a; }
