/*
Theme Name: 有道翻译下载页主题
Theme URI: https://youdao.com
Author: WordPress SEO技术员
Author URI: https://telegramam.help
Description: 基于有道翻译下载页面设计的WordPress主题，支持博客文章功能，遵循Google SEO最佳实践。
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.2
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: youdao-fanyi
Tags: one-column, custom-logo, translation-ready, seo-optimized
*/

/* === 基础样式 === */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #5f6368;
    --text-color: #202124;
    --bg-color: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #dadce0;
    --hover-color: #1557b0;
    --shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px rgba(60,64,67,0.15);
    --shadow-lg: 0 4px 12px rgba(60,64,67,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hover-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === 导航栏 === */
.site-header {
    background: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.main-nav a {
    color: var(--text-color);
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.main-nav a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.main-nav a.nav-blog {
    background: var(--primary-color);
    color: #fff;
}

/* === Hero区域 === */
.hero-section {
    background: #ffffff;
    padding: 120px 0 80px;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* 平台切换标签 */
.platform-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: #fff;
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.platform-tab img,
.platform-tab svg {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.platform-tab:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.platform-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 48px;
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 32px;
    line-height: 1.6;
}

.download-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--hover-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #fff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* 平台图标 */
.platform-icons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.platform-icons img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* 平台支持长条（S.png） */
.platform-banner {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    width: 100%;
    min-height: 168px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: transparent;
}

/* === 功能展示区域 === */
.feature-section {
    padding: 60px 0;
}

.feature-section:nth-child(even) {
    background: var(--light-bg);
}

.feature-section:nth-child(odd) {
    background: var(--bg-color);
}

.feature-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.feature-wrapper.reverse {
    direction: rtl;
}

.feature-wrapper.reverse > * {
    direction: ltr;
}

.feature-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.feature-content p {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 24px;
}

.feature-content ul {
    list-style: none;
    padding: 0;
}

.feature-content li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.feature-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.feature-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* === 功能卡片网格 === */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 60px 0;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--secondary-color);
}

/* === 截图画廊 === */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 60px 0;
}

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.screenshot-item:hover {
    transform: scale(1.05);
}

.screenshot-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* === Footer === */
.site-footer {
    background: #ffffff;
    color: var(--text-color);
    padding: 48px 0 24px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-logo img {
    height: 32px;
    margin-bottom: 16px;
}

.footer-logo p {
    font-size: 14px;
    color: var(--secondary-color);
}

.footer-links h4 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--secondary-color);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
    padding-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--secondary-color);
}

/* === 博客页面样式 === */
.blog-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 100px 0 60px;
    text-align: center;
}

.blog-header h1 {
    color: #fff;
    font-size: 40px;
    margin-bottom: 16px;
}

.blog-header p {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.blog-list {
    padding: 60px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-thumbnail {
    height: 200px;
    overflow: hidden;
}

.blog-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 20px;
}

.blog-card-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.blog-card-title a {
    color: inherit;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.blog-card-meta {
    font-size: 13px;
    color: var(--secondary-color);
}

.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* === 单篇文章样式 === */
.single-post {
    padding: 60px 0;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.post-meta {
    font-size: 14px;
    color: var(--secondary-color);
    display: flex;
    justify-content: center;
    gap: 24px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-content h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 16px;
}

.post-content h3 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content ul, .post-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.post-content img {
    border-radius: 8px;
    margin: 24px 0;
}

.post-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding-top: 24px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tag {
    background: var(--light-bg);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--secondary-color);
}

/* === SEO相关样式 === */
.schema-hidden {
    display: none;
}

/* === 响应式设计 === */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 36px;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .feature-wrapper {
        grid-template-columns: 1fr;
    }
    
    .feature-wrapper.reverse {
        direction: ltr;
    }
    
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .screenshot-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .platform-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .platform-tab img,
    .platform-tab svg {
        width: 18px;
        height: 18px;
    }
    
    .hero-text h1 {
        font-size: 28px;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .screenshot-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .screenshot-gallery {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}