/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

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

a {
    text-decoration: none;
    color: #ff6b81;
    transition: all 0.3s ease;
}

a:hover {
    color: #ff4757;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: #ff6b81;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: #ff6b81;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    color: #777;
    font-size: 16px;
}

/* 头部导航 */
#header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 28px;
    color: #ff6b81;
    font-weight: bold;
}

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

#nav ul li {
    margin-left: 20px;
}

#nav ul li a {
    color: #333;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
}

#nav ul li a:hover {
    background-color: #ff6b81;
    color: #fff;
}

/* 横幅区域 */
.banner {
    background-color: #ffebee;
    padding: 80px 0;
}

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

.banner-content {
    flex: 1;
    padding-right: 40px;
}

.banner-content h2 {
    font-size: 42px;
    color: #ff4757;
    margin-bottom: 20px;
}

.banner-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ff6b81;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    background-color: #ff6b81;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 0 4px 4px 0;
}

.search-box button:hover {
    background-color: #ff4757;
}

.banner-image {
    flex: 1;
    text-align: right;
}

.banner-image img {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 最新更新区域 */
.new-update {
    background-color: #fff;
}

.comic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.comic-card {
    width: 220px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.comic-card:hover {
    transform: translateY(-10px);
}

.comic-cover img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.comic-info {
    padding: 15px;
}

.comic-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.comic-info p {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: #ffebee;
    color: #ff6b81;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
}

/* 热门推荐区域 */
.popular {
    background-color: #f9f9f9;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.comic-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comic-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.comic-item:hover img {
    transform: scale(1.05);
}

.comic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.comic-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.comic-overlay p {
    font-size: 14px;
    opacity: 0.8;
}

/* 分类区域 */
.category {
    background-color: #fff;
}

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

.category-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

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

.category-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.category-item h3 {
    font-size: 18px;
    color: #ff6b81;
    margin-bottom: 5px;
}

.category-item p {
    color: #777;
    font-size: 14px;
}

/* 排行榜区域 */
.rank {
    background-color: #f9f9f9;
}

.rank-tabs {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-header {
    display: flex;
    background-color: #ffebee;
}

.tab-header span {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
}

.tab-header span.active {
    background-color: #ff6b81;
    color: #fff;
}

.tab-content {
    padding: 20px;
}

.rank-list {
    display: none;
}

.rank-list.active {
    display: block;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.rank-num {
    width: 30px;
    height: 30px;
    background-color: #ff6b81;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

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

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

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

.rank-item img {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.rank-info {
    flex: 1;
}

.rank-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.rank-info p {
    color: #777;
    font-size: 14px;
    margin-bottom: 5px;
}

.stars {
    display: flex;
    align-items: center;
}

.stars span:first-child {
    color: #ffd700;
    margin-right: 10px;
}

.score {
    font-weight: bold;
    color: #ff6b81;
}

/* 作者专区 */
.author {
    background-color: #fff;
}

.author-list {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.author-card {
    width: 220px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.author-card:hover {
    transform: translateY(-10px);
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid #ff6b81;
}

.author-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.author-card p {
    color: #777;
    font-size: 14px;
    margin-bottom: 5px;
}

.follow-btn {
    background-color: #ff6b81;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    margin-top: 10px;
}

.follow-btn:hover {
    background-color: #ff4757;
}

/* 社区互动 */
.community {
    background-color: #f9f9f9;
}

.community-content {
    display: flex;
    gap: 30px;
}

.discussion-board {
    flex: 2;
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.discussion-board h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #ff6b81;
}

.discussion-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.user-info {
    margin-right: 15px;
    text-align: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.user-info span {
    font-size: 12px;
    color: #777;
    display: block;
}

.discussion-content {
    flex: 1;
}

.discussion-content h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.discussion-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.discussion-stats {
    display: flex;
    font-size: 12px;
    color: #999;
}

.discussion-stats span {
    margin-right: 15px;
}

.community-sidebar {
    flex: 1;
}

.join-community, .community-stats {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.join-community h3, .community-stats h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #ff6b81;
}

.join-community p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.join-btn {
    width: 100%;
    background-color: #ff6b81;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    font-size: 16px;
}

.join-btn:hover {
    background-color: #ff4757;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #ff6b81;
}

/* 文章区域 */
.articles {
    background-color: #fff;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.article-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-item h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.article-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.article-item p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* 页脚 */
#footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo h3 {
    font-size: 24px;
    color: #ff6b81;
    margin-bottom: 15px;
}

.footer-logo p {
    color: #ccc;
    font-size: 14px;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.link-group {
    min-width: 150px;
}

.link-group h4 {
    font-size: 18px;
    color: #ff6b81;
    margin-bottom: 15px;
}

.link-group ul {
    list-style: none;
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group ul li a {
    color: #ccc;
    font-size: 14px;
}

.link-group ul li a:hover {
    color: #ff6b81;
}

.footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-contact h4 {
    font-size: 18px;
    color: #ff6b81;
    margin-bottom: 15px;
}

.footer-contact p {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: #444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.social-icon:hover {
    background-color: #ff6b81;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.footer-bottom p {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-bottom a {
    color: #ff6b81;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .banner .container {
        flex-direction: column;
    }
    
    .banner-content {
        padding-right: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .search-box {
        margin: 0 auto;
    }
    
    .community-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    #header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    #nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #nav ul li {
        margin: 5px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .comic-list {
        justify-content: center;
    }
    
    .comic-card {
        width: 100%;
        max-width: 280px;
    }
    
    .comic-grid {
        grid-template-columns: 1fr;
    }
    
    .category-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .author-list {
        justify-content: center;
    }
    
    .author-card {
        width: 100%;
        max-width: 280px;
    }
}
