/* style.css */
:root {
    --accent: #00f2ff; /* 赛博青 */
    --accent-secondary: #ff0055; /* 强调红 */
    --text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; color: #fff; font-family: 'Noto Sans SC', sans-serif; overflow: hidden; }

/* --- 1. 布局框架 --- */
.slider-container { position: relative; width: 100vw; height: 100vh; overflow: hidden; }

.slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}
.slide.active { opacity: 1; visibility: visible; z-index: 2; }

/* 媒体层 (背景) */
.media-wrapper { position: absolute; inset: 0; z-index: 0; }
.bg-media { width: 100%; height: 100%; object-fit: cover; }
/* Ken Burns 效果仅用于图片 */
.ken-burns { animation: none; }
@keyframes zoomSlow { 0% {transform: scale(1);} 100% {transform: scale(1.1);} }

.texture-overlay {
    position: absolute; inset: 0; z-index: 10; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

/* 渐变遮罩变体 */
.gradient-mask { position: absolute; inset: 0; }
.bottom-heavy { background: linear-gradient(to top, rgba(0,0,0,0.9), transparent 60%); }
.light { background: rgba(0,0,0,0.2); }
.right-heavy { background: linear-gradient(to left, rgba(0,0,0,0.8), transparent 70%); }

/* 内容层通用 */
.content-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
/* 让卡片/按钮可点击 */
.content-layer > * { pointer-events: auto; }

/* --- 2. 风格变体 (Variants) --- */

/* [Style 1: 沉浸式大标题] */
[data-layout="immersive"] .content-layer {
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 0 2vw 2vw 2vw;
}
/* 修复 Issue 3: 标题过大 -> 改小为 4.5vw */
[data-layout="immersive"] .hero-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 4.5vw; /* 原来是 6vw，现在改小 */
    line-height: 1.2;
    font-weight: 900;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
    transform: translateY(30px); opacity: 0; transition: 0.8s 0.2s;
}

.stroke-text { -webkit-text-stroke: 1px rgba(255,255,255,0.4); color: transparent; display: block; font-size: 0.4em; font-style: italic; letter-spacing: 2px;}
.active .hero-title { transform: translateY(0); opacity: 1; } /* 激活时播放动画 */

/* [Style 2: 悬浮卡片] */
[data-layout="glass-card"] .content-layer {
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: 10vw;
}
.glass-card-box {
    width: 450px; padding: 3rem;
    background: rgba(255,255,255,0.03); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-left: 4px solid var(--accent);
    transform: translateX(50px); opacity: 0; transition: 0.8s 0.2s;
}
.active .glass-card-box { transform: translateX(0); opacity: 1; }

