/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-black: #000000;
    --color-dark: #0a0a0a;
    --color-gray: #1a1a1a;
    --color-light: #ffffff;
    --color-title: #fff7dc;
    --color-title-soft: #f2ead0;
    --color-accent: #c9a227;
    --color-gold: #d4af37;
    --font-primary: 'Helvetica Neue', 'Arial', sans-serif;
    --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-black);
}

body {
    font-family: var(--font-primary);
    background: var(--color-black);
    color: var(--color-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-black);
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}

/* ========== 加载屏 ========== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 200px;
    height: auto;
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo .logo-img {
    width: 100%;
    height: auto;
}

.loader-progress {
    position: absolute;
    bottom: 30%;
    width: 200px;
    height: 2px;
    background: rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-light);
    width: 0;
    transition: width 0.3s ease;
}

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

/* ========== 导航栏 ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    transition: var(--transition-fast);
}

.nav.scrolled {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
    backdrop-filter: blur(10px);
    padding: 20px 60px;
}

.nav-logo {
    width: 80px;
    height: auto;
}

.nav-logo .nav-logo-img {
    width: 100%;
    height: auto;
}

.nav-menu {
    display: flex;
    gap: 50px;
}

.nav-link {
    color: var(--color-light);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

/* 语言切换按钮 */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-accent);
}

.lang-icon {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-light);
    transition: var(--transition-fast);
}

/* ========== Hero 区域 ========== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#heroVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    position: relative;
    opacity: 0;
    transition: opacity 0.45s ease;
}

#heroVideo.is-ready {
    opacity: 1;
}

.hero-poster {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 10;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 30px;
}

.title-line {
    display: block;
    font-size: 0.4em;
    letter-spacing: 10px;
    text-transform: uppercase;
    color: var(--color-title-soft);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.title-main {
    display: block;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #fbdc92 72%, #c9a227);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.72);
    opacity: 0;
    animation: fadeInUp 1s ease 0.7s forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--color-title-soft);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.72);
    opacity: 0;
    animation: fadeInUp 1s ease 0.9s forwards;
}

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

.hero-scroll {
    position: absolute;
    bottom: 50px;
    left: 10%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.hero-scroll span {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

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

/* ========== 区块通用样式 ========== */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    margin: 0;
    overflow: hidden;
    isolation: isolate;
    background: var(--color-black);
}

.section-research {
    --section-bg-image: url('../images/research.webp');
    --section-bg-opacity: 0.54;
}

.section-life {
    --section-bg-image: url('../images/life-bg.webp');
    --section-bg-position: center 64%;
    --section-bg-opacity: 0.48;
}

.section-sports {
    --section-bg-image: url('../images/sports.webp');
    --section-bg-position: center 62%;
    --section-bg-opacity: 0.50;
}

.section-contact {
    --section-bg-image: url('../images/jiaozhi.webp');
    --section-bg-position: center 62%;
    --section-bg-opacity: 0.48;
}

.section-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.section-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-black);
}

.section.visible .bg-image {
    transform: scale(1.18);
}

.section-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.58) 0%,
        rgba(0, 0, 0, 0.38) 48%,
        rgba(0, 0, 0, 0.58) 100%);
}

.bg-gradient {
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.gradient-1 {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.gradient-2 {
    background: linear-gradient(135deg, #0a0505 0%, #2e0a0a 100%);
}

.gradient-3 {
    background: linear-gradient(135deg, #050a0a 0%, #0a2e2e 100%);
}

.gradient-4 {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* 区块背景图片 */
.bg-image {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--section-bg-position, center);
    opacity: var(--section-bg-opacity, 0.5);
    transform: scale(1.14);
    transform-origin: center;
    transition: transform 1.6s ease, opacity 1.2s ease;
}

.section-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 0;
}

.section-header,
.content-text,
.content-visual,
.contact-content {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.section.visible .section-header,
.section.visible .content-text,
.section.visible .content-visual,
.section.visible .contact-content {
    opacity: 1;
    transform: translateY(0);
}

.section.visible .content-text,
.section.visible .contact-content {
    transition-delay: 0.12s;
}

.section.visible .content-visual {
    transition-delay: 0.24s;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 80px;
}

.section-number {
    font-size: 5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    font-family: 'Times New Roman', serif;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--color-title);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.82);
}

.section-line {
    width: 100px;
    height: 1px;
    background: var(--color-accent);
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.section-content.reverse {
    direction: rtl;
}

.section-content.reverse > * {
    direction: ltr;
}

.content-text h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    margin-bottom: 25px;
    letter-spacing: 2px;
    color: var(--color-title);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.78);
}

.content-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 35px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition-fast);
}

