/* ============================================
   全站通用样式
   ============================================ */

:root {
    --primary: #7C6FE6;
    --primary-light: #A78BFA;
    --primary-dark: #5E60CE;
    --bg-soft: #F5F3FF;
    --bg-card: #FFFFFF;
    --text-main: #333;
    --text-sub: #666;
    --text-light: #999;
    --border: #eee;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #A78BFA 0%, #7C6FE6 100%);
    --gradient-soft: linear-gradient(135deg, #F0EBFF 0%, #E8E0FF 100%);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
}

/* ============ 通用容器 ============ */

.site-container {
    width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.site-full-section {
    background: #f8f9fa;
    min-height: 60vh;
    padding: 20px 0;
}

.page-wrapper {
    width: 1200px;
    margin: 0 auto;
}

.main-row {
    display: flex;
    gap: 25px;
}

.main-left {
    flex: 1;
    min-width: 0;
}

.main-right {
    width: 300px;
    flex-shrink: 0;
}

/* ============ 面包屑 ============ */

.breadcrumb {
    padding: 15px 0;
    font-size: 13px;
    color: var(--text-sub);
}

.breadcrumb a {
    color: var(--text-sub);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    margin: 0 6px;
    color: #ccc;
}

.breadcrumb-current {
    color: var(--text-main);
    font-weight: 500;
}

/* ============ 页面标题 ============ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.page-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0;
}

.page-subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============ 区块标题 ============ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0;
}

.section-icon {
    margin-right: 6px;
    font-size: 15px;
}

.section-more {
    color: var(--text-light);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-more:hover {
    color: var(--primary);
}

/* ============ 游戏列表项（列表式） ============ */

.game-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 10px 15px;
    border: 1px solid var(--border);
}

.game-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f0f0f0;
    transition: background 0.2s ease;
}

.game-item:last-child {
    border-bottom: none;
}

.game-item:hover {
    background: #fafafa;
}

.game-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 12px;
    color: #999;
    margin-right: 12px;
    flex-shrink: 0;
    font-weight: bold;
}

.game-item:nth-child(1) .game-num,
.game-item:nth-child(2) .game-num,
.game-item:nth-child(3) .game-num {
    background: var(--primary);
    color: #fff;
}

.game-cover {
    width: 50px;
    height: 65px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    flex: 1;
    min-width: 0;
}

.game-title {
    font-size: 14px;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.game-title a:hover {
    color: var(--primary);
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.game-meta .score {
    color: #FF9F43;
    font-weight: 600;
}

.game-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* ============ 分类筛选条 ============ */

.filter-bar {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0;
}

.filter-row + .filter-row {
    border-top: 1px dashed var(--border);
    margin-top: 6px;
    padding-top: 12px;
}

.filter-label {
    font-size: 13px;
    color: var(--text-sub);
    margin-right: 8px;
    flex-shrink: 0;
}

.filter-tag {
    display: inline-block;
    padding: 4px 14px;
    background: #f5f5f5;
    color: var(--text-sub);
    font-size: 12px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-tag:hover {
    background: var(--primary-light);
    color: #fff;
}

.filter-tag.active {
    background: var(--gradient);
    color: #fff;
}

/* ============ 漫画卡片网格 ============ */

.comic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.comic-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border);
}

.comic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.comic-card .card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.comic-card .cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.comic-card:hover .cover-img {
    transform: scale(1.08);
}

.comic-card .card-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    background: var(--gradient);
    color: #fff;
    font-size: 10px;
    border-radius: 8px;
    z-index: 2;
}

.comic-card .card-info {
    padding: 10px 12px;
}

.comic-card .card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comic-card .card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.comic-card .card-title a:hover {
    color: var(--primary);
}

.comic-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-light);
}

.comic-card .card-meta .score {
    color: #FF9F43;
    font-weight: 600;
}

/* ============ 资讯卡片（用于 news 列表 / topic / tags） ============ */

.info-card-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.info-card-cover {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.info-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.info-card:hover .info-card-cover img {
    transform: scale(1.08);
}

.info-card-body {
    padding: 12px 15px;
}

.info-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0 0 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.info-card-title a {
    color: var(--text-main);
    text-decoration: none;
}

.info-card-title a:hover {
    color: var(--primary);
}

.info-card-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============ 标签页 / 专题页的卡片网格 ============ */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.topic-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border);
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.topic-card-cover {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.topic-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.topic-card:hover .topic-card-cover img {
    transform: scale(1.08);
}

.topic-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.6) 100%);
}

