/* ===== 基础变量定义 ===== */
:root {
    --primary-color: #E53935;
    --primary-hover: #B71C1C;
    --primary-light: #FFEBEE;
    --secondary-color: #E53935;
    --accent-color: #F59E0B;
    --bg-dark: #1F2937;
    --bg-light: #F9FAFB;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* ===== 重置与基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ===== 通用容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部导航 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
    border-radius: 8px;
    font-size: 0;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

.logo-y {
    font-family: Arial, sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    line-height: 1;
    margin-right: -3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.logo-img .dao {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    line-height: 1;
    margin-left: -3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 非hero区域logo文字颜色 */
.header .logo-text {
    color: #1F2937;
    text-shadow: none;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-download-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.nav-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.5);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ===== 主横幅区域 ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

/* 下载横幅 */
.hero-banner {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 30px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.banner-icon {
    font-size: 24px;
}

.banner-title {
    font-size: 18px;
    font-weight: 700;
}

.banner-desc {
    font-size: 14px;
    opacity: 0.9;
}

.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
    color: #fff;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.banner-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 25px rgba(229, 57, 53, 0.5);
}

.banner-btn-icon {
    font-size: 18px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Hero区域大Logo */
.hero-logo-center {
    text-align: center;
    margin-bottom: 20px;
}

.hero-logo-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
    border-radius: 22px;
    font-size: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(229, 57, 53, 0.4);
}

.hero-y {
    font-family: Arial, sans-serif;
    font-weight: 900;
    font-size: 60px;
    color: #fff;
    line-height: 1;
    margin-right: -10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-dao {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    font-weight: 700;
    font-size: 38px;
    color: #fff;
    line-height: 1;
    margin-left: -10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 40px;
}

/* ===== 翻译框 ===== */
.translator-box {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 24px;
    max-width: 900px;
    margin: 0 auto 50px;
}

.translator-header {
    margin-bottom: 20px;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.lang-select {
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 150px;
    transition: var(--transition);
}

.lang-select:hover, .lang-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.swap-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.swap-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: rotate(180deg);
}

.translator-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .translator-body {
        grid-template-columns: 1fr;
    }
}

.input-panel, .output-panel {
    display: flex;
    flex-direction: column;
}

.input-text, .output-text {
    width: 100%;
    height: 180px;
    padding: 16px;
    font-size: 16px;
    line-height: 1.6;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: none;
    transition: var(--transition);
}

.input-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.output-text {
    background: var(--bg-light);
    color: var(--text-dark);
}

.input-actions, .output-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 8px;
}

.char-count {
    font-size: 14px;
    color: var(--text-light);
    margin-right: auto;
}

.action-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-gray);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.action-btn.primary {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

/* ===== 快捷翻译 ===== */
.quick-examples {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.quick-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.quick-btn {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.quick-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ===== 统计区域 ===== */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* ===== 通用标题样式 ===== */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 50px;
}

/* ===== 核心功能区 ===== */
.features {
    padding: 100px 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: #fff;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-list li {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ===== 支持语言区 ===== */
.languages {
    padding: 100px 0;
    background: #fff;
}

.language-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

@media (max-width: 768px) {
    .language-categories {
        grid-template-columns: 1fr;
    }
}

.lang-category {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius-lg);
}

.lang-category h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.lang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lang-tag {
    padding: 8px 16px;
    background: #fff;
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.lang-tag:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ===== 适用场景 ===== */
.scenarios {
    padding: 100px 0;
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
}

.scenarios .section-title,
.scenarios .section-subtitle {
    color: #fff;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .scenarios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .scenarios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.scenario-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
}

.scenario-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.scenario-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.scenario-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.scenario-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}

/* ===== FAQ常见问题 ===== */
.faq {
    padding: 100px 0;
    background: var(--bg-light);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-item[open] .faq-question {
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ===== CTA区域 ===== */
.cta {
    padding: 80px 0;
    background: #fff;
    text-align: center;
}

.cta h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.cta p {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ===== 底部版权 ===== */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.footer-brand p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .translator-box {
        padding: 16px;
        margin: 0 10px 30px;
    }
    
    .lang-select {
        min-width: 120px;
        font-size: 14px;
        padding: 10px 32px 10px 12px;
    }
    
    .stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== 加载动画 ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 打印样式 ===== */
@media print {
    .header, .nav-toggle, .translator-body, .cta-button {
        display: none;
    }
    
    .hero {
        min-height: auto;
        padding: 40px 0;
    }
}