/* ================= 基础重置 & 主题变量设定 ================= */
:root {
    --bg-dark: #000000;
    --bg-light-dark: #111111;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #d4af37;
    --transition-smooth: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);

    --border-color: rgba(255, 255, 255, 0.05);
    --box-bg: rgba(255, 255, 255, 0.03);
    --box-bg-hover: rgba(255, 255, 255, 0.1);
    
    --glass-bg: rgba(15, 15, 15, 0.45);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    --hero-overlay-bg: radial-gradient(circle at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    --service-num: rgba(255, 255, 255, 0.1);
    --arrow-bg: rgba(15, 15, 15, 0.6);
    --arrow-border: rgba(255, 255, 255, 0.15);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: #ffffff;
        --bg-light-dark: #f5f5f7;
        --text-main: #111111;
        --text-muted: #666666;

        --border-color: rgba(0, 0, 0, 0.1);
        --box-bg: rgba(0, 0, 0, 0.03);
        --box-bg-hover: rgba(0, 0, 0, 0.08);

        --glass-bg: rgba(255, 255, 255, 0.55);
        --glass-border: rgba(0, 0, 0, 0.06);
        --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

        --hero-overlay-bg: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
        --service-num: rgba(0, 0, 0, 0.08);
        --arrow-bg: rgba(255, 255, 255, 0.7);
        --arrow-border: rgba(0, 0, 0, 0.15);
    }

    /* ===== 浅色模式下右上角导航文字颜色修改 ===== */
    nav a {
        color: #e5e5e5;
    }
    nav a:hover,
    nav a.active {
        color: #ffffff;
    }
}

html {
    background-color: var(--bg-dark);
    scrollbar-width: thin;
    scrollbar-color: #555555 transparent;
}
@media (prefers-color-scheme: light) {
    html { scrollbar-color: #aaaaaa transparent; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    width: 100%;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; outline: none; }

/* ================= 全局自定义滚动条 ================= */
::-webkit-scrollbar { width: 14px; background-color: transparent; }
::-webkit-scrollbar-track { background-color: transparent; }
::-webkit-scrollbar-thumb {
    background-color: rgba(120, 120, 120, 0.6); 
    border-radius: 10px;
    border: 3px solid var(--bg-dark); 
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(160, 160, 160, 0.9); border-width: 2px; }

@media (prefers-color-scheme: light) {
    ::-webkit-scrollbar-thumb { background-color: rgba(150, 150, 150, 0.6); border-color: var(--bg-dark); }
    ::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 100, 100, 0.9); }
}
::-webkit-scrollbar-button { display: none; height: 0; }

