* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

:root {
    --primary-color: #56b0f0;
    --primary-hover: #3a8fd0;
    --text-color: #333;
    --text-light: #999;
    --bg-color: #fff;
    --section-bg: #f0f8ff;
}

.header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: relative;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav {
    margin-left: 30px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-right: 20px;
}

.main-nav a {
    padding: 5px 0;
    color: #333;
    font-weight: 500;
    position: relative;
}

.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.search-box {
    display: flex;
    flex-grow: 1;
    margin: 0 20px;
    max-width: 500px;
}

.search-box input {
    flex-grow: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: var(--primary-hover);
}

.user-actions .login-btn {
    padding: 8px 15px;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.user-actions .login-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.category-nav {
    background-color: var(--bg-color);
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}

.category-list {
    display: flex;
    list-style: none;
    white-space: nowrap;
}

.category-list li {
    margin-right: 20px;
}

.category-list li a {
    padding: 5px 0;
    color: var(--text-color);
    position: relative;
}

.category-list li.active a {
    font-weight: bold;
    color: var(--primary-color);
}

.category-list li.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.category-list li a:hover {
    color: var(--primary-color);
}

.main-content {
    padding: 20px 0;
}

.section {
    margin-bottom: 30px;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size:16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--primary-color);
}

li{
    list-style: none;
}

.sorts h2{
    border-bottom:1px solid #eee;
}

.sorts .item{
    position: relative;
    float:left;
    width:31%;
    margin-left:1%;
    margin-right:1%;
    margin-top:10px;
    margin-bottom:10px;
    line-height: 40px;
}

.sorts .item span{
    position:absolute;
    right:0px;
    color: #9f9e9e;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.book-list-2 {
    grid-template-columns: repeat(auto-fill, minmax(209px, 1fr));
}

