/*
 * 通用样式表 - 适用于所有页面
 * 包含:基础重置/导航/页脚/按钮/公共组件
 */

/* CSS 变量 */
:root {
    --primary-color: #2c5282;
    --secondary-color: #4299e1;
    --accent-color: #f6ad55;
    --text-color: #2d3748;
    --light-text: #718096;
    --bg-color: #ffffff;
    --light-bg: #f7fafc;
    --dark-bg: #1a202c;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --error-color: #f56565;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 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: var(--transition);
}

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

ul {
    list-style: none;
}

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

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

.section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--light-text);
}

.bg-light {
    background-color: var(--light-bg);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ===== 顶部导航 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    padding: 0 40px;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.logo .company-name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--text-color);
    white-space: nowrap;
}

.main-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 38px;
}

.main-nav a {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 400;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

/* 页头右侧平台入口按钮 */
.platform-entry {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 5px;
    white-space: nowrap;
    transition: var(--transition);
}

.platform-entry:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* ===== 页脚 ===== */
.footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 36px 0 14px;
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin-bottom: 24px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}
.footer-logo {
    display: none;
}

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

.footer-col h4 {
    font-size: 1.15rem;
    margin-bottom: 14px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 7px;
}

.footer-col a {
    color: #cbd5e0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
    padding-left: 5px;
}

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

.footer-bottom p {
    color: #cbd5e0;
}

.footer-bottom-links a {
    color: #cbd5e0;
    margin-left: 20px;
    transition: var(--transition);
}

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

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .header .container {
        position: relative;
    }

    .logo .company-name {
        display: none;
    }

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

    .platform-entry {
        display: none;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: var(--box-shadow);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
    }

    .main-nav.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        margin: 0 0 15px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .footer-content,
    .footer-links {
        flex-direction: column;
    }

    .footer-content {
        gap: 0;
    }

    .footer-col {
        margin-bottom: 30px;
    }

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

    .footer-bottom-links {
        margin-top: 15px;
    }

    .footer-bottom-links a {
        margin: 0 10px;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
}
