/* 全局样式 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --dark-color: #292F36;
    --light-color: #F7FFF7;
    --gray-color: #E0E0E0;
    --text-color: #333;
    --link-color: #FF6B6B;
    --link-hover-color: #FF8787;
    --font-main: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f9f9f9;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../picture/c33.jpg');
    background-attachment: fixed;
    background-size: cover;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

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

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

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

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

.logo a {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: white;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 200px;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50%;
    position: relative;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: white;
    bottom: -6px;
    right: -2px;
    transform: rotate(45deg);
}

/* 主要内容 */
main {
    padding: 20px 0;
}

section {
    margin-bottom: 40px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-color);
}

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

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

.more-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* 轮播图模块 */
.banner {
    margin-bottom: 30px;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    position: relative;
    display: none;
}

.slide.active {
    display: block;
}

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

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

.slide-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.prev-btn, .next-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

.dots {
    display: flex;
    gap: 8px;
}

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

.dot.active {
    background-color: white;
}

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

.anime-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background-color: white;
}

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

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.episode {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.card-info {
    padding: 10px;
}

.card-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 0.8rem;
    color: #666;
}

/* APP下载模块 */
.app-download {
    background-color: var(--light-color);
    padding: 30px 0;
}

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

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

.app-info h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

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

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

.feature-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

.feature-icon::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

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

.download-btn {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--dark-color);
    color: white;
    border-radius: 5px;
    font-weight: 500;
}

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

.android-icon, .ios-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-color: white;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.android-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.6,9.48l1.84-3.18c0.16-0.31,0.04-0.69-0.26-0.85c-0.29-0.15-0.65-0.06-0.83,0.22l-1.88,3.24 c-2.86-1.21-6.08-1.21-8.94,0L5.65,5.67c-0.19-0.29-0.58-0.38-0.87-0.2C4.5,5.65,4.41,6.01,4.56,6.3L6.4,9.48 C3.3,11.25,1.28,14.44,1,18h22C22.72,14.44,20.7,11.25,17.6,9.48z M7,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25S8.25,13.31,8.25,14C8.25,14.69,7.69,15.25,7,15.25z M17,15.25c-0.69,0-1.25-0.56-1.25-1.25 c0-0.69,0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25C18.25,14.69,17.69,15.25,17,15.25z'/%3E%3C/svg%3E");
}

.ios-icon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.05,20.28c-0.98,0.95-2.05,0.8-3.08,0.35c-1.09-0.46-2.09-0.48-3.24,0c-1.44,0.62-2.2,0.44-3.06-0.35 C2.79,15.25,3.51,7.59,8.42,7.31c1.33,0.07,2.25,0.78,3.05,0.8c1.22-0.04,1.94-0.84,3.05-0.85c1.29,0.01,2.29,0.54,2.99,1.39 c-2.59,1.43-2.15,5.09,0.41,5.97C17.58,16.24,17.64,18.25,17.05,20.28z M12.03,7.25c-0.15-2.23,1.66-4.07,3.74-4.25 C16.06,5.32,13.91,7.27,12.03,7.25z'/%3E%3C/svg%3E");
}

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

.app-qrcode img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.app-qrcode p {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--dark-color);
}

/* 动漫资讯模块 */
.news-container {
    padding: 20px;
}

.news-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-color);
}

.news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-image {
    flex: 0 0 200px;
    margin-right: 20px;
}

.news-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.news-content {
    flex: 1;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.news-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #999;
}

/* 排行榜模块 */
.ranking-tabs {
    padding: 0 20px 20px;
}

.tab-header {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    border-bottom: 1px solid var(--gray-color);
}

.tab {
    padding: 10px 0;
    cursor: pointer;
    position: relative;
    color: #666;
    font-weight: 500;
}

.tab.active {
    color: var(--primary-color);
}

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

.tab-pane {
    display: none;
}

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

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background-color: #f0f0f0;
}

.rank-num {
    flex: 0 0 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 15px;
}

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

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

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

.rank-image {
    flex: 0 0 60px;
    margin-right: 15px;
}

.rank-image img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.rank-info {
    flex: 1;
}

.rank-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.rank-info p {
    font-size: 0.8rem;
    color: #666;
}

.rank-score {
    flex: 0 0 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 动漫专题模块 */
.topics-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.topic-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.topic-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.topic-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.topic-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.topic-info p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 页脚 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

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

.footer-site-info {
    margin-left: 15px;
}

.footer-site-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.footer-site-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

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

.footer-link-column h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

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

.footer-link-column ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link-column ul li a {
    color: #ccc;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 15px;
}

.friend-links h4 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.friend-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links ul li a {
    color: #ccc;
    font-size: 0.8rem;
}

.friend-links ul li a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .app-content {
        flex-direction: column;
    }
    
    .app-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        flex: none;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .news-image img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .anime-cards {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .card-image img {
        height: 200px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .slide img {
        height: 250px;
    }
    
    .anime-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topics-container {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
    }
}