/* ================= 动画类 (Scroll Reveal) ================= */
.reveal { opacity: 0; transform: translateY(40px); transition: var(--transition-smooth); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ================= 导航栏 (液态玻璃质感) ================= */
header {
    position: fixed; top: 0; width: 100%; height: 80px; display: flex; justify-content: space-between;
    align-items: center; padding: 0 5%; z-index: 1000; 
    background: transparent; border-bottom: 1px solid transparent; box-shadow: 0 0 0 transparent;
    transition: background 0.8s cubic-bezier(0.25, 1, 0.5, 1), backdrop-filter 0.8s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.8s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.8s cubic-bezier(0.25, 1, 0.5, 1), height 0.8s ease;
}
header.scrolled { height: 70px; background: var(--glass-bg); border-bottom: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); }
.logo { font-size: 22px; font-weight: 300; letter-spacing: 4px; color: #ffffff; transition: color 0.6s ease; }
header.scrolled .logo { color: var(--text-main); }
.logo span { font-weight: 700; }
nav ul { display: flex; gap: 40px; }
nav a { font-size: 13px; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; transition: color 0.3s; position: relative; }
nav a:hover, nav a.active { color: var(--text-main); }

/* ================= 首屏 Hero ================= */
.hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url('https://images.unsplash.com/photo-1485001564903-56e6a54d46ce?auto=format&fit=crop&q=80'); background-size: cover; background-position: center; z-index: 1; transform: scale(1.05); animation: heroZoom 20s linear infinite alternate; }
.hero-bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
@keyframes heroZoom { 0% { transform: scale(1.05); } 100% { transform: scale(1.15); } }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--hero-overlay-bg); z-index: 2; pointer-events: none; transition: background 0.5s ease; }
.hero-content { padding: 0 20px; margin-top: 50px; position: relative; z-index: 3; }
.hero-title-img { width: 100%; max-width: 900px; margin: 0 auto 50px auto; display: block; animation: shrinkTitle 2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }
@keyframes shrinkTitle { 0% { transform: scale(1.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.btn-primary { 
    display: inline-block; padding: 16px 48px; border: 1px solid #ffffff; color: #ffffff; 
    font-size: 12px; letter-spacing: 4px; text-transform: uppercase; transition: all 0.4s ease; background: rgba(255,255,255,0); 
    margin-top: 50px;
}
.btn-primary:hover { background: #ffffff; color: #000000; }

/* ================= 通用区段样式 ================= */
section { padding: 120px 5%; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 36px; font-weight: 300; letter-spacing: 6px; margin-bottom: 15px; }
.section-header p { font-size: 12px; color: var(--text-muted); letter-spacing: 4px; text-transform: uppercase; }

/* ================= 最新作品 ================= */
#works { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-left: 0; padding-right: 0; overflow-x: hidden; }
#works .section-header { padding-left: 5%; padding-right: 5%; }
.works-slider-container { position: relative; width: 100%; margin: 0 auto; overflow: hidden; padding: 20px 0; }

.works-carousel { position: relative; width: 100%; height: 30vw; min-height: 260px; max-height: 525px; } 

.work-item { position: absolute; width: 40%; aspect-ratio: 16 / 9; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0); transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease; border-radius: 0; overflow: hidden; cursor: pointer; will-change: transform, opacity; }
.work-item img { width: 100%; height: 100%; object-fit: cover; }

.work-item.active { transform: translate3d(-50%, -50%, 0); z-index: 3; opacity: 1; }
.work-item.prev { transform: translate3d(calc(-150% - 4vw), -50%, 0); z-index: 2; opacity: 1; }
.work-item.next { transform: translate3d(calc(50% + 4vw), -50%, 0); z-index: 2; opacity: 1; }
.work-item.hidden-left { transform: translate3d(calc(-250% - 8vw), -50%, 0); z-index: 1; opacity: 0; pointer-events: none; }
.work-item.hidden-right { transform: translate3d(calc(150% + 8vw), -50%, 0); z-index: 1; opacity: 0; pointer-events: none; }

.work-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%); opacity: 0; transition: opacity 0.5s ease; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px 30px; }
.work-item.active:hover .work-overlay { opacity: 1; }
.work-category { font-size: 11px; color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; transform: translateY(20px); transition: transform 0.5s ease; }
.work-title { color: #ffffff; font-size: 24px; font-weight: 400; transform: translateY(20px); transition: transform 0.5s ease 0.1s; }
.work-item.active:hover .work-category, .work-item.active:hover .work-title { transform: translateY(0); }

.slider-arrow { position: absolute; top: 50%; width: 48px; height: 48px; background: var(--arrow-bg); border: 1px solid var(--arrow-border); color: var(--text-main); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; z-index: 10; backdrop-filter: blur(8px); transition: background 0.3s, color 0.3s, opacity 0.3s, border-color 0.3s; opacity: 0; visibility: hidden; }
.works-carousel:hover .slider-arrow { opacity: 1; visibility: visible; }
.slider-arrow:hover { background: var(--text-main); color: var(--bg-dark); border-color: var(--text-main); }

.prev-arrow { left: 30%; transform: translate(-50%, -50%); }
.next-arrow { right: 30%; transform: translate(50%, -50%); }

/* ================= 核心业务 ================= */
.bg-light { background-color: var(--bg-light-dark); }
.services-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 60px; }
.service-row { display: flex; align-items: center; gap: 60px; border-bottom: 1px solid var(--border-color); padding-bottom: 60px; transition: border-color 0.5s ease; }
.service-row:last-child { border-bottom: none; padding-bottom: 0; }
.service-number { font-size: 60px; font-weight: 100; color: var(--service-num); line-height: 1; transition: color 0.5s ease; }
.service-text { flex: 1; }
.service-text h3 { font-size: 28px; font-weight: 300; margin-bottom: 20px; letter-spacing: 2px; }
.service-text p { color: var(--text-muted); font-size: 15px; line-height: 1.8; font-weight: 300; max-width: 800px; }

/* ================= 关于团队 ================= */
.team-content { max-width: 1000px; margin: 0 auto; text-align: center; }
.team-desc { font-size: 18px; color: var(--text-muted); line-height: 2; margin-bottom: 60px; font-weight: 300; }
.team-stats { display: flex; justify-content: center; gap: 100px; }
.stat-box h4 { font-size: 48px; font-weight: 200; color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat-box span { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; }

/* ================= 合作单位 ================= */
.clients-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 1000px; margin: 0 auto; }
.client-box { padding: 24px 48px; background: var(--box-bg); border: 1px solid var(--border-color); font-size: 14px; letter-spacing: 3px; color: var(--text-muted); transition: all 0.4s ease; cursor: default; }
.client-box:hover { background: var(--box-bg-hover); color: var(--text-main); transform: translateY(-5px); }

/* ================= 页脚 & 备案信息 ================= */
footer { background-color: var(--bg-light-dark); padding: 100px 5% 40px; border-top: 1px solid var(--border-color); transition: background-color 0.5s ease, border-color 0.5s ease; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 80px; }
.footer-logo { font-size: 24px; font-weight: 300; letter-spacing: 4px; margin-bottom: 20px; display: block; }
.footer-info h5 { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; margin-bottom: 20px; text-transform: uppercase; }
.footer-info p { font-size: 14px; font-weight: 300; margin-bottom: 10px; }

.copyright { 
    text-align: center; font-size: 12px; color: var(--text-muted); letter-spacing: 1px; 
    border-top: 1px solid var(--border-color); padding-top: 40px; transition: border-color 0.5s ease;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px;
}
.copyright a { 
    color: var(--text-muted); transition: color 0.3s ease; 
    display: inline-flex; align-items: center; text-decoration: none; 
}
.copyright a:hover { color: var(--accent); }

/* ================= 视频播放弹窗 ================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); backdrop-filter: blur(20px); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.5s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { width: 80%; max-width: 1200px; aspect-ratio: 16 / 9; background: #000; position: relative; transform: scale(0.9); transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); box-shadow: 0 30px 60px rgba(0,0,0,0.8); }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-content.web-fullscreen { width: 100vw !important; height: 100vh !important; max-width: none !important; transform: scale(1) !important; top: 0; left: 0; position: fixed; z-index: 3000; }
.close-btn { position: absolute; top: -40px; right: 0; color: #fff; font-size: 14px; letter-spacing: 2px; transition: color 0.3s; z-index: 10; }
.close-btn:hover { color: var(--accent); }
.modal-overlay.web-fullscreen-mode .close-btn { top: 20px; right: 20px; z-index: 3010; background: rgba(0,0,0,0.6); padding: 8px 15px; border-radius: 4px; }
.video-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; border: 1px solid rgba(255,255,255,0.1); position: relative; overflow: hidden; }
#customVideo { width: 100%; height: 100%; object-fit: contain; cursor: pointer; position: relative; z-index: 2; display: block; }
#iframeContainer { width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 2; }
#iframeContainer iframe { width: 100%; height: 100%; border: none; display: block; }
.custom-controls-wrapper { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 20px 20px 10px; z-index: 3; opacity: 0; transition: opacity 0.4s; display: flex; flex-direction: column; gap: 10px; }
.video-container:hover .custom-controls-wrapper, .custom-controls-wrapper:hover { opacity: 1; }
.progress-area { width: 100%; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; cursor: pointer; position: relative; transition: height 0.2s; }
.progress-area:hover { height: 8px; }
.progress-filled { width: 0%; height: 100%; background: var(--accent); border-radius: 3px; pointer-events: none; }
.progress-thumb { position: absolute; top: 50%; left: 0%; transform: translate(-50%, -50%); width: 14px; height: 14px; background: #fff; border-radius: 50%; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.progress-area:hover .progress-thumb { opacity: 1; }
.controls-main { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.controls-left, .controls-right { display: flex; align-items: center; gap: 20px; }
.time-display { color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.control-btn { color: #fff; display: flex; align-items: center; justify-content: center; transition: color 0.3s; position: relative; }
.control-btn svg { width: 24px; height: 24px; fill: currentColor; }
.control-btn:hover { color: var(--accent); }
@keyframes bounceIcon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.play-btn:hover svg { animation: bounceIcon 0.4s ease; }
@keyframes shakeX { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.fullscreen-btn:hover svg, .web-full-btn:hover svg { animation: shakeX 0.4s ease; }
.vol-wave-1, .vol-wave-2 { transition: opacity 0.2s; opacity: 0; }
.volume-wrapper:hover .vol-wave-1 { animation: showWave 0.6s 0.1s forwards; }
.volume-wrapper:hover .vol-wave-2 { animation: showWave 0.6s 0.3s forwards; }
@keyframes showWave { 0% { opacity: 0; } 100% { opacity: 1; } }
.speed-wrapper { position: relative; }
.speed-btn-text { color: #fff; font-size: 15px; font-weight: 500; padding: 5px 10px; transition: text-shadow 0.3s; }
.speed-wrapper:hover .speed-btn-text { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.8); }
.speed-menu { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(10px); background: rgba(15, 15, 15, 0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 10px 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(10px); }
.speed-wrapper:hover .speed-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.speed-option { padding: 8px 25px; color: #aaa; font-size: 13px; text-align: center; cursor: pointer; transition: all 0.2s; }
.speed-option:hover { color: #fff; background: rgba(255,255,255,0.1); }
.speed-option.active { color: var(--accent); font-weight: bold; }
.volume-wrapper { position: relative; display: flex; align-items: center; }
.volume-panel { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(10px); background: rgba(15, 15, 15, 0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 12px 0; width: 36px; display: flex; flex-direction: column; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(10px); }
.volume-wrapper:hover .volume-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.vol-text { color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.vol-slider-wrapper { width: 4px; height: 80px; position: relative; margin: 5px 0 10px 0; }
.vol-slider { -webkit-appearance: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg); width: 80px; height: 4px; background: linear-gradient(to right, var(--accent) var(--vol-percent, 100%), rgba(255,255,255,0.2) var(--vol-percent, 100%)); border-radius: 2px; outline: none; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; transition: background 0.2s; }
.vol-slider::-webkit-slider-thumb:hover { background: var(--accent); }

/* 响应式保护 */
@media (max-width: 992px) {
    .hero-title-img { max-width: 90%; }
    .team-stats { flex-direction: column; gap: 40px; }
    .footer-content { grid-template-columns: 1fr; gap: 40px; }
    .service-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    nav ul { display: none; }
    
    .work-item { width: 60%; }
    .work-item.prev { transform: translate3d(calc(-150% - 3vw), -50%, 0); }
    .work-item.next { transform: translate3d(calc(50% + 3vw), -50%, 0); }
    .prev-arrow { left: 20%; }
    .next-arrow { right: 20%; }
}
@media (max-width: 600px) {
    .controls-right { gap: 10px; }
    .work-item { width: 84%; }
    .work-item.prev { transform: translate3d(calc(-150% - 2vw), -50%, 0); }
    .work-item.next { transform: translate3d(calc(50% + 2vw), -50%, 0); }
    .prev-arrow { left: 8%; width: 36px; height: 36px; }
    .next-arrow { right: 8%; width: 36px; height: 36px; }
    
    .copyright { gap: 10px; flex-direction: column; }
}