/* 基础重置和变量 */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --text-color: #333;
    --text-light: #666;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 排版 */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.text-center {
    text-align: center;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* 导航栏 */
.header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主横幅 */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero .description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.download-stats {
    display: flex;
    gap: 2rem;
    color: var(--text-light);
}

.download-stats strong {
    color: var(--primary-color);
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* 功能区域 */
.features {
    padding: 4rem 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-icon img {
    width: 30px;
    height: 30px;
}

/* 下载引导 */
.download-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.download-cta h2 {
    color: white;
}

.download-cta p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 80px;
    background-color: white;
    color: var(--dark-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.download-btn span {
    font-weight: bold;
    font-size: 1rem;
}

.download-btn small {
    font-size: 0.8rem;
    opacity: 0.7;
}

.download-btn.apple {
    background-color: #000;
    color: white;
}

.download-btn.android {
    background-color: #3ddc84;
    color: #000;
}

.download-btn.chrome {
    background-color: #4285f4;
    color: white;
}

.download-btn.windows {
    background-color: #0078d7;
    color: white;
}

.download-tip {
    margin-top: 2rem;
    font-size: 0.9rem;
}

.download-tip a {
    color: white;
    text-decoration: underline;
}

/* 新闻卡片增强样式 - 更新版 */
.news-preview {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.news-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 新闻图片区域 - 尺寸优化 */
.news-image {
    position: relative;
    height: 200px; /* 固定高度 */
    overflow: hidden;
    background-color: #f5f7fa; /* 加载时背景色 */
}

.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例，裁剪多余部分 */
    object-position: center; /* 图片居中显示 */
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

/* 图片加载时的占位符 */
.news-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 新闻标签 */
.news-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* 新闻内容区域 */
.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.news-content h3 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-content p {
    color: var(--text-color);
    margin-bottom: 1.2rem;
    line-height: 1.5;
    flex-grow: 1;
}

.news-read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: auto;
}

.news-read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* 响应式设计 - 不同屏幕尺寸的图片高度 */
@media (max-width: 1200px) {
    .news-image {
        height: 180px;
    }
}

@media (max-width: 992px) {
    .news-image {
        height: 160px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-image {
        height: 200px; /* 移动端保持较大高度 */
    }
    
    .news-content {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .news-image {
        height: 180px;
    }
    
    .news-content h3 {
        font-size: 1.2rem;
    }
}

/* 图片宽高比控制 - 可选方案 */
/* 如果需要保持特定宽高比，可以使用以下代码 */
.news-image.aspect-ratio {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    position: relative;
}

.news-image.aspect-ratio .image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 图片加载优化 */
.news-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-image img.loaded {
    opacity: 1;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .download-stats {
        justify-content: center;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn {
        width: 100%;
        max-width: 250px;
    }
}