.topic-card-title {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    z-index: 2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-card-body {
    padding: 12px 15px;
}

.topic-card-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.topic-card-link {
    color: var(--primary);
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.topic-card-link:hover {
    color: var(--primary-dark);
}

/* ============ 最新更新 ============ */

.update-header {
    text-align: center;
    padding: 25px 0 20px;
    margin-bottom: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.update-title {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
}

.update-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-sub);
}

.update-tabs {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.update-tab {
    flex: 1;
    padding: 14px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-sub);
    text-decoration: none;
    border-right: 1px solid var(--border-light);
    transition: all 0.2s ease;
    position: relative;
}

.update-tab:last-child {
    border-right: none;
}

.update-tab:hover {
    color: var(--primary);
    background: var(--bg-soft);
}

.update-tab.active {
    color: var(--primary);
    background: var(--bg-soft);
}

.update-tab.active::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.update-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 8px 0;
}

.update-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
}

.update-item:hover {
    background: var(--bg-soft);
}

.update-item:last-child {
    border-bottom: none;
}

.update-rank {
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #f0f0f0;
    color: #999;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
}

.update-rank.rank-top {
    background: var(--primary);
    color: #fff;
}

.update-cover {
    position: relative;
    width: 80px;
    height: 105px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    text-decoration: none;
    background: var(--bg-muted);
}

.update-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.update-type {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    color: #fff;
    line-height: 1.4;
}

.update-type.type-mh {
    background: #7C6FE6;
}

.update-type.type-news {
    background: #ff6b6b;
}

.update-type.type-topic {
    background: #ffa94d;
}

.update-type.type-tag {
    background: #51cf66;
}

.update-info {
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.update-name {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 500;
}

.update-name a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.update-name a:hover {
    color: var(--primary);
}

.update-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.update-meta .meta-author,
.update-meta .meta-status {
    margin-right: 12px;
}

.update-desc {
    margin: 0;
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.update-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 6px 14px;
}

/* ============ 热门排行 ============ */

.rank-topic-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 15px;
}

.rank-topic-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}

.rank-topic-desc {
    margin: 0;
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
}

.rank-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* ============ 分页 ============ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: var(--bg-card);
    color: var(--text-sub);
    font-size: 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    cursor: default;
}

.pagination .disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

/* ============ 详情页通用 ============ */

.detail-layout {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.detail-main {
    flex: 1;
    min-width: 0;
}

.detail-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

/* 漫画详情头部 */

.manga-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.manga-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.manga-cover {
    width: 180px;
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manga-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.manga-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0 0 10px 0;
}

.manga-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.manga-tag {
    padding: 2px 8px;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: 11px;
    border-radius: 8px;
    text-decoration: none;
}

.manga-info-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed #eee;
}

.manga-info-row:last-child {
    border-bottom: none;
}

.manga-info-label {
    width: 60px;
    color: var(--text-light);
    flex-shrink: 0;
}

.manga-info-value {
    color: var(--text-main);
    flex: 1;
}

.manga-tag-label {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f0ff;
    color: var(--primary);
    font-size: 12px;
    border-radius: 4px;
    margin-right: 6px;
    text-decoration: none;
    transition: all .2s;
}
.manga-tag-label:hover {
    background: var(--primary);
    color: #fff;
}

.manga-screenshots {
    margin-top: 16px;
}

.screenshots-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0 0 12px 0;
}

.screenshots-title .screenshots-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: var(--primary);
    flex-shrink: 0;
}

.screenshots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.screenshot-item {
    width: 120px;
    height: 90px;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    flex-shrink: 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
}

.screenshot-item:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manga-desc {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--gradient-soft);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    position: relative;
}

.manga-desc-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.manga-desc-title .desc-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: var(--primary);
    flex-shrink: 0;
}

.manga-desc-text {
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.8;
}

.manga-actions {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    margin-bottom: 16px;
}

.btn-xl {
    padding: 14px 36px;
    border-radius: 26px;
    font-size: 16px;
    font-weight: 600;
}

.btn-xl .btn-icon {
    width: 19px;
    height: 19px;
    margin-right: 8px;
    flex-shrink: 0;
}

.btn-primary.btn-xl {
    box-shadow: 0 5px 18px rgba(124, 111, 230, 0.4);
}

.btn-primary.btn-xl:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(124, 111, 230, 0.5);
}

.btn-secondary.btn-xl {
    border-width: 2px;
}

.btn-secondary.btn-xl:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(124, 111, 230, 0.25);
}

