/* 全局重置与CSS变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text2: #4a4a6a;
    --accent: #e63946;
    --accent2: #d62828;
    --gradient: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    --glass: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --radius: 20px;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --border: rgba(0, 0, 0, 0.06);
    --footer-bg: #1a1a2e;
    --footer-text: #ccc;
    --transition-speed: 0.3s;
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg: #0d0d1a;
    --card-bg: #1a1a2e;
    --text: #e0e0e0;
    --text2: #a0a0c0;
    --glass: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(20, 20, 40, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --footer-bg: #0a0a14;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background var(--transition-speed), color var(--transition-speed);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-speed), border var(--transition-speed);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    transition: transform 0.2s var(--bounce);
}

.logo:hover {
    transform: scale(1.03);
}

.logo svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text2);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--bounce);
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.search-btn,
.theme-btn,
.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text2);
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 12px;
    transition: background var(--transition-speed), color var(--transition-speed), transform 0.2s;
    line-height: 1;
}

.search-btn:hover,
.theme-btn:hover,
.menu-btn:hover {
    background: var(--glass);
    color: var(--accent);
    transform: scale(1.1);
}

.menu-btn {
    display: none;
}

/* 搜索弹窗 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.search-overlay.active {
    display: flex;
}

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

.search-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 600px;
    animation: slideUp 0.3s var(--bounce);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-box input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.1rem;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border var(--transition-speed);
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box .close-btn {
    display: block;
    margin-top: 16px;
    text-align: right;
    cursor: pointer;
    color: var(--text2);
    font-weight: 500;
    transition: color var(--transition-speed);
    user-select: none;
}

.search-box .close-btn:hover {
    color: var(--accent);
}

/* Banner 区域 */
.banner {
    position: relative;
    margin-top: 70px;
    height: 85vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--gradient);
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
    padding: 0 24px;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    text-align: center;
    color: #fff;
    max-width: 800px;
    transform: translateY(0);
    transition: transform 0.6s ease;
}

.banner-slide.active .banner-content {
    animation: contentIn 0.8s var(--bounce);
}

@keyframes contentIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.banner-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.banner-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.8;
}

.banner-content .btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.4);
    position: relative;
    overflow: hidden;
}

.banner-content .btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.banner-content .btn:hover::before {
    opacity: 1;
}

.banner-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.6);
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background var(--transition-speed), transform 0.3s var(--bounce);
}

.banner-dots span.active {
    background: #fff;
    transform: scale(1.3);
}

.banner-dots span:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* 通用 section */
section {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-title p {
    color: var(--text2);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

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

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

/* 卡片通用样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.4s var(--bounce), box-shadow 0.4s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--bounce);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.card-icon {
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.card p {
    color: var(--text2);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 品牌故事 */
.brand-story .story-image {
    display: flex;
    justify-content: center;
}

.brand-story .story-image svg {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: var(--radius);
}

/* 数字增长 */
.stats {
    background: var(--gradient);
    color: #fff;
    padding: 60px 0;
}

.stats .grid-4 {
    text-align: center;
}

.stats .stat-num {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stats .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* 时间线 */
.timeline {
    position: relative;
    padding: 0 20px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-left: 56px;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    transition: transform 0.3s var(--bounce);
}

.timeline-item:hover::before {
    transform: scale(1.3);
}

.timeline-item .year {
    font-weight: 800;
    color: var(--accent);
    font-size: 1.1rem;
    display: block;
}

.timeline-item p {
    color: var(--text2);
    margin-top: 4px;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 0;
    user-select: none;
    transition: color var(--transition-speed);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question span {
    transition: transform 0.3s var(--bounce);
    font-size: 0.8rem;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    color: var(--text2);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 8px 0 16px;
}

/* 文章卡片 */
.article-card .date {
    font-size: 0.85rem;
    color: var(--text2);
    margin-bottom: 8px;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    transition: color var(--transition-speed);
}

.article-card:hover h3 {
    color: var(--accent);
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text2);
    margin-bottom: 12px;
}

.article-card .read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.3s ease;
}

.article-card .read-more:hover {
    gap: 8px;
    text-decoration: underline;
}

/* 面包屑 */
.breadcrumb {
    background: var(--glass);
    padding: 12px 0;
    margin-top: 70px;
    font-size: 0.9rem;
    color: var(--text2);
}

.breadcrumb a {
    color: var(--text2);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

.breadcrumb span {
    margin: 0 8px;
}

/* 联系 */
.contact-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info svg {
    flex-shrink: 0;
}

/* 地图占位 */
.map-placeholder {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    border: 2px dashed var(--border);
    color: var(--text2);
    transition: border-color var(--transition-speed);
}

.map-placeholder:hover {
    border-color: var(--accent);
}

/* 页脚 */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
}

footer .grid-4 h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

footer .grid-4 h4::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

footer a {
    color: var(--footer-text);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: color var(--transition-speed), transform 0.2s;
    padding: 2px 0;
}

footer a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

footer .copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
}

/* 返回顶部 */
#backToTop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: transform 0.3s var(--bounce), opacity 0.3s ease, box-shadow 0.3s ease;
    line-height: 1;
}

#backToTop:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(230, 57, 70, 0.6);
}

#backToTop:active {
    transform: scale(0.95);
}

/* 滚动动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s var(--bounce);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 文章详情锚点区域（隐藏但可访问） */
[id^="article"] {
    padding-top: 80px;
    margin-top: -80px;
}

[id^="article"] .container {
    padding: 40px 24px;
}

[id^="article"] h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

[id^="article"] p {
    color: var(--text2);
    line-height: 1.8;
}

/* HowTo 样式 */
.animate-on-scroll h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.animate-on-scroll ul,
.animate-on-scroll ol {
    padding-left: 20px;
    margin-bottom: 16px;
    color: var(--text2);
}

.animate-on-scroll li {
    margin-bottom: 8px;
}

/* 合作伙伴卡片特殊样式 */
.card[style*="text-align:center"] {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-content h1 {
        font-size: 2.8rem;
    }

    .banner {
        height: 75vh;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links.open {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .banner {
        height: 70vh;
        min-height: 400px;
    }

    section {
        padding: 56px 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .stats .stat-num {
        font-size: 2rem;
    }

    #backToTop {
        bottom: 24px;
        right: 24px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .timeline {
        padding: 0 16px;
    }

    .timeline-item {
        padding-left: 48px;
    }

    .timeline-item::before {
        left: 8px;
    }

    .timeline::before {
        left: 16px;
    }

    .search-box {
        padding: 24px;
    }

    .brand-story .story-image svg {
        max-width: 100%;
    }

    .card {
        padding: 24px;
    }

    .grid-3 {
        gap: 24px;
    }

    .grid-2 {
        gap: 32px;
    }
}

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

    .banner-content h1 {
        font-size: 1.6rem;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .banner-content .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    .banner {
        min-height: 350px;
        height: 65vh;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo svg {
        width: 32px;
        height: 32px;
    }

    section {
        padding: 40px 0;
    }

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

    .section-title p {
        font-size: 1rem;
    }

    .stats .stat-num {
        font-size: 1.8rem;
    }

    .nav-actions {
        gap: 8px;
    }

    .search-btn,
    .theme-btn,
    .menu-btn {
        font-size: 1rem;
        padding: 6px;
    }
}

/* 打印样式 */
@media print {
    header,
    .banner,
    .search-overlay,
    #backToTop,
    .breadcrumb {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* 减少运动偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}