.book-item {
    position: relative;
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-item .book-cover-2{
    position:absolute;
    top:15px;
    left:0px;
}

.book-item .book-cover-2 img{
    border-radius:5px;
}

.book-item .book-info-2{
    margin-left:90px;
}

.book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.book-title {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.book-title-2{
    font-size:14px !important;
    font-weight: normal !important;
}

.book-author {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.book-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.status {
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.word-count {
    color: #666;
}

.collect-btn {
    color: var(--primary-color);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.collect-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.collect-btn.collected {
    background-color: var(--primary-color);
    color: white;
}

.category-rankings .ranking-content {
    display: none;
}

.category-rankings .ranking-content.active {
    display: block;
}

.ranking-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 5px 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.ranking-list ol {
    list-style: none;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.rank {
    font-weight: bold;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.book-title {
    flex: 2;
    min-width: 150px;
}

.book-author {
    flex: 1;
    min-width: 100px;
    color: var(--text-light);
}

.book-category {
    flex: 0.8;
    color: var(--primary-color);
    font-size: 13px;
}

.view-count {
    flex: 1;
    text-align: center;
    color: var(--text-light);
}

.update-info {
    flex: 1.5;
    color: var(--text-light);
    font-size: 13px;
}

/* 最近更新 - 详细版 */
.update-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-item {
    display: flex;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.update-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.book-cover {
    flex: 0 0 80px;
    margin-right: 15px;
}

.book-cover img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.book-details {
    flex: 1;
}

.book-title {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.book-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.update-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.chapter {
    color: var(--primary-color);
}

.book-actions {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
}

.read-btn {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.read-btn:hover {
    background-color: var(--primary-hover);
}

.footer {
    background-color: var(--bg-color);
    padding: 20px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    border-top: 1px solid #eee;
}

@media (max-width: 992px) {
    .update-item {
        flex-direction: column;
    }

    .book-cover {
        margin-right: 0;
        margin-bottom: 15px;
        align-self: center;
    }

    .book-actions {
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .sorts .item{
        width:99%;
    }
    .m-hide{
        display: none;
    }
    .header .container {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin: 10px 0 0;
    }

    .main-nav ul {
        justify-content: center;
    }

    .ranking-list li {
        flex-wrap: wrap;
        gap: 5px;
    }

    .rank, .book-title, .book-author,
    .book-category, .view-count,
    .update-info, .collect-btn {
        flex: 1 1 45%;
    }

    .search-box {
        order: 2;
        width: 100%;
        margin: 10px 0;
    }

    .user-actions {
        order: 1;
    }
}

@media (max-width: 480px) {
    .book-meta, .update-info {
        gap: 5px;
    }

    .book-desc {
        display: none;
    }

    .category-list li {
        margin-right: 10px;
    }

    .section {
        padding: 15px;
    }
}


.rankings-page {
    padding-top: 30px;
}

.ranking-filters {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.ranking-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ranking-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ranking-header h2 {
    font-size: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.icon {
    margin-right: 8px;
    font-size: 18px;
}

.more-link {
    font-size: 14px;
    color: var(--text-light);
    transition: color 0.3s;
}

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

.top-three {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.champion {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(to bottom, #fff8e1, white);
    border-radius: 8px;
    position: relative;
}

.champion .rank-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.champion .book-cover {
    position: relative;
    margin-bottom: 15px;
}

.champion .book-cover img {
    width: 120px;
    height: 160px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.crown-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 24px;
    background-color: gold;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.champion .book-info {
    width: 100%;
}

.champion .book-title {
    font-size: 18px;
    margin-bottom: 5px;
}

.champion .book-author {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.champion .book-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.book-stats .icon {
    margin-right: 3px;
}

.second-third {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.runner-up, .third-place {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.runner-up .rank-number, .third-place .rank-number {
    background-color: silver;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.third-place .rank-number {
    background-color: #cd7f32; /* 铜牌颜色 */
}

.runner-up .book-cover img, .third-place .book-cover img {
    width: 60px;
    height: 80px;
    border-radius: 4px;
    margin-right: 15px;
}

.runner-up .book-info, .third-place .book-info {
    flex: 1;
}

.runner-up .book-title, .third-place .book-title {
    font-size: 16px;
    margin-bottom: 5px;
}

.runner-up .book-author, .third-place .book-author {
    font-size: 13px;
    color: var(--text-light);
}

.ranking-list {
    list-style: none;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.ranking-list li:hover {
    background-color: #f9f9f9;
}

.ranking-list .rank {
    font-weight: bold;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.ranking-list .book-title {
    flex: 2;
    min-width: 150px;
}

.ranking-list .book-author {
    flex: 1;
    min-width: 100px;
    color: var(--text-light);
}

.ranking-list .book-category {
    flex: 2.5;
    color: var(--primary-color);
    font-size: 13px;
}

.ranking-list .view-count {
    flex: 1;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.ranking-list .update-info {
    flex: 2.5;
    color: var(--text-light);
    font-size: 13px;
}

.new-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.new-book-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s;
}

.new-book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.new-book-item .book-cover {
    position: relative;
    margin-bottom: 10px;
}

.new-book-item .book-cover img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4757;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.new-book-item .book-info {
    text-align: center;
}

.new-book-item .book-title {
    font-size: 16px;
    margin-bottom: 5px;
}

.new-book-item .book-author {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.new-book-item .book-stats {
    justify-content: center;
    margin-bottom: 10px;
}


@media (max-width: 992px) {
    .top-three {
        flex-direction: column;
    }

    .second-third {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .ranking-list li {
        flex-wrap: wrap;
        padding: 15px;
    }

    .ranking-list .rank,
    .ranking-list .book-title,
    .ranking-list .book-author,
    .ranking-list .book-category,
    .ranking-list .view-count,
    .ranking-list .update-info,
    .ranking-list .collect-btn {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }

    .new-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .filter-options {
        gap: 5px;
    }

    .filter-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .second-third {
        flex-direction: column;
    }

    .new-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