/* 评分星星 */

.stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    width: 14px;
    height: 14px;
    background: url('../images/star.png') center no-repeat;
    background-size: contain;
    display: inline-block;
}

.star.empty {
    background: url('../images/star2.png') center no-repeat;
    background-size: contain;
    opacity: 0.5;
}

/* 按钮 */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    line-height: 1;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 3px 10px rgba(124, 111, 230, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 111, 230, 0.35);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

/* 章节列表（弱化） */

.chapter-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    opacity: 0.92;
}

.chapter-section .section-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.chapter-section .section-title {
    font-size: 14px;
    color: var(--text-sub);
    font-weight: 600;
}

.chapter-section .section-icon-svg {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    color: var(--text-light);
}

.chapter-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.chapter-item {
    padding: 6px 8px;
    background: #fafafa;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    font-size: 11px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid transparent;
}

.chapter-item:hover {
    background: #f0ebff;
    color: var(--primary);
    border-color: var(--primary-light);
    transform: none;
}

/* 漫画详情-章节下方扩展模块 */

.mh-extra-block {
    margin-top: 15px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.topic-grid-item {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.topic-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.topic-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-grid-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 资讯详情 */

.article-detail {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.article-detail-category {
    text-align: center;
    margin-bottom: 10px;
}
.article-detail-category a {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    color: #fff;
    background-color: var(--primary);
    border-radius: 4px;
}
.article-detail-category a:hover {
    opacity: 0.8;
}

.article-detail-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0 0 15px 0;
    text-align: center;
}

.article-detail-meta {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}

.article-detail-meta span {
    margin: 0 10px;
}

.article-detail-body {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.8;
    word-break: break-word;
}

.article-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 10px 0;
}

.article-detail-body p {
    margin: 0 0 12px 0;
}

/* 相关推荐卡片 */

.related-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--gradient-soft);
    border-radius: var(--radius);
    margin-top: 25px;
    gap: 15px;
}

