@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;700&display=swap');

:root {
    --primary: #00A2FF;
    --primary-glow: rgba(0, 162, 255, 0.6);
    --bg-dark: #050505;
    --glass-bg: rgba(5, 5, 5, 0.75);
    --glass-border: rgba(0, 162, 255, 0.25);
    --text-main: #f0f0f0;
    --text-muted: #888;
    --alert: #ff003c;
    --accent: #b026ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Fira Code', monospace;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- 背景与全局特效 --- */
#matrix-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; opacity: 0.12; }

/* 针对手机端优化光标体验：手机不支持悬停特效，因此隐藏自定义光标，恢复默认 */
@media (hover: hover) and (pointer: fine) {
    .cursor-dot {
        width: 8px; height: 8px; background: var(--primary); position: fixed; top: 0; left: 0; 
        border-radius: 50%; pointer-events: none; z-index: 10000; transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s, background 0.2s;
    }
    .cursor-outline {
        width: 30px; height: 30px; border: 1px solid var(--primary); position: fixed; top: 0; left: 0; 
        border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: 0.1s ease-out;
    }
}
@media (hover: none) and (pointer: coarse) {
    * { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
}

.vertical-brand {
    position: fixed; left: 20px; bottom: 50px; writing-mode: vertical-rl; text-orientation: mixed;
    color: var(--text-muted); letter-spacing: 5px; font-size: 0.8rem; z-index: 100; opacity: 0.5;
}
.vertical-brand::before { content: ''; position: absolute; top: -60px; left: 50%; width: 1px; height: 50px; background: var(--primary); }

/* --- 导航栏 --- */
nav {
    position: fixed; top: 0; width: 100%; padding: 15px 5vw;
    display: flex; justify-content: space-between; align-items: center; 
    background: var(--glass-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-border); z-index: 1000;
}
.nav-logo { color: var(--primary); line-height: 1; display: flex; margin: 0; z-index: 1001; gap: 10px; align-items: center; font-weight: 700; font-size: 1.2rem; display: block; width: auto; height: auto;}


/* 移动端菜单切换按钮 (默认隐藏) */
.menu-toggle { display: none; color: var(--primary); font-size: 1.5rem; z-index: 1001; cursor: pointer; }

.nav-menu { display: flex; list-style: none; gap: 30px; font-family: 'Fira Code', "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "STXihei", "华文细黑", sans-serif;}
.nav-item { position: relative; padding: 10px 0; }
.nav-item > a { color: var(--text-main); text-decoration: none; font-size: 0.9rem; text-transform: uppercase; transition: 0.3s; }
.nav-item:hover > a { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }

.dropdown {
    position: absolute; top: 100%; left: -20px; background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); border-top: 2px solid var(--primary); min-width: 220px; list-style: none;
    opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: 12px 20px; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; border-bottom: 1px solid #1a1a1a; transition: 0.3s; position: relative; overflow: hidden; }
.dropdown li a::before { content: '>'; position: absolute; left: -15px; color: var(--primary); transition: 0.3s; opacity: 0; }
.dropdown li a:hover { color: var(--primary); padding-left: 30px; background: rgba(0,162,255,0.05); }
.dropdown li a:hover::before { left: 10px; opacity: 1; }

/* --- 页面结构与动画 --- */
section { padding: 120px 10vw 80px 10vw; min-height: 5vh; display: flex; flex-direction: column; justify-content: center;}
.section-header { font-size: clamp(2rem, 4vw, 3rem); color: #fff; margin-bottom: 30px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; font-family: 'Fira Code', "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "STXihei", "华文细黑", sans-serif; }
.section-header::before { content: '0' counter(section-counter); counter-increment: section-counter; font-size: 1.2rem; color: var(--primary); }
body { counter-reset: section-counter; }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Hero 区域 --- */
.hero { position: relative; justify-content: center; align-items: flex-start; margin-top: 50px; }
/* 使用 clamp() 保证字体在极大和极小屏幕上都有完美比例 */
.glitch-title { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 700; line-height: 1.1; margin-bottom: 20px; text-transform: uppercase; word-wrap: break-word; font-family: 'Fira Code', "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "STXihei", "华文细黑", sans-serif; }
.highlight { color: var(--primary); text-shadow: 0 0 20px var(--primary-glow); }
.hero-desc { max-width: 650px; color: var(--text-muted); font-size: clamp(0.9rem, 2vw, 1.1rem); margin-bottom: 10px; font-family: 'Fira Code', "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "STXihei", "华文细黑", sans-serif; }
.ascii-art { position: absolute; right: 5vw; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 10px; line-height: 1.1; white-space: pre; opacity: 0.8; pointer-events: none; }

/* --- 卡片组件 --- */
/* 这里使用了 minmax(280px, 1fr)，如果屏幕小于 280px 就会自动换行，适配手机完美 */
.grid-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.glass-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); padding: 30px; backdrop-filter: blur(10px); transition: all 0.5s; position: relative; overflow: hidden; }
.glass-card::before { content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 0; background: var(--primary); transition: 0.5s; }
.glass-card:hover { transform: translateY(-8px); border-color: var(--glass-border); background: rgba(0, 162, 255, 0.05); }
.glass-card:hover::before { height: 100%; box-shadow: 0 0 15px var(--primary); }
.glass-card h3 { font-size: 1.3rem; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; color: #fff; font-family: 'Fira Code', "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "STXihei", "华文细黑", sans-serif; }
.glass-card h3 span { font-size: 0.8rem; }
.glass-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* 标签与状态 */
.tag-container { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.tech-tag { font-size: 0.75rem; padding: 4px 10px; background: rgba(0,162,255,0.1); border: 1px solid var(--glass-border); color: var(--primary); }
.tech-tag.accent { background: rgba(176, 38, 255, 0.1); border-color: rgba(176, 38, 255, 0.3); color: var(--accent); }
.status-active { font-size: 0.7rem; padding: 4px 8px; background: rgba(0,255,0,0.1); color: #0f0; border: 1px solid #0f0; }
.status-alert { font-size: 0.7rem; padding: 4px 8px; background: rgba(255,0,60,0.1); color: var(--alert); border: 1px solid var(--alert); animation: pulse-alert 2s infinite; }

/* 终端代码块 */
.code-block { background: #090909; border: 1px solid #222; border-left: 3px solid var(--primary); padding: 15px; font-family: 'Fira Code', monospace; font-size: 0.8rem; color: #ccc; margin-top: 20px; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;}

/* 按钮 */
.btn-cyber { display: inline-block; position: relative; padding: 12px 30px; background: transparent; color: var(--primary); font-family: inherit; font-size: 0.9rem; font-weight: bold; border: 1px solid var(--primary); overflow: hidden; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; margin-top: 20px; text-align: center; text-decoration: none;}
.btn-cyber::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: var(--primary); transition: 0.4s; z-index: -1; }
.btn-cyber:hover { color: var(--bg-dark); box-shadow: 0 0 20px var(--primary-glow); }
.btn-cyber:hover::before { left: 0; }

/* 合作伙伴区块 */
.partners { border-top: 1px dashed #333; border-bottom: 1px dashed #333; padding: 40px 0; margin-top: 50px; text-align: center; }
.partner-logo { font-size: 1.5rem; color: #fff; letter-spacing: 2px; }
.partner-logo span { color: var(--primary); }

/* --- Footer --- */
footer { background: #020202; border-top: 1px solid var(--glass-border); padding: 60px 5vw 30px 5vw; position: relative; z-index: 10;font-family: 'Fira Code', "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "STXihei", "华文细黑", sans-serif; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 1.1rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.8; margin-bottom: 10px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: 0.3s; }
.footer-links a:hover { color: var(--primary); padding-left: 10px; }
.footer-bottom { border-top: 1px solid #111; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; color: #555; font-size: 0.8rem; }
.sys-status { display: flex; gap: 15px; flex-wrap: wrap; }
.sys-status span::before { content: '■'; color: var(--primary); margin-right: 5px; font-size: 0.6rem; vertical-align: middle; }


/* ==========================================================================
   📱 移动端与平板核心适配 (Mobile & Tablet Responsiveness)
   ========================================================================== */
@media screen and (max-width: 900px) {
    /* 页面间距缩小，留出更多可视空间 */
    section { padding: 100px 5vw 50px 5vw; }
    
    /* 隐藏对手机来说过于拥挤的装饰元素 */
    .ascii-art, .vertical-brand { display: none; }
    
    /* 导航栏变身 */
    .menu-toggle { display: block; }
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 70vw; max-width: 300px; height: 100vh;
        background: rgba(5, 5, 5, 0.98); border-left: 1px solid var(--glass-border);
        flex-direction: column; justify-content: center; align-items: center; gap: 40px;
        transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1); box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    }
    /* 通过 JS 添加 active 类的滑出效果 */
    .nav-menu.active { right: 0; }
    
    /* 手机端下拉菜单直接展开为列表，避免复杂的悬停操作 */
    .nav-item { width: 100%; text-align: center; }
    .dropdown {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: none; background: transparent; padding-top: 15px;
        display: none; /* 默认隐藏二级菜单，可以用JS做折叠，为了简洁这里直接平铺或者保持隐藏，视需求而定。 这里我们改为缩进显示 */
    }
    .nav-item:hover .dropdown { display: block; } /* 移动端点击时展开 */
    .dropdown li a { border: none; padding: 8px 0; color: #555; }
    
    /* Footer 堆叠 */
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-col { display: flex; flex-direction: column; align-items: center; }
    .footer-bottom { flex-direction: column; text-align: center; justify-content: center; }
    .sys-status { justify-content: center; }
}

/* ==========================================================================
   📢 系统通告跑马灯 (System Broadcast Ticker)
   ========================================================================== */
.sys-ticker {
    width: 100%;
    /* 半透明背景，带一点点品牌色 */
    background: rgba(0, 162, 255, 0.05); 
    /* 上下边框，增强终端感 */
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 10px 0;
    overflow: hidden;
    display: flex;
    white-space: nowrap;
    font-size: 0.85rem;
    letter-spacing: 2px;
    z-index: 900;
    position: relative;
    /* 如果您把它放在 nav 下方，因为 nav 是 fixed 的，这里需要加上 margin-top 避开 nav */
    margin-top: 100px; 
}

/* 移动端适配：缩小字体和间距 */
@media screen and (max-width: 900px) {
    .sys-ticker {
        font-size: 0.75rem;
        margin-top: 100px; /* 移动端 nav 高度可能略小 */
    }
}

.ticker-wrapper {
    display: inline-block;
    white-space: nowrap;
    /* 动画：25秒匀速滚动一次，无限循环 */
    animation: marquee 25s linear infinite;
}

/* 鼠标悬停时暂停动画，方便用户阅读长通告 */
.sys-ticker:hover .ticker-wrapper {
    animation-play-state: paused;
}

/* 无缝滚动动画核心 */
@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.ticker-item {
    margin-right: 50px; /* 每条通告之间的间距 */
    display: inline-block;
}

/* 强调文字的样式 */
.ticker-item strong {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 添加一个闪烁的光标装饰 */
.ticker-item::before {
    content: '>';
    margin-right: 8px;
    color: #0f0; /* 骇客绿 */
    animation: blink-fast 1s infinite;
}

@keyframes blink-fast {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.disabled {
            /* background-color: #ccc; */
            cursor: not-allowed;
            opacity: 0.3;
        pointer-events: none;
        
        }

/* ==========================================================================
   📨 安全通讯表单 (Secure Feedback Form)
   ========================================================================== */
.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 25px; /* 控制各个输入框之间的间距 */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 标签样式：伪装成终端命令行提示符 */
.form-group label {
    color: var(--primary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: 700;
}

/* 输入框和文本域的基础样式 */
.form-group input,
.form-group textarea {
    background: rgba(0, 0, 0, 0.6); /* 深色半透明背景 */
    border: 1px solid #333; /* 极暗的边框 */
    border-left: 3px solid var(--primary); /* 左侧高亮主色调，延续整体Brutalism风格 */
    padding: 15px;
    color: #fff;
    font-family: 'Fira Code', monospace; /* 强制使用全局的等宽极客字体 */
    font-size: 0.95rem;
    outline: none;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 文本域禁止横向拖拽，只能纵向拖拽 */
.form-group textarea {
    resize: vertical;
}

/* 占位符文字颜色（未输入时的文字） */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #444;
    font-style: italic;
}

/* 鼠标点击/聚焦时的炫酷特效：边缘发光 */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 162, 255, 0.05); /* 聚焦时背景微微泛蓝 */
    box-shadow: 0 0 15px rgba(0, 162, 255, 0.2); /* 霓虹光晕 */
}

.form-actions {
    margin-top: 15px;
}

/* 表单提交后的提示信息区域 */
.form-message {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #0f0; /* 成功状态使用黑客绿 */
    letter-spacing: 1px;
}

/* ==========================================
   启动引导屏幕样式 (Boot Screen)
   ========================================== */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark); /* 纯黑背景，完全遮挡后面的网页 */
    z-index: 999999; /* 权限拉满：确保它在所有元素的最上层！ */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out; /* 消失时的淡出动画 */
}

/* 当 JS 判定加载完成时，触发这个类来隐藏它 */
#boot-screen.system-ready {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-container {
    width: 80%;
    max-width: 600px;
}

.boot-terminal {
    font-family: 'Fira Code', monospace;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 20px 0;
    height: 80px; /* 固定高度，防止页面跳动 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* 让新代码从底部顶上来 */
}

.boot-terminal span {
    color: var(--primary);
}

.boot-progress-wrapper {
    flex-grow: 1;
    height: 4px; /* 极细的赛博进度条轨道 */
    background: #111;
    border: 1px solid #333;
    overflow: hidden;
}

.boot-progress-bar {
    height: 100%;
    width: 0%; /* 初始宽度为 0，由 JS 控制增长 */
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.1s linear; /* 进度条平滑增长 */
}

.boot-percentage {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    font-size: 1rem;
    width: 50px;
    text-align: right;
    text-shadow: 0 0 8px var(--primary-glow);
}

.status-indicator {
  width: 12px;
  height: 12px;
  background-color: #2da461;
  border-radius: 50%;
  display: inline-block;
  
  /* 应用呼吸发光动画 */
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(45, 164, 97, 0.7); /* 初始没有光晕 */
  }
  70% {
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(45, 164, 97, 0); /* 光晕扩散并变透明 */
  }
  100% {
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(45, 164, 97, 0); /* 回到初始状态 */
  }
}

.status-indicator-red {
  width: 12px;
  height: 12px;
  background-color: #ff4d4d;
  border-radius: 50%;
  display: inline-block;
  
  /* 应用呼吸发光动画 */
  animation: pulse-glow-red 2s infinite;
}

@keyframes pulse-glow-red {
  0% {
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); /* 初始没有光晕 */
  }
  70% {
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(255, 77, 77, 0); /* 光晕扩散并变透明 */
  }
  100% {
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); /* 回到初始状态 */
  }
}
