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

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

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

a:hover {
    color: #ff6b6b;
}

ul {
    list-style: none;
}

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

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

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
    margin-left: 10px;
}

.main-nav {
    display: flex;
}

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

.main-nav a {
    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: #ff6b6b;
    transition: width 0.3s ease;
}

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

.search-box {
    display: flex;
}

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

.search-box button {
    padding: 8px 15px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* 横幅样式 */
.banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../picture/c25.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
}

.banner-content {
    max-width: 800px;
    padding: 0 20px;
}

.banner h1 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: #fff;
}

/* 主要内容样式 */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    margin-bottom: 60px;
}

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

.section-header h2 {
    font-size: 24px;
    color: #333;
}

.more {
    color: #ff6b6b;
    font-weight: 500;
}

/* 卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

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

.card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.card:hover .card-img img {
    transform: scale(1.1);
}

.update-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff6b6b;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.card-info {
    padding: 15px;
}

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

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

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

.tags span {
    background-color: #f0f0f0;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.desc {
    font-size: 14px;
    color: #777;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

/* 分类样式 */
.category-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.category-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 120px;
}

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

.category-item:hover img {
    transform: scale(1.1);
}

.category-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    font-weight: 500;
}

/* APP下载样式 */
.app-download {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.app-content {
    display: flex;
    align-items: center;
}

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

.app-info h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.app-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

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

.app-features li {
    margin-bottom: 10px;
    color: #555;
}

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

.download-btn {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: bold;
    color: #fff;
    transition: all 0.3s ease;
}

.android {
    background-color: #3ddc84;
}

.android:hover {
    background-color: #32b16c;
    color: #fff;
}

.ios {
    background-color: #007aff;
}

.ios:hover {
    background-color: #0056b3;
    color: #fff;
}

.icon-android, .icon-apple {
    margin-right: 10px;
    font-size: 20px;
}

.app-image {
    flex: 1;
    max-width: 300px;
}

.app-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

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

.article-card:hover {
    transform: translateY(-5px);
}

.article-img {
    flex: 0 0 300px;
    height: 200px;
}

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

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

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

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

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

.read-more {
    color: #ff6b6b;
    font-weight: 500;
    display: inline-block;
}

/* 排行榜样式 */
.ranking-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.ranking-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ranking-list h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b6b;
}

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

.ranking-list ul li:last-child {
    border-bottom: none;
}

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

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

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

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

.rank-info {
    display: flex;
    align-items: center;
    flex: 1;
}

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

.rank-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.rank-info p {
    color: #666;
    font-size: 14px;
}

.views {
    color: #888;
    font-size: 12px;
    margin-top: 5px;
}

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

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

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

.footer-logo {
    flex: 0 0 25%;
}

.footer-logo .logo-text {
    font-size: 24px;
    margin-bottom: 15px;
    display: block;
}

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

.footer-nav {
    flex: 0 0 70%;
    display: flex;
    justify-content: space-between;
}

.footer-nav-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-nav-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #ff6b6b;
}

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

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

.footer-nav-column ul li a:hover {
    color: #ff6b6b;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
}

.social-links li {
    margin-right: 15px;
}

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

.footer-middle h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-middle h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #ff6b6b;
}

.footer-middle ul {
    display: flex;
    flex-wrap: wrap;
}

.footer-middle ul li {
    margin-right: 20px;
    margin-bottom: 10px;
}

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

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

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav {
        margin-bottom: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    .card-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .app-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .ranking-container {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-nav {
        flex-wrap: wrap;
    }
    
    .footer-nav-column {
        flex: 0 0 50%;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .banner {
        height: 300px;
    }
    
    .banner h1 {
        font-size: 28px;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .category-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-img {
        flex: 0 0 auto;
        height: 200px;
    }
    
    .footer-nav-column {
        flex: 0 0 100%;
    }
}
