/* 全局重置 & 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", "Ma Shan Zheng", cursive, sans-serif;
}
a {
    text-decoration: none;
    color: inherit;
}
button {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    transform: none !important;
    white-space: nowrap !important;
    /* width: auto !important; */
    direction: ltr !important;
    unicode-bidi: normal !important;
}
body {
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23e2e8f0' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}
::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
}

/* 导航栏 - 渐变背景+立体效果 */
header {
    /* position: sticky; */
    top: 0;
    z-index: 999;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    height: 70px;
}
footer {
    height: 190px;
}
main {
    min-height: calc(100vh - 70px - 190px - 60px - 30px);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo::before {
    content: "✨";
    font-size: 20px;
    animation: sparkle 2s infinite alternate;
}
@keyframes sparkle {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}
.nav-menu {
    display: flex;
    gap: 35px;
}
.nav-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
}
.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e879f9, #6366f1);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-menu a:hover {
    color: #fff;
    transform: translateY(-2px);
}
.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

/* 搜索框 - 渐变边框+悬浮效果 */
.search-box {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.search-box input {
    padding: 8px 16px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    width: 200px;
    color: #fff;
    transition: all 0.3s ease;
    background-image: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.1)),
                        linear-gradient(135deg, #e879f9, #6366f1);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}
.search-box input::placeholder {
    color: rgba(255,255,255,0.6);
}
.search-box input:focus {
    width: 220px;
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 15px rgba(232, 121, 249, 0.2);
}
.search-box button {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(232, 121, 249, 0.2);
}
.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(232, 121, 249, 0.3);
    background: linear-gradient(135deg, #d946ef, #4f46e5);
}

/* 主内容区 */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 标题通用样式 - 渐变文字+装饰 */
.section-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1e293b;
    position: relative;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #e879f9, #6366f1);
    border-radius: 2px;
}
.section-title span {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* 漫画列表区（复用首页并优化） */
.comic-list {
    margin-bottom: 50px;
}
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}
.comic-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid #f1f5f9;
}
.comic-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    background: rgba(0,0,0,0.7);
    color: #fff;
    backdrop-filter: blur(4px);
}
.comic-tag.serial {
    background: linear-gradient(135deg, #f97316, #ea580c);
}
.comic-tag.end {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.comic-cover-wrap {
    position: relative;
    overflow: hidden;
}
.comic-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.comic-cover-wrap::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(232, 121, 249, 0.18);
}
.comic-card:hover .comic-cover {
    transform: scale(1.08);
}
.comic-card:hover .comic-cover-wrap::after {
    opacity: 1;
}
.comic-info {
    padding: 15px;
    position: relative;
    z-index: 2;
}
.comic-title {
    font-size: 14px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 8px;
    display: -webkit-box; 
    -webkit-box-orient: vertical; 
    -webkit-line-clamp: 2; 
    overflow: hidden;
    transition: color 0.3s ease;
}
.comic-card:hover .comic-title {
    color: #6366f1;
}
.comic-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    margin-bottom: 8px;
}
.star {
    color: #fbbf24;
    font-size: 13px;
    display: flex;
    gap: 2px;
}
.comic-hot {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.comic-hot::before {
    content: "🔥";
    font-size: 12px;
}
.comic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.comic-tag-item {
    padding: 2px 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    border-radius: 4px;
}

/* 空数据提示 */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 16px;
}
.empty-tip i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
    color: #cbd5e1;
}


/* 最新更新 + 人气排行 + 标签栏目 布局（核心修改：三列布局） */
.update-rank-tag-wrapper { /* 重命名容器，区分原布局 */
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* 最新更新:人气排行:标签栏目 = 2:1:1 */
    gap: 30px;
    margin-bottom: 50px;
    min-width: 0;
    width: 100%;
}

/* 最新更新 - 卡片化+新标 */
.latest-update {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    min-width: 0;
}
.update-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.update-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 0;
}
.update-item:last-child {
    border-bottom: none;
}
.update-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
}
.update-cover {
    width: 70px;
    height: 95px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.update-item:hover .update-cover {
    transform: scale(1.05);
}
.update-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: nowrap;
}
.update-comic-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.update-item:hover .update-comic-name {
    color: #6366f1;
}
.new-tag {
    padding: 2px 8px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    flex-shrink: 0;
}
.update-chapter {
    font-size: 14px;
    color: #6366f1;
    font-weight: 500;
    margin-bottom: 5px;
}
.update-time {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}
.update-time::before {
    content: "🕒";
    font-size: 11px;
}

