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

/* ========== CSS Reset & Base ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #FF5F1F;
    --primary-dark: #E54A0F;
    --primary-light: #FF7A45;
    --secondary-color: #2B3A4D;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #F0F2F5;
    --border-color: #E8E8E8;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --error-color: #FF4D4F;
    --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;
    --radius-xl: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
    list-style: none;
}

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

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ========== Header ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

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

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

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

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 20px;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--text-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 95, 31, 0.08);
}

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

/* Header Download Button */
.header-download {
    margin-left: 20px;
}

.btn-download-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 95, 31, 0.35);
    transition: all var(--transition-fast);
}

.btn-download-header:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 95, 31, 0.45);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ========== Hero Section ========== */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFF 50%, #F0F7FF 100%);
    position: relative;
    overflow: hidden;
}

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

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

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

.hero-badge i {
    font-size: 1rem;
}

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

.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-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

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

.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-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    max-width: 580px;
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 95, 31, 0.35);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 95, 31, 0.45);
}

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

.btn-secondary:hover {
    background: var(--bg-gray);
    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: #fff;
}

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

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* ========== Feature Cards ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    text-align: center;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 95, 31, 0.1), rgba(255, 122, 69, 0.1));
    border-radius: 50%;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

/* ========== Download Section ========== */
.download-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a2634 100%);
    color: #fff;
}

.download-section .section-title h2 {
    color: #fff;
}

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

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

.download-card {
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

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

.download-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 1.75rem;
}

.download-card h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

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

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

/* ========== Skin Gallery ========== */
.skin-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skin-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.skin-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.skin-item img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.skin-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}

.skin-item-overlay h4 {
    color: #fff;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.skin-item-overlay span {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ========== Testimonials ========== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

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

.testimonial-content::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -20px;
    left: -10px;
    font-family: Georgia, serif;
}

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

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.testimonial-info span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

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

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

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

.faq-question i {
    font-size: 1.25rem;
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

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

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn {
    background: #fff;
    color: var(--primary-color);
}

.cta-section .btn:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========== Footer ========== */
.footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand .logo img {
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
}

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

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

.footer-links ul li a:hover {
    color: #fff;
}

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

.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: #fff;
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    padding: 100px 0 20px;
    background: var(--bg-light);
}

.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 ========== */
.page-header {
    padding: 40px 0 60px;
    background: var(--bg-light);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

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

/* ========== Utilities ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

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

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .features-grid,
    .download-cards,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skin-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

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

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

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-inner {
        height: 64px;
    }

    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        padding: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .header-download {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

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

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

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

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

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

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

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .skin-gallery {
        grid-template-columns: 1fr;
    }
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