.card-title { font-size: 2.5rem; margin: 1rem 0; font-family: 'Noto Serif SC'; }
.read-btn { 
    display: inline-block; margin-top: 1.5rem; padding: 10px 24px;
    border: 1px solid rgba(255,255,255,0.5); color: #fff; text-decoration: none;
    font-size: 0.8rem; letter-spacing: 2px; transition: 0.3s;
}
.read-btn:hover { background: #fff; color: #000; }

/* [Style 3: 竖排杂志] */
[data-layout="vertical"] .content-layer {
    padding: 4vw;
    /* 关键：底部留出足够空间给控制器，防止重叠 */
    padding-bottom: 150px; 
}
.vertical-title-area {
    position: absolute; top: 15%; left: 10%;
    writing-mode: vertical-rl;
    border-right: 1px solid rgba(255,255,255,0.3); padding-right: 2rem;
    height: 60vh;
    transform: translateY(-30px); opacity: 0; transition: 0.8s 0.2s;
}
.active .vertical-title-area { transform: translateY(0); opacity: 1; }

.vertical-title { font-size: 5rem; letter-spacing: 0.5rem; font-family: 'Noto Serif SC'; }
.vertical-title .sm { font-size: 2rem; vertical-align: middle; }
.bottom-info {
    position: absolute; 
    bottom: 150px; /* 抬高文字位置 */
    right: 5%; text-align: right;
    font-size: 1.2rem; opacity: 0.8;
    z-index: 20;
}

/* --- 3. 控制器 UI (Controls) --- */
.slider-controls {
    position: absolute; bottom: 3rem; right: 4rem; z-index: 20;
    display: flex; align-items: center; gap: 3rem;
    /* 确保容器高度稳定 */
    height: 60px; 
}

/* 进度条 */
.progress-container { display: flex; align-items: center; gap: 10px; font-family: monospace; font-size: 1rem;}
.progress-bar { width: 120px; height: 2px; background: rgba(255,255,255,0.2); position: relative; }
.progress-fill { 
    position: absolute; left: 0; top: 0; height: 100%; background: #fff; 
    width: 0%; transition: width 0.3s; /* JS将动态控制宽度 */
}

/* 箭头按钮 */
.nav-arrows {
    display: flex; gap: 1rem;
}
.control-btn {
    background: rgba(255, 255, 255, 0.1); /* 半透明底 */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff; 
    width: 60px; height: 60px; /* 增大尺寸：40px -> 60px */
    border-radius: 50%;
    cursor: pointer; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; /* 图标也放大 */
}
.control-btn:hover {
    background: #fff; color: #000; border-color: #fff;
    transform: scale(1.1); /* 悬停微放大 */
}
/* 视频控制按钮 */
.video-control-btn {
    /* 关键修复：绝对定位，脱离文档流，不占位置 */
    position: absolute;
    right: 100%; /* 放在整个控制条的左侧 */
    top: 50%;
    transform: translateY(-50%);
    margin-right: 2rem; /* 给一点距离 */
    
    white-space: nowrap; /* 防止文字换行 */
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 10px 20px; border-radius: 30px; 
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    backdrop-filter: blur(10px); transition: 0.3s, opacity 0.5s;
    
    /* 默认可见状态 */
    opacity: 1; pointer-events: auto;
}
.video-control-btn:hover { background: var(--accent); color: #000; }
.video-control-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(20px); /* 稍微位移一下，动效更自然 */
}
/* 顶部导航 */
.floating-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
    padding: 2rem 4rem; display: flex; justify-content: space-between;
}
.brand-logo { font-weight: 900; letter-spacing: 2px; text-shadow: var(--text-shadow); }
.dot { color: var(--accent); }
.menu-link { 
    color: rgba(255,255,255,0.7); text-decoration: none; margin-left: 2rem; 
    font-size: 0.85rem; letter-spacing: 1px; transition: 0.3s; text-shadow: var(--text-shadow);
}
.menu-link:hover { color: #fff; }

/* 修复 Issue 0: 沉浸模式 (UI 淡出效果) */
/* 当容器被加上 .ui-invisible 类时，内容层淡出 */
.content-layer, .floating-nav, .slider-controls {
    transition: opacity 1s ease; /* 缓慢消失 */
}

/* 只有在沉浸模式下才变透明 */
body.immersive-mode .content-layer,
body.immersive-mode .floating-nav,
body.immersive-mode .slider-controls {
    opacity: 0;
    pointer-events: none; /* 防止误触 */
}

/* --- 1. 给 HOME 添加下划线 --- */
.menu-link {
    position: relative; /* 为下划线定位做准备 */
    padding-bottom: 4px;
}

.menu-link.active {
    color: #fff; /* 选中状态颜色加亮 */
}

/* 下划线装饰 */
.menu-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent); /* 使用你定义的赛博青 */
    box-shadow: 0 0 10px var(--accent); /* 增加一点发光感，更有二次元感 */
}

/* 定义一个类似呼吸/漂浮的动画 */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); } /* 轻微上浮 */
}

/* 应用给第二屏的玻璃卡片，且延迟执行，显得更有层次 */
.slide.active .glass-card-box {
    animation: floatY 6s ease-in-out infinite;
    animation-delay: 1s; /* 等入场动画结束后再开始浮动 */
}

/* 应用给第三屏的竖排文字 */
.slide.active .vertical-title-area {
    animation: floatY 8s ease-in-out infinite; /* 时间错开，避免同步 */
}

.menu-link {
    position: relative;
    /* 其他样式保持不变 */
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent); /* 荧光效果 */
    
    /* 核心：默认缩放为0，不仅是隐藏 */
    transform: scaleX(0); 
    transform-origin: right; /* 离开时从左收缩到右 */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 悬停和激活状态 */
.menu-link:hover::after,
.menu-link.active::after {
    transform: scaleX(1);
    transform-origin: left; /* 出现时从左展开到右 */
}

/* 针对第一屏 (Immersive) */
/* 1. 顶部小标签最先出 */
.tag-line { transition-delay: 0.1s; }

/* 2. 主标题随后 */
.hero-title { transition-delay: 0.3s; }

/* 3. 描述文字最后出 */
.hero-desc { transition-delay: 0.5s; }

/* 注意：你需要确保这些元素在 .slide 非 active 状态下都有 opacity: 0 和 transform 偏移 */