/*
 * Sogou输入法官网样式表
 * 版本: 1.0.0
 * 更新日期: 2026-04-09
 */

/* ========== CSS变量定义 ========== */
:root {
    --primary-color: #ff6600;
    --primary-hover: #e55a00;
    --secondary-color: #2c3e50;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #2c3e50;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========== 容器布局 ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== 顶部导航 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

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

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 1.0625rem;
    font-weight: 450;
    color: var(--text-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 102, 0, 0.08);
}

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

.nav-link i {
    margin-right: 6px;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ========== Hero区域 ========== */
.hero {
    background: linear-gradient(135deg, #fff5eb 0%, #ffffff 50%, #ebf5ff 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 102, 0, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ========== 功能特性卡片 ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-color);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(255, 102, 0, 0.05));
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.feature-icon i {
    font-size: 28px;
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========== 下载区域 ========== */
.download-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 100%);
    color: #ffffff;
}

.download-section .section-title {
    color: #ffffff;
}

.download-section .section-desc {
    color: rgba(255, 255, 255, 0.7);
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.download-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: var(--transition);
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.download-card-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto 24px;
}

.download-card-icon i {
    font-size: 32px;
    color: #ffffff;
}

.download-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.download-card-version {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.download-card .btn-primary {
    width: 100%;
}

/* ========== 用户评价 ========== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.testimonial-content {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--secondary-color);
}

.author-title {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.testimonial-rating {
    color: #ffc107;
}

/* ========== FAQ手风琴 ========== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--secondary-color);
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 24px 20px;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ========== 页脚 ========== */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    padding: 16px 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-list li::after {
    content: '/';
    color: var(--text-muted);
}

.breadcrumb-list li:last-child::after {
    display: none;
}

.breadcrumb-list a {
    color: var(--text-muted);
}

.breadcrumb-list a:hover {
    color: var(--primary-color);
}

.breadcrumb-list .current {
    color: var(--text-color);
}

/* ========== 内容页样式 ========== */
.page-header {
    background: linear-gradient(135deg, #fff5eb 0%, #ffffff 100%);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.page-desc {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.content-section {
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.content-main {
    background: var(--bg-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.content-sidebar {
    position: sticky;
    top: 92px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

/* ========== 表格样式 ========== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--secondary-color);
}

tr:hover {
    background: var(--bg-light);
}

/* ========== 移动端菜单 ========== */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid,
    .download-cards,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 40px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        text-align: center;
    }

    .features-grid,
    .download-cards,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        position: static;
    }

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .feature-card,
    .download-card {
        padding: 24px;
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }

.hidden { display: none; }
.visible { display: block; }

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ========== 加载指示器 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 帮助页面样式 ========== */
.help-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.help-category {
    background: var(--bg-color);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.help-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.help-category i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.help-category h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.help-category p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .help-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .help-categories {
        grid-template-columns: 1fr;
    }
}

/* ========== 关于页面样式 ========== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-year {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .about-intro {
        grid-template-columns: 1fr;
    }
}

/* ========== 下载页面详情 ========== */
.download-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 100%);
    color: #ffffff;
    padding: 80px 0;
}

.download-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.download-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.download-hero-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    line-height: 1.8;
}

.download-meta {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.download-meta-item {
    text-align: left;
}

.download-meta-item span {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.download-meta-item strong {
    font-size: 1rem;
    color: #ffffff;
}

@media (max-width: 768px) {
    .download-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}