/* 人气排行 - 独立容器（移除原标签导航） */
.rank-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.rank-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #e879f9, #6366f1);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.rank-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
    cursor: pointer;
}
.rank-item:hover::before {
    opacity: 1;
}
.rank-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    flex-shrink: 0;
}
/* 前三名特殊样式 */
.rank-list > :nth-child(1) .rank-num {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}
.rank-list > :nth-child(2) .rank-num {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    box-shadow: 0 4px 10px rgba(148, 163, 184, 0.3);
}
.rank-list > :nth-child(3) .rank-num {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #fff;
    box-shadow: 0 4px 10px rgba(248, 113, 113, 0.3);
}
.rank-cover {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.rank-item:hover .rank-cover {
    transform: scale(1.08);
}
.rank-details {
    flex: 1;
    min-width: 0;
}
.rank-comic-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}
.rank-item:hover .rank-comic-name {
    color: #6366f1;
}
.rank-popularity {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.rank-popularity::before {
    content: "🔥";
    font-size: 11px;
}

/* 新增：右侧独立Tag标签栏目 */
.tag-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
/* Tag标签容器 - 多行排列 */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    align-content: flex-start;
}
/* Tag标签样式（强化视觉效果） */
.tag-item {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    white-space: nowrap;
}
.tag-item:hover {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(232, 121, 249, 0.2);
}
.tag-item.active {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
}
/* 热门Tag标识 */
.tag-item.hot::after {
    content: "熱";
    font-size: 10px;
    margin-left: 4px;
    padding: 1px 4px;
    background: #f97316;
    color: #fff;
    border-radius: 3px;
}


/* 筛选Form表单样式（核心：用label模拟标签，隐藏原生input） */
.filter-form {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    margin-bottom: 30px;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group:last-child {
    margin-bottom: 0;
}
.filter-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    display: block;
}

/* 隐藏原生radio/checkbox */
.filter-input {
    display: none;
}

/* Tag标签筛选（Form版） */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag-label {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
}
/* 选中状态（对应input:checked） */
.filter-input:checked + .tag-label {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
}
.tag-label:hover {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(232, 121, 249, 0.2);
}

/* 进度筛选（Form版） */
.progress-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.progress-label {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.filter-input:checked + .progress-label {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}
.progress-label:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* 排序筛选（按钮版）- 新增样式 */
.sort-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px; /* 和按钮组分开 */
}
.sort-label {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.filter-input:checked + .sort-label {
    background: linear-gradient(135deg, #f97316, #ea580c); /* 橙色系区分排序按钮 */
    color: #fff;
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.2);
}
.sort-label:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* 表单按钮样式 */
.form-btn-group {
    display: flex;
    gap: 15px;
    align-items: center;
}
.submit-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(232, 121, 249, 0.2);
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(232, 121, 249, 0.3);
    background: linear-gradient(135deg, #d946ef, #4f46e5);
}
.reset-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.reset-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
}

/* 优化：友情链接样式（灵活自适应版） */
.friend-links {
    background: linear-gradient(135deg, #fff 0%, #fef7fb 100%);
    border-radius: 16px;
    padding: 20px 20px;
    box-shadow: 0 8px 24px rgba(232, 121, 249, 0.15);
    border: 2px solid #f0abfc;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.friend-links::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e879f9, #6366f1);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}
.friend-links-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.friend-links-title::before {
    content: "🔗";
    font-size: 24px;
    animation: linkIcon 2s infinite alternate;
}
@keyframes linkIcon {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}
/* ========== 核心修改1：基础Grid布局（大屏自适应） ========== */
.friend-links-list {
    display: grid;
    /* 大屏下自动填充，最小宽度120px */
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 7px;
    position: relative;
    z-index: 1;
}
.friend-link-item {
    text-decoration: none;
    color: #ec7ffffc;
    font-size: 14px;
    font-weight: 600;
    padding: 5px 5px;
    border-radius: 10px;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f8ff 100%);
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    word-break: keep-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ========== 核心修改结束 ========== */
.friend-link-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: all 0.6s ease;
}
.friend-link-item:hover {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(232, 121, 249, 0.4);
    border-color: #fff;
}
.friend-link-item:hover::before {
    left: 100%;
}

/* 分页组件样式 */
.pagination-container {
    margin: 40px 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #f1f5f9;
}
.page-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.page-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(232, 121, 249, 0.2);
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #f8fafc;
}
.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}
.page-number {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-number:hover:not(.active) {
    background: #e2e8f0;
    color: #6366f1;
}
.page-number.active {
    background: linear-gradient(135deg, #e879f9, #6366f1);
    color: #fff;
    box-shadow: 0 4px 8px rgba(232, 121, 249, 0.2);
}
.page-ellipsis {
    padding: 0 4px;
    color: #94a3b8;
    font-size: 14px;
}

/* 响应式适配分页 */
@media (max-width: 768px) {
    .pagination {
        padding: 8px 15px;
    }
    .page-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    .page-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    /* 仅微调移动端友情链接的内边距 */
    .friend-links {
        padding: 15px 15px;
    }
    .friend-links-title {
        font-size: 18px;
    }
    .friend-link-item {
        font-size: 15px;
        padding: 8px 6px;
        min-height: 40px;
    }
}
@media (max-width: 480px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    .page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .prev-btn {
        order: 1;
    }
    .next-btn {
        order: 2;
    }
    /* 关键：手机端友情链接强制3列 */
    .friend-links-list {
        grid-template-columns: repeat(3, 1fr) !important;
        /* 可选：调整移动端间距，让显示更紧凑 */
        gap: 6px;
    }
    .friend-link-item {
        min-width: unset; /* 取消最小宽度限制，适配3列布局 */
    }
}

/* 页脚 - 渐变+磨砂效果 */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
}
.footer-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.footer-title::after, .footer-title::before {
    content: "";
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e879f9, transparent);
}