.related-card-cover {
    width: 80px;
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.related-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-info {
    flex: 1;
    min-width: 0;
}

.related-card-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.related-card-name a {
    color: var(--text-main);
    text-decoration: none;
}

.related-card-name a:hover {
    color: var(--primary);
}

.related-card-meta {
    font-size: 11px;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.related-card-meta span {
    margin-right: 10px;
}

.related-card-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
}

.related-card-action {
    flex-shrink: 0;
}

/* 专题头部 */

.feature-header {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.feature-header-cover {
    position: relative;
    flex: 0 0 280px;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-muted);
}

.feature-header-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-header-body {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-header-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.feature-header-desc {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
}

.feature-header-subtitle {
    font-size: 14px;
    color: var(--text-sub);
    margin: 0 0 10px 0;
    font-weight: normal;
}

.feature-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.feature-header-meta .meta-item {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-sub);
}

.feature-header-meta .meta-icon {
    width: 15px;
    height: 15px;
    margin-right: 6px;
    color: var(--primary);
    flex-shrink: 0;
}

/* 侧边栏通用 */

.side-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.side-card-feature {
    padding: 16px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.side-card-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.side-card-feature:hover {
    box-shadow: var(--shadow-hover);
}

.side-card-title {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0 0 14px 0;
    padding-left: 0;
    border-left: none;
}
.section-header .card-title-icon,
.side-card-title .card-title-icon{
    width: 17px;
    height: 17px;
    margin-right: 7px;
    color: var(--primary);
    flex-shrink: 0;
}

/* 推荐列表 */

.recommend-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recommend-item {
    display: flex;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.recommend-item:hover {
    background: var(--gradient-soft);
}

.recommend-item:last-child {
    border-bottom: none;
}

.recommend-cover {
    width: 60px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.recommend-item:hover .recommend-cover {
    transform: scale(1.05);
}

.recommend-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
    min-width: 0;
}

.recommend-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-title a {
    color: var(--text-main);
    text-decoration: none;
}

.recommend-title a:hover {
    color: var(--primary);
}

.recommend-meta {
    font-size: 11px;
    color: var(--text-light);
}

.recommend-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 排行列表 */

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #f0f0f0;
    color: var(--text-light);
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-num {
    background: #FF6B9D;
    color: #fff;
}

.rank-item:nth-child(2) .rank-num {
    background: #A78BFA;
    color: #fff;
}

.rank-item:nth-child(3) .rank-num {
    background: #7C6FE6;
    color: #fff;
}

.rank-link {
    flex: 1;
    color: var(--text-sub);
    font-size: 12px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.rank-link:hover {
    color: var(--primary);
}

/* 标签云 */

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud a {
    padding: 3px 10px;
    background: var(--bg-soft);
    color: var(--text-sub);
    font-size: 11px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-cloud a:hover {
    background: var(--gradient);
    color: #fff;
}

/* 搜索页标签 */

.search-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    width: fit-content;
    border: 1px solid var(--border);
}

.search-tab {
    padding: 6px 20px;
    color: var(--text-sub);
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.search-tab.active {
    background: var(--gradient);
    color: #fff;
}

/* 专题/标签 详情页 - 漫画行列表 */

.manga-row {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px dashed var(--border);
}

.manga-row:last-child {
    border-bottom: none;
}

.manga-row-cover {
    width: 110px;
    height: 150px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.manga-row-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manga-row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.manga-row-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.manga-row-title .row-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--gradient);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.manga-row-title a {
    color: var(--text-main);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manga-row-title a:hover {
    color: var(--primary);
}

.manga-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.manga-row-meta span {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 8px;
}

.manga-row-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 10px 0;
}

.manga-row-action {
    margin-top: auto;
}

/* ============ 右侧栏通用区块 ============ */

.section-tags,
.section-topic,
.section-news,
.section-top10,
.section-new-mh {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.section-tags .section-header,
.section-topic .section-header,
.section-news .section-header,
.section-top10 .section-header,
.section-new-mh .section-header {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.section-tags .section-title,
.section-topic .section-title,
.section-news .section-title,
.section-top10 .section-title,
.section-new-mh .section-title {
    font-size: 14px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-item {
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-sub);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: var(--primary);
    color: #fff;
}

.topic-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.topic-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    transition: background 0.2s ease;
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-item:hover {
    background: #fafafa;
}

.topic-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 11px;
    color: #999;
    margin-right: 8px;
    flex-shrink: 0;
    font-weight: bold;
}

.topic-item:nth-child(1) .topic-num,
.topic-item:nth-child(2) .topic-num,
.topic-item:nth-child(3) .topic-num {
    background: var(--primary);
    color: #fff;
}

.topic-item a {
    flex: 1;
    color: var(--text-main);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-item a:hover {
    color: var(--primary);
}

.news-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
    transition: background 0.2s ease;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: #fafafa;
}

.news-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 11px;
    color: #999;
    margin-right: 8px;
    flex-shrink: 0;
    font-weight: bold;
}

.news-item:nth-child(1) .news-num,
.news-item:nth-child(2) .news-num,
.news-item:nth-child(3) .news-num {
    background: var(--primary);
    color: #fff;
}

.news-title {
    flex: 1;
    color: var(--text-main);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.news-title:hover {
    color: var(--primary);
}

/* ============ 分类标签列表 ============ */

.class-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.class-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.class-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
}

.class-icon {
    color: var(--primary);
    margin-right: 5px;
}

.class-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.class-title a:hover {
    color: var(--primary);
}

.class-more {
    color: #999;
    font-size: 11px;
    text-decoration: none;
}

.class-more:hover {
    color: var(--primary);
}

.class-game-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.class-game-item {
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-sub);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.class-game-item:hover {
    background: var(--primary);
    color: #fff;
}

/* ============ 响应式 ============ */

@media (max-width: 1200px) {
    .site-container,
    .page-wrapper,
    .breadcrumb,
    .article-list,
    .game-list {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }

    .comic-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .info-card-list,
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .comic-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .info-card-list,
    .topic-grid {
        grid-template-columns: 1fr;
    }

    .detail-layout,
    .main-row {
        flex-direction: column;
    }

    .detail-sidebar,
    .main-right {
        width: 100%;
    }

    .manga-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .article-list {
        padding: 10px 15px;
    }

    .article-item {
        flex-wrap: wrap;
    }

    .article-cover {
        width: 80px;
        height: 60px;
    }

    .chapter-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .game-item {
        flex-wrap: wrap;
    }

    .game-item .btn {
        margin-top: 8px;
        width: 100%;
    }
}

.back-top-btn {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(124, 111, 230, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.back-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(124, 111, 230, 0.5);
}

.back-top-btn.show {
    display: flex;
    animation: backTopFadeIn 0.3s ease;
}

.back-top-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-left: 3px solid #fff;
    border-top: 3px solid #fff;
    transform: rotate(45deg);
    margin-bottom: 4px;
}

@keyframes backTopFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
