:root {
    --color-bg: #ffffff;
    --color-bg-secondary: #f4f6f8;
    --color-text: #333333;
    --color-text-light: #333232;
    --color-primary: #030914;
    /* 深科技蓝 */
    --color-accent: #63e7be;
    /* 亮青色 */
    --color-white: #ffffff;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --container-width: 1280px;
    --header-height: 60px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    /* 移除全局 opacity: 0，不再强制全屏等待 */
}

/* 仅针对需要翻译的文字进行淡入平滑处理，防止语言切换时的瞬间闪烁 */
[data-i18n] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.i18n-ready [data-i18n] {
    opacity: 1;
}

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

ul {
    list-style: none;
}

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

/* --- 工具类 --- */
/* --- 内容渐进式加载动效 --- */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

section.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* 首屏 (Hero) 无需等待滚动，直接显示 */
.hero, .support-hero {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 50px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: #46c19b;
}

.btn-outline {
    border: 1px solid var(--color-text);
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-text);
    color: var(--color-white);
}

/* --- 页头 (Desktop First) --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none;
}

.header-bar {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    width: 100%;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    position: relative;
    pointer-events: auto;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

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

.logo-img {
    height: 22px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
}

.nav-desktop {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
}

.nav-links ul {
    display: flex;
    gap: 80px;
    align-items: center;
    margin: 0;
}

.nav-links a {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
}

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

.nav-mobile {
    display: none;
}

.lang-switcher {
    position: relative;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.lang-btn:hover {
    background-color: var(--color-bg-secondary);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    border-radius: 4px;
    margin-top: 10px;
    min-width: 120px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
}

.lang-dropdown.show {
    display: flex;
}

.lang-dropdown a {
    padding: 10px 15px;
    font-size: 14px;
    color: var(--color-text);
    text-align: left;
    display: block;
}

.lang-dropdown a:hover {
    background-color: var(--color-bg-secondary);
    color: var(--color-primary);
}

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

/* --- 页脚 (Desktop First) --- */
.site-footer {
    background-color: #030914;
    color: var(--color-white);
    padding: 0 0 30px 0;
}

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

.footer-logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
    display: inline-block;
    color: var(--color-accent);
}

.footer-brand p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 450px;
    min-width: 260px;
}

.footer-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-icon {
    display: none;
}

.footer-section-content {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
}

.footer-section-content li {
    margin-bottom: 16px;
}

.footer-section-content a {
    color: #94a3b8;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section-content a:hover {
    color: var(--color-accent);
}

.social-icons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
}

.social-icon-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon-link:hover {
    background: rgba(99, 231, 190, 0.2);
}

.social-icon-img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.social-icon-link:hover .social-icon-img {
    filter: invert(82%) sepia(35%) saturate(712%) hue-rotate(102deg) brightness(97%) contrast(93%);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 12px;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

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

.legal-divider {
    color: rgba(255, 255, 255, 0.1);
    display: inline;
}

/* =========================================
   Responsive Breakpoints - 1024px Group
   (小于等于 1024px 需要改变的)
   ========================================= */

@media (max-width: 1024px) {

    /* 1. Header Mobile */
    .mobile-menu-btn {
        display: block;
        z-index: 1002;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        justify-content: center;
    }

    .header-right {
        order: 3;
        flex: 0 0 auto;
    }

    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        pointer-events: auto;
    }

    .nav-mobile.active {
        transform: translateY(var(--header-height));
    }

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

    .nav-mobile ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--color-bg-secondary);
    }

    .nav-mobile a {
        display: block;
        padding: 15px;
    }

    /* 2. Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-section {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 0;
    }

    .footer-section-title {
        margin-bottom: 0;
        cursor: pointer;
        color: var(--color-white);
    }

    .footer-section-content {
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        padding: 0 16px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
    }

    .footer-section.active .footer-section-content {
        max-height: 500px;
        opacity: 1;
        padding: 16px;
        margin-top: 16px;
    }

    .accordion-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        transition: transform 0.4s ease;
        color: var(--color-white);
    }

    .footer-section.active .accordion-icon {
        transform: rotate(45deg);
        color: var(--color-accent);
    }

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

/* =========================================
   Responsive Breakpoints - 768px Group
   (小于等于 768px 需要改变的)
   ========================================= */

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

    .legal-divider {
        display: none;
    }
}

/* --- Cookie Banner & Modal --- */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 850px;
    background: rgba(3, 9, 20, 0.85); /* Deep dark blue */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 32px;
    z-index: 2000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
    opacity: 0;
}

/* Show banner only when i18n is ready and not hidden */
body.i18n-ready .cookie-banner:not(.hide) {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-banner.hide {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
}

.cookie-banner .container {
    padding: 0;
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.cookie-content {
    flex: 1;
}

.cookie-content h4 {
    color: var(--color-accent);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.cookie-content p {
    color: #94a3b8; /* Slate blue */
    font-size: 14px;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

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

.btn-reject {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

.btn-cookie:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 231, 190, 0.3);
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 20px;
        padding: 24px;
    }
    
    .cookie-banner .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        gap: 10px;
    }
    
    .btn-cookie {
        flex: 1;
        padding: 12px;
    }
}