* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f5;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e0e0e0;
    --hover-color: #ff5252;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background-color: #fff;
    line-height: 1.6;
}

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

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

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

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

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-login {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.user-center {
    position: relative;
    cursor: pointer;
}

.username {
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 20px;
    display: inline-block;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 5px;
    min-width: 150px;
    display: none;
}

.user-center:hover .user-menu {
    display: block;
}

.user-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.user-menu a:hover {
    background: var(--light-bg);
}

.nav-menu {
    display: flex;
    gap: 30px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* 轮播图样式 */
.banner-section {
    margin-bottom: 30px;
}

.banner-container {
    position: relative;
    height: 450px;
    overflow: hidden;
    border-radius: 10px;
}

.banner-slider {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

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

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px;
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.btn-read {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

.banner-prev,
.banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.banner-prev {
    left: 20px;
}

.banner-next {
    right: 20px;
}

.banner-prev:hover,
.banner-next:hover {
    background: rgba(0,0,0,0.8);
}

/* 公告通知栏 */
.notice-section {
    margin-bottom: 30px;
}

.notice-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notice-icon {
    font-size: 24px;
}

.notice-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.notice-links {
    display: flex;
    gap: 20px;
}

.notice-links a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 15px;
    transition: background 0.3s;
}

.notice-links a:hover {
    background: rgba(255,255,255,0.2);
}

/* 通用区域样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: 40px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.more-link:hover {
    text-decoration: underline;
}

/* 漫画网格 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.comic-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.comic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.comic-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.comic-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-bg);
    display: block;
}

.comic-info {
    padding: 12px;
}

.comic-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.comic-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.free-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-top: 5px;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Tab内容切换 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 排行榜样式 */
.ranking-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
}

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

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

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

.ranking-item:hover {
    background: var(--light-bg);
}

.ranking-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.ranking-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.ranking-cover {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.ranking-info {
    flex: 1;
}

.ranking-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.ranking-author {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.ranking-desc {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 分类标签区域 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-tag {
    padding: 8px 16px;
    background: var(--light-bg);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-primary);
    display: inline-block;
}

.category-tag:hover {
    background: var(--primary-color);
    color: white;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.filter-bar select {
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.filter-bar select:focus {
    border-color: var(--primary-color);
}

/* 下载区域 */
.download-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin: 40px 0;
}

.download-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.download-info h3 {
    font-size: 32px;
    margin-bottom: 25px;
}

.download-features {
    list-style: none;
    margin-bottom: 30px;
}

.download-features li {
    font-size: 18px;
    margin-bottom: 12px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-download {
    padding: 15px 35px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.download-links {
    margin-bottom: 15px;
}

.download-links a {
    color: white;
    text-decoration: underline;
}

.download-desc {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
}

.download-qr {
    text-align: center;
}

.download-qr img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    background: white;
    padding: 10px;
}

.download-qr p {
    margin-top: 10px;
    font-size: 14px;
}

/* 社区区域 */
.community-section {
    margin: 40px 0;
}

.community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.hot-comments,
.user-recommendations {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hot-comments h3,
.user-recommendations h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-list,
.booklist-list {
    /* 列表样式 */
}

.comment-item,
.booklist-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child,
.booklist-item:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* 底部样式 */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
    position: relative;
}

.footer-content {
    margin-bottom: 30px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-column a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 5px 0;
    color: rgba(255,255,255,0.6);
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
        margin: 0;
    }

    .nav-menu {
        overflow-x: auto;
        gap: 15px;
    }

    .banner-container {
        height: 300px;
    }

    .banner-content {
        padding: 20px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .banner-content p {
        font-size: 14px;
    }

    .notice-content {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .download-content {
        flex-direction: column;
        text-align: center;
    }

    .community-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .ranking-item a {
        flex-direction: column;
        align-items: flex-start;
    }

    .ranking-number {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
    }
}