/* 响应式适配 - 三列布局适配 */
@media (min-width: 1200px) {
    /* 大屏PC端强制固定布局比例 */
    .update-rank-tag-wrapper {
        grid-template-columns: 550px 300px 250px; /* 精准控制三列宽度 */
        justify-content: center;
    }
}
@media (max-width: 1024px) {
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .comic-cover {
        height: 250px;
    }
    .update-rank-tag-wrapper {
        grid-template-columns: 2fr 1fr 1fr; /* 保持比例 */
    }
}
@media (max-width: 768px) {
    .nav-menu {
        gap: 20px;
    }
    .search-box input {
        width: 160px;
    }
    .search-box input:focus {
        width: 180px;
    }
    /* 移动端：三列变单列，依次排列 */
    .update-rank-tag-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
    .comic-cover {
        height: 220px;
    }
}
@media (max-width: 480px) {
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    .logo {
        width: 100%;
        justify-content: center;
    }
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    .search-box {
        width: 100%;
        justify-content: center;
    }
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .comic-cover {
        height: 200px;
    }
    .update-item {
        gap: 10px;
    }
    .update-cover {
        width: 60px;
        height: 80px;
    }
    .footer-title::after, .footer-title::before {
        width: 30px;
    }
}
/* 响应式适配 */
@media (max-width: 1200px) {
    .rank-desc {
        flex-wrap: wrap;
        gap: 10px;
    }
}
@media (max-width: 768px) {
    .nav-menu {
        gap: 20px;
    }
    .search-box input {
        width: 160px;
    }
    .search-box input:focus {
        width: 180px;
    }
    .rank-tabs {
        padding: 12px 13px;
        gap: 10px;
    }
    .rank-tab-item {
        padding: 8px 20px;
        font-size: 15px;
    }
    .rank-list {
        padding: 20px;
    }
    .rank-title {
        font-size: 16px;
    }
    /* 响应式下简介调整 */
    .rank-intro {
        -webkit-line-clamp: 1; /* 移动端只显示1行 */
        line-clamp: 1;
    }
}
@media (max-width: 480px) {
    header {
        height: auto;
    }
    footer {
        height: 210px;
    }
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    .logo {
        width: 100%;
        justify-content: center;
    }
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    .search-box {
        width: 100%;
        justify-content: center;
    }
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
    /* 核心修复：排行榜项布局 */
    .rank-item {
        display: flex;
        align-items: center; /* 保持顶部对齐 */
        flex-wrap: wrap; /* 允许换行 */
        padding: 15px 10px;
        gap: 10px; /* 新增：元素间统一间距，避免挤压 */
    }
    /* 排名数字：小屏适配 */
    .rank-num {
        margin-top: 0; /* 重置顶部间距 */
        margin-right: 0; /* 重置右侧间距 */
        flex-shrink: 0;
    }
    /* 封面：小屏占比优化 */
    .rank-cover {
        margin-right: 0; /* 重置右侧间距 */
        flex-shrink: 0;
    }
    /* 信息区：小屏占满剩余宽度 */
    .rank-info {
        width: calc(100% - 120px); /* 扣除排名+封面宽度，避免换行混乱 */
        margin-top: 0; /* 重置顶部间距 */
    }
    /* 极端小屏：信息区强制占满整行 */
    @media (max-width: 375px) {
        .rank-info {
            width: 100%;
            margin-top: 10px; /* 换行后增加顶部间距 */
        }
    }
    .rank-desc {
        margin-bottom: 8px;
    }
    .footer-title::after, .footer-title::before {
        width: 30px;
    }
}