/* 全局样式 */
:root {
    --primary-color: #ff6b81;
    --secondary-color: #6c5ce7;
    --accent-color: #fdcb6e;
    --text-color: #2d3436;
    --light-text: #636e72;
    --bg-color: #ffffff;
    --light-bg: #f9f9f9;
    --border-color: #dfe6e9;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    --gradient-bg: linear-gradient(135deg, #ff6b81 0%, #6c5ce7 100%);
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

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

ul, ol {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

/* 布局容器 */
.header-container,
.footer-container,
.section-header,
.manga-grid,
.article-container,
.category-container,
.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

.header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    margin-left: 10px;
    color: var(--primary-color);
    font-weight: 700;
}

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

.search-box form {
    display: flex;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 129, 0.2);
    outline: none;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 16px;
    cursor: pointer;
}

.main-nav {
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 0 10px;
}

.main-nav a {
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.main-nav a:hover:after {
    width: 100%;
}

/* 轮播图样式 */
.banner-slider {
    position: relative;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    max-width: 1200px;
    margin: 20px auto;
}

.slider-container {
    position: relative;
    height: 400px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
}

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

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.slide-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* 章节样式 */
section {
    margin: 40px 0;
    padding: 20px 0;
}

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

.section-header h2 {
    font-size: 22px;
    color: var(--text-color);
    position: relative;
    padding-left: 15px;
}

.section-header h2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

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

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

/* 漫画卡片样式 */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0 15px;
}

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

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

.manga-cover {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.manga-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.manga-card:hover .manga-cover img {
    transform: scale(1.05);
}

.update-badge,
.rank-badge,
.complete-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
    font-weight: 500;
}

.update-badge {
    background-color: var(--primary-color);
}

.rank-badge {
    background-color: var(--secondary-color);
}

.complete-badge {
    background-color: var(--accent-color);
}

.manga-info {
    padding: 10px;
}

.manga-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author {
    font-size: 12px;
    color: var(--light-text);
    margin-bottom: 5px;
}

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

.tags span {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: rgba(108, 92, 231, 0.1);
    color: var(--secondary-color);
}

/* APP下载样式 */
.app-download {
    background: var(--gradient-bg);
    padding: 40px 0;
    color: white;
    border-radius: 10px;
    margin: 40px auto;
    max-width: 1200px;
}

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

.app-info {
    flex: 1;
    padding-right: 30px;
}

.app-info h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.app-info p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.app-features {
    margin-bottom: 20px;
}

.app-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

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

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

.android-btn,
.ios-btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.ios-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
}

.android-btn:hover,
.ios-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.app-qrcode {
    text-align: center;
}

.app-qrcode img {
    width: 150px;
    height: 150px;
    border: 5px solid white;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* 文章样式 */
.article-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    display: flex;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

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

.article-image {
    flex: 0 0 250px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    flex: 1;
    padding: 20px;
}

.article-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

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

.article-excerpt {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

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

/* 分类样式 */
.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 0 15px;
}

.category-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    background-color: var(--primary-color);
    color: white;
}

.category-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.category-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.category-card p {
    font-size: 12px;
    color: var(--light-text);
}

.category-card:hover p {
    color: rgba(255, 255, 255, 0.8);
}

/* 页脚样式 */
footer {
    background-color: #2d3436;
    color: #dfe6e9;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-right: 50px;
    margin-bottom: 20px;
}

.footer-logo span {
    font-size: 20px;
    font-weight: 700;
    margin-left: 10px;
}

.footer-nav {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-nav-column {
    min-width: 150px;
    margin-bottom: 20px;
}

.footer-nav-column h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-nav-column h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-nav-column ul li {
    margin-bottom: 8px;
}

.footer-nav-column a {
    color: #b2bec3;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-nav-column a:hover {
    color: var(--primary-color);
}

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

.copyright {
    margin-bottom: 10px;
}

.copyright p {
    font-size: 14px;
    color: #b2bec3;
}

.footer-disclaimer {
    font-size: 12px;
    color: #636e72;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
        margin: 15px 0;
    }
    
    .main-nav {
        width: 100%;
        margin-top: 15px;
    }
    
    .main-nav ul {
        justify-content: center;
    }
    
    .slider-container {
        height: 300px;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .app-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-image {
        flex: 0 0 200px;
    }
}

@media (max-width: 768px) {
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .slider-container {
        height: 250px;
    }
    
    .slide-info h3 {
        font-size: 20px;
    }
    
    .footer-nav {
        flex-direction: column;
    }
    
    .footer-nav-column {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .slider-container {
        height: 200px;
    }
    
    .slide-info h3 {
        font-size: 18px;
    }
    
    .category-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
