/* ===========================================================================
   WU LAB 全局样式表 - 所有页面共用
   ===========================================================================
   修改指南：
   - :root 变量：改全局颜色
   - body：改全局字体/背景
   - .terminal：改终端窗口外观
   - .menu-grid：改菜单排列
   - .content-page：改子页面大方框
   - .back-link：改返回按钮样式
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Orbitron:wght@400;700&display=swap');

/* ---- 颜色变量 ---- */
:root {
    --primary-color: #00ff41;
    --primary-dark: #008f11;
    --primary-light: #00ff9d;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-color: #e0e0e0;
    --glow-color: rgba(0, 255, 65, 0.3);
    --glow-strong: rgba(0, 255, 65, 0.6);
}

/* ---- 全局重置 ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- 绿色滚动条 ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #00cc38; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #00ff41; }

/* ---- 页面淡入 ---- */
html { background: #050505; }
/* 页面淡入动画已禁用，保证切换流畅 */

/* ---- Body 基础 ---- */
body {
    background-color: var(--bg-darker);
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 粒子背景 */
/* ---- 背景粒子（已禁用） ---- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 扫描线效果 */
/* ---- 扫描线效果（已禁用） ---- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.1;
    animation: scan 8s linear infinite;
}

@keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* ---- 主容器 ---- */
.container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Logo 样式 */
/* ---- Logo 标题 ---- */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--glow-color);
    position: relative;
    display: inline-block;
}

/* ---- Glitch 故障动画 ---- */
.logo.glitch {
    animation: glitch 3s infinite;
}

.logo.glitch::before,
.logo.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.logo.glitch::before {
    animation: glitch-top 1s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.logo.glitch::after {
    animation: glitch-bottom 1.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch {
    2%, 64% { transform: translate(2px, 0) skew(0deg); }
    4%, 60% { transform: translate(-2px, 0) skew(0deg); }
    62% { transform: translate(0, 0) skew(5deg); }
}

@keyframes glitch-top {
    2%, 64% { transform: translate(2px, -2px); }
    4%, 60% { transform: translate(-2px, 2px); }
    62% { transform: translate(13px, -1px) skew(-13deg); }
}

@keyframes glitch-bottom {
    2%, 64% { transform: translate(-2px, 0); }
    4%, 60% { transform: translate(-2px, 0); }
    62% { transform: translate(-22px, 5px) skew(21deg); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-dark);
    letter-spacing: 2px;
    animation: fadeIn 1s ease-out 0.5s both;
}

/* 终端样式 */
/* ---- 终端窗口 ---- */
.terminal {
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px var(--glow-color);
    animation: slideUp 0.8s ease-out;
    margin-bottom: 2rem;
}

.terminal-header {
    background: linear-gradient(90deg, #111, #222);
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.red { background: #ff5f57; }
.control.yellow { background: #ffbd2e; }
.control.green { background: #28ca42; }

.terminal-title {
    color: var(--primary-color);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.terminal-/* ---- Body 基础 ---- */
body {
    padding: 2rem;
    min-height: 300px;
}

.output-line {
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0;
    animation: typeLine 0.5s ease-out forwards;
}

.output-line:nth-child(1) { animation-delay: 0.5s; }
.output-line:nth-child(2) { animation-delay: 1s; }
.output-line:nth-child(3) { animation-delay: 1.5s; }

/* 菜单网格 */
/* ---- 菜单网格 ---- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 2s forwards;
}

.menu-item {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-item:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--glow-color);
}

.menu-number {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 40px;
}

.menu-text {
    color: var(--text-color);
    font-size: 1.1rem;
    flex: 1;
}

/* 输入行 */
/* ---- 输入行 ---- */
.input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 2.5s forwards;
}

.prompt {
    color: var(--primary-color);
    font-size: 1.1rem;
    white-space: nowrap;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    outline: none;
    caret-color: var(--primary-color);
}

.command-input:focus {
    outline: none;
}

.cursor {
    width: 8px;
    height: 1.2em;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

/* 页脚 */
/* ---- 页脚 ---- */
.footer {
    text-align: center;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 3s forwards;
}

.status-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.status-item {
    color: var(--primary-dark);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-item i {
    color: var(--primary-color);
}

.copyright {
    color: #666;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* 内容页面样式 */
/* ---- 内容页面通用 ---- */
.content-page {
    width: 100%;
    max-width: 900px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 0 20px var(--glow-color);
    animation: slideUp 0.8s ease-out;
}

.page-title {
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.page-content {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.page-content p {
    margin-bottom: 1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ---- 卡片 ---- */
.content-card {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 6px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.content-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-5px);
}

.card-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---- 返回按钮 ---- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* 动画 */
/* ---- 动画关键帧 ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes typeLine {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 响应式设计 */
/* ---- 响应式：平板 ---- */
@media (max-width: 768px) {
    /* ---- 主容器 ---- */
.container {
        padding: 1rem;
    }
    
    .logo {
        font-size: 3rem;
    }
    
    .terminal-/* ---- Body 基础 ---- */
body {
        padding: 1rem;
    }
    
    /* ---- 菜单网格 ---- */
.menu-grid {
        grid-template-columns: 1fr;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* ---- 响应式：手机 ---- */
@media (max-width: 480px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .output-line, .command-input, .prompt {
        font-size: 1rem;
    }
}

/* 在 style.css 中添加以下代码，或者在 index.html 的 <style> 标签中添加 */

/* 背景图片容器 */
/* ---- 旧版背景系统（已废弃） ---- */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* 背景图片 */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('main.jpg'); /* 替换为你的图片文件名 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.3) blur(2px); /* 使背景变暗并轻微模糊，确保文字可读 */
    opacity: 0.7;
    transition: filter 0.5s ease, opacity 0.5s ease;
}

/* 背景图片悬停效果 */
.background-container:hover .background-image {
    filter: brightness(0.4) blur(1px);
    opacity: 0.8;
}

/* 背景覆盖层 */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    mix-blend-mode: multiply;
}

/* 网格效果 */
.background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
    pointer-events: none;
}

/* 调整现有容器位置，确保在背景之上 */
/* ---- 主容器 ---- */
.container {
    position: relative;
    z-index: 3;
}

/* === 修复z-index层级问题 === */

/* 确保背景在正确层级 */
/* ---- Z-index 层级修复 ---- */
.bg-system {
    z-index: 0 !important; /* 最底层 */
}

/* 调整粒子和扫描线层级 */
/* ---- 背景粒子（已禁用） ---- */
#particles-js {
    z-index: 1 !important; /* 高于背景，低于内容 */
}

/* ---- 扫描线效果（已禁用） ---- */
.scanlines {
    z-index: 2 !important; /* 高于粒子，低于内容 */
}

/* 确保主内容在最顶层 */
.main-wrapper {
    z-index: 10 !important;
}

/* ---- 主容器 ---- */
.container {
    z-index: 10 !important;
}