.section-link:hover {
    gap: 20px;
}

/* ========== 视觉元素 ========== */
.visual-card {
    position: relative;
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 1.2s ease;
}

.visual-card:hover .card-image img {
    transform: scale(1.06);
}

.card-info {
    margin-top: 20px;
}

.card-info span {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.card-info p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.research-portrait {
    max-width: 420px;
    margin-left: auto;
}

.research-portrait .card-image {
    aspect-ratio: 1;
}

.research-portrait .card-image img {
    filter: contrast(1.08) brightness(1.12);
}

/* ========== 网格布局 ========== */
.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: var(--transition-fast);
}

.grid-item:hover {
    transform: scale(1.02);
}

.life-portrait {
    max-width: 460px;
    margin-right: auto;
}

.life-portrait .card-image {
    aspect-ratio: 1206/1304;
}

/* ========== 统计数据 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.stat-item {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(8px);
    transition: var(--transition-fast);
}

.stat-item:hover {
    background: rgba(0, 0, 0, 0.24);
    border-color: var(--color-accent);
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 500;
    color: #fbdc92;
    margin-bottom: 10px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
    white-space: nowrap;
}

.stat-label.lang-zh {
    letter-spacing: 0.5px;
}

/* ========== 联系区域 ========== */
.section-contact {
    min-height: 100vh;
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 5px;
    color: var(--color-title);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.82);
}

.contact-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-accent);
    transform: translateY(-5px);
}

.contact-link svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.contact-link span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========== 页脚 ========== */
.footer {
    padding: 50px 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    width: 100px;
    height: auto;
}

.footer-logo .footer-logo-img {
    width: 100%;
    height: auto;
    opacity: 0.5;
}

.footer-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .nav {
        padding: 20px 30px;
    }

    .section {
        padding: 100px 5%;
    }

    .section-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .section-content.reverse {
        direction: ltr;
    }

    .visual-grid {
        order: -1;
    }

    .research-portrait,
    .life-portrait {
        margin: 0;
        max-width: none;
    }

    .life-portrait {
        order: -1;
    }
}

@media (max-width: 768px) {
    .lang-toggle {
        margin-right: 15px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: rgba(0, 0, 0, 0.95);
        padding: 20px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 15px 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        left: 5%;
    }

    .hero-scroll {
        left: 5%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-number {
        font-size: 3rem;
    }

    .section-line {
        width: 60px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 80px 5%;
    }

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

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

}

@media (max-width: 768px), (pointer: coarse) {
    #heroVideo {
        display: none;
    }

    .nav,
    .nav.scrolled,
    .stat-item,
    .contact-link {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .loader-logo,
    .hero-title,
    .hero-subtitle,
    .hero-scroll,
    .section,
    .visual-card,
    .grid-item,
    .stat-item,
    .contact-link {
        animation: none !important;
        transition-duration: 0.18s !important;
    }

    .hero-overlay {
        animation: none !important;
    }

    .bg-image,
    .card-image img,
    .grid-item img {
        filter: none !important;
    }

    .visual-card,
    .grid-item,
    .stat-item,
    .contact-link {
        box-shadow: none !important;
        transform: none !important;
    }
}

/* ========== 语言切换 ========== */
/* 默认显示中文，隐藏英文 */
.lang-en {
    display: none;
}

/* 英文模式：显示英文，隐藏中文 */
body[data-lang="en"] .lang-zh {
    display: none;
}

body[data-lang="en"] .lang-en {
    display: inline;
}

body[data-lang="en"] .hero-title .title-line.lang-en,
body[data-lang="en"] .hero-title .title-main.lang-en {
    display: block;
}

/* 特殊处理块级元素 */
body[data-lang="en"] h3.lang-en,
body[data-lang="en"] p.lang-en,
body[data-lang="en"] .stat-label.lang-en {
    display: block;
}

/* 中文模式的块级元素 */
h3.lang-zh,
p.lang-zh,
.stat-label.lang-zh {
    display: block;
}

body[data-lang="en"] h3.lang-zh,
body[data-lang="en"] p.lang-zh,
body[data-lang="en"] .stat-label.lang-zh {
    display: none;
}

/* 语言切换按钮状态 */
body[data-lang="en"] .lang-icon {
    content: "中文";
}
