/* ============================================================ */
/* == V V V V        颜色变量中央控制室        V V V V == */
/* ============================================================ */
:root {
  /* -- Accent Colors -- */
  --primary-accent: #4D9FFF;
  --primary-accent-rgb: 77, 159, 255;
  --secondary-accent: #fd842e; /* SaddleBrown */
  --danger-accent: #EF4444;
  --warning-accent: #F59E0B;

  /* -- Background Colors -- */
  --bg-primary: #0A192F;
  --bg-darker: #020C1B;
  --bg-card: #112240;
  --bg-card-rgb: 17, 34, 64;
  --bg-article-card: #172A45;
  --bg-code: #233554;

  /* -- Text Colors -- */
  --text-primary: #CCD6F6;
  --text-bright: #E6F1FF;
  --text-secondary: #8892B0;
  --text-muted: #A8B2D1;
  --text-dark-muted: #64748B;
  --text-white: #ffffff;
  --text-on-accent: #0A192F;

  /* -- Border & Divider Colors -- */
  --border-primary: #233554;
  --border-secondary: #303C55;
  --border-tertiary: #64748B;
  --divider-color: #112240;

  /* -- Fonts -- */
  /* 机械感/终端字体：用于标题、元数据、仪表盘 */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  /* 阅读字体：衬线体，用于正文 */
  --font-serif: 'Noto Serif SC', 'Times New Roman', serif;
  /* 备用无衬线 */
  --font-sans: 'Inter', 'Noto Sans SC', sans-serif;

}
/* ============================================================ */
/* == ^ ^ ^ ^        颜色变量定义结束          ^ ^ ^ ^ == */
/* ============================================================ */

/* 2. 全局字体调整 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    /* 默认使用衬线体，增加字间距提升呼吸感 */
    font-family: var(--font-serif);
    letter-spacing: 0.03em; 
    line-height: 1.8;
}

/* 3. 针对特定元素强制使用等宽字体 (Monospace) */
h1, h2, h3, h4, h5, h6,
.hero-title,
.depth-text, .depth-text-left,
.elevator-button,
.panel-header,
#clock-display,
.article-meta,
.date, .size,
.border-text,
.nav-link,
.back-link,
.footer-card {
    font-family: var(--font-mono) !important;
    letter-spacing: -0.02em; /* 等宽字体通常比较宽，稍微收紧一点 */
}


/* --- 核心布局逻辑 --- */

/* 确保 html 和 body 能够支撑全屏高度 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    /* 启用平滑滚动行为 */
    scroll-behavior: smooth;
}

/* 模块一：Hero Section 布局 */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    position: relative;
    padding-left: 50px;
    padding-right: 50px;
    background: linear-gradient(to bottom, var(--secondary-accent), transparent);
}

/* 模块二：文章列表区的间距 */
#main-content {
    padding: 80px 20px;
    max-width: 700px;
    margin: 0 auto;
}


/* --- 视觉样式整合 (采纳你的暗色主题) --- */

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
}

/* Hero 区域内的文本样式 */
.hero-title {
    font-size: 5rem;
    font-weight: normal;
    margin: 0;
    letter-spacing: 2px;
    text-align: center;
}

.hero-subtitle-center {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 20px;
    line-height: 1.8;
    text-align: center;
}

/* 向下滚动箭头样式 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.scroll-down-arrow {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: var(--border-secondary);
    text-decoration: none;
    animation: bounce 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.scroll-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 2px;
}

.arrow-container {
    display: flex;
    align-items: center;
    position: relative;
}

.arrow-symbol {
    font-size: 42rem;
}

.side-text {
    position: absolute;
    left: 60%;
    margin-left: 0px;
    font-size: 5rem;
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.scroll-down-arrow:hover {
    color: var(--text-primary);
}

/* 国境线样式的边界线 */
.border-line {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        to right,
        var(--border-tertiary) 0px,
        var(--border-tertiary) 15px,
        transparent 15px,
        transparent 25px
    );
    border-top: 1px dashed var(--border-tertiary);
}

.border-text {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-primary);
    padding: 0 15px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* 边界线上方文字 - OUTSIDE */
.outside-text {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    color: var(--danger-accent);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255, 107, 107, 0.3);
}

/* 边界线下方文字 - INSIDE */
.inside-text {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    color: var(--primary-accent);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(var(--primary-accent-rgb), 0.3);
}

/* --- 深度指示器 (核心修改区域) --- */
.depth-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.depth-line {
    width: 60px;
    height: 3px;
    background: repeating-linear-gradient(
        to right,
        var(--border-tertiary) 0px,
        var(--border-tertiary) 8px,
        transparent 8px,
        transparent 12px
    );
    border-top: 1px solid var(--border-tertiary);
    border-bottom: 1px solid var(--border-tertiary);
    margin-right: 10px;
    opacity: 0.8;
}

.depth-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 1px;
    background-color: rgba(26, 26, 26, 0.9);
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid var(--border-tertiary);
    min-width: 40px;
    text-align: center;
    font-weight: bold;
}

/* --- 左侧深度指示器 --- */
.depth-indicator-left {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.depth-line-left {
    width: 60px;
    height: 3px;
    background: repeating-linear-gradient(
        to left,
        var(--border-tertiary) 0px,
        var(--border-tertiary) 8px,
        transparent 8px,
        transparent 12px
    );
    border-top: 1px solid var(--border-tertiary);
    border-bottom: 1px solid var(--border-tertiary);
    margin-left: 10px;
    opacity: 0.8;
    transform: rotate(180deg);
}

.depth-text-left {
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 1px;
    background-color: rgba(26, 26, 26, 0.9);
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid var(--border-tertiary);
    min-width: 40px;
    text-align: center;
    font-weight: bold;
}

/* 子页面链接样式 - 以边境线为参照 */
.nav-link-container {
    position: absolute;
    top: calc(100vh - 5px + 100px);
    left: 50px;
    z-index: 100;
}

.nav-link-2 { top: calc(100vh - 5px + 140px); }
.nav-link-3 { top: calc(100vh - 5px + 180px); }
.nav-link-4 { top: calc(100vh - 5px + 220px); }
.nav-link-5 { top: calc(100vh - 5px + 260px); }
.nav-link-6 { top: calc(100vh - 5px + 300px); }
.nav-link-7 { top: calc(100vh - 5px + 340px); }
.nav-link-8 { top: calc(100vh - 5px + 500px); }

.nav-link {
    position: relative;
    display: inline-block;
    background-color: var(--bg-primary);
    padding: 0 15px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-family: 'Times New Roman', 'Noto Sans SC', serif;
    letter-spacing: 1px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-accent);
}

.nav-border-line {
    position: absolute;
    top: 50%;
    left: -10px;
    right: -50px;
    height: 5px;
    background: repeating-linear-gradient(
        to right,
        var(--border-tertiary) 0px,
        var(--border-tertiary) 15px,
        transparent 15px,
        transparent 25px
    );
    border-top: 1px dashed var(--border-tertiary);
    z-index: -1;
}

/* 文章列表部分的样式 (之前 index_updater.py 生成) */
#main-content article {
    border-bottom: 1px solid var(--divider-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

#main-content h2 {
    margin-bottom: 0.5rem;
}

#main-content h2 a {
    color: var(--text-bright);
    text-decoration: none;
    font-size: 1.5rem;
}

#main-content h2 a:hover {
    color: var(--secondary-accent);
}

#main-content .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#main-content .summary {
    color: var(--text-primary);
    line-height: 1.7;
}

/* --- 地下室环境效果整合 --- */

:root {
    --cursor-x: 50vw;
    --cursor-y: 50vh;
}

body.homepage-effect {
    background: radial-gradient(
        circle at var(--cursor-x) var(--cursor-y),
        rgba(55, 55, 55, 0.8) 0%,
        rgba(13, 13, 13, 0) 10px,
        var(--bg-darker) 10px
    );
    background-repeat: no-repeat;
    background-attachment: fixed;
    cursor: none;
}

body.homepage-effect::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    background-size: 100% 2px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.6;
    animation: noise 0.5s infinite linear;
}

@keyframes noise {
    0% { transform: translateY(0); }
    25% { transform: translateY(-1px); }
    50% { transform: translateY(1px); }
    75% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

.homepage-effect .cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--primary-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary-accent);
    transition: transform 0.1s ease-out;
}

.homepage-effect,
.homepage-effect a,
.homepage-effect button,
.homepage-effect .page-card,
.homepage-effect .elevator-button {
    cursor: none;
}

.nav-link:hover {
    animation: flicker 0.15s infinite steps(1);
}

@keyframes flicker {
    0% { opacity: 1; text-shadow: 0 0 5px var(--primary-accent); }
    25% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: none; }
    75% { opacity: 0.6; }
    100% { opacity: 1; text-shadow: 0 0 5px var(--primary-accent); }
}

.main-content-grid {
    display: flex;
    padding: 80px 50px;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box; 
    min-height: 100vh;
}

.left-column {
    flex: 2; 
    display: flex;
    flex-direction: column;
}

.page-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; 
}

.announcement-panel {
    margin-top: 30px; 
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 25px;
    color: var(--text-primary);
}

.announcement-panel h3 {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 15px;
}

.announcement-panel p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 1em 0;
}

.announcement-panel p:last-child {
    margin-bottom: 0;
}

.page-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;
}

.page-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 5px 15px rgba(var(--primary-accent-rgb), 0.2);
}

.page-card .card-content {
    padding: 20px;
}

.page-card h2 {
    font-size: 1.4rem;
    color: var(--text-bright);
    margin: 0 0 10px 0;
}

.page-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.right-panel {
    flex: 1; 
    padding-left: 50px;
}

.right-panel .panel-content {
    border-left: 2px solid var(--border-primary);
    padding-left: 30px;
    height: 100%;
    font-family: 'Courier New', monospace;
}

.right-panel h3 {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.right-panel p {
    color: var(--text-dark-muted);
    font-size: 1rem;
}

#sector-1-content-anchor,.sector-content-anchor {
    position: absolute;
    box-sizing: border-box;
}

.article-cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px; /* Adjusted from 20px in previous turn */
}

@media (hover: none) {
    body.homepage-effect {
        background: var(--bg-darker) !important;
        cursor: auto !important;
    }
    
    body.homepage-effect::after,
    .homepage-effect .cursor-dot {
        display: none !important;
    }
}

@media (hover: hover) {
    body.homepage-effect {
        cursor: none;
    }
    
    .homepage-effect .cursor-dot {
        display: block;
    }
}

.footer-container {
    width: 100%;
    padding: 100px 50px 50px 50px;
    box-sizing: border-box;
}

.footer-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: var(--text-dark-muted);
    font-size: 0.9rem;
}

.footer-card p {
    margin: 10px 0;
    letter-spacing: 1px;
}

.footer-card .tech-credits {
    color: var(--text-secondary);
}

.footer-card .motto {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 20px;
    margin-bottom: 20px;
}

.footer-card .build-info {
    color: var(--border-secondary);
    font-size: 0.8rem;
}

/* --- V V V V  新增：电梯门动画样式  V V V V --- */
#elevator-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none; /* 默认不阻挡点击 */
    display: flex;
    justify-content: space-between;
}

.elevator-door {
    width: 50%;
    height: 100%;
    background-color: #0a0a0a; /* 深色金属质感 */
    position: relative;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1); /* 模拟重型机械的缓动 */
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    background-image: 
        linear-gradient(90deg, transparent 95%, rgba(255,255,255,0.02) 95%),
        linear-gradient(0deg, transparent 95%, rgba(255,255,255,0.02) 95%);
    background-size: 20px 20px;
}

/* 左门初始状态：移出屏幕左侧 */
.elevator-door-left {
    transform: translateX(-102%);
    border-right: 2px solid #333;
}

/* 右门初始状态：移出屏幕右侧 */
.elevator-door-right {
    transform: translateX(102%);
    border-left: 2px solid #333;
}

/* 激活状态：门关上 */
body.elevator-active #elevator-overlay {
    pointer-events: all; /* 关门时禁止操作其他元素 */
}

body.elevator-active .elevator-door-left {
    transform: translateX(0);
}

body.elevator-active .elevator-door-right {
    transform: translateX(0);
}

/* --- V V V V  横向分裂式电梯门文字效果 (修改版)  V V V V --- */

.elevator-door {
    position: relative;
    overflow: hidden; /* 裁切掉超出部分 */
}

/* 1. 定义文字的通用样式 */
.elevator-door::after {
    content: "JioooBasement";
    
    position: absolute;
    top: 50%; /* 垂直居中 */
    
    /* 字体样式 */
    font-family: var(--font-mono);
    font-weight: 900;
    /* 改用 vw (视口宽度) 单位，确保横向放得下 */
    font-size: 8vw;       
    letter-spacing: 1vw;  /* 间距也用相对单位 */
    white-space: nowrap;
    
    /* 颜色：深色背景上的浅印花 */
    color: rgba(255, 255, 255, 0.06); 
    
    /* 细节 */
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

/* 2. 左门的文字设置 */
.elevator-door-left::after {
    /* 锚点定在右侧（也就是门的接缝处） */
    right: 0;
    
    /* 
       逻辑：
       1. right: 0 -> 元素的右边缘贴在门的右边缘。
       2. translate(50%, -50%):
          - X轴 +50%: 向右移动自身宽度的一半。这样元素的【中心点】就正好位于门的右边缘（接缝）上了。
          - Y轴 -50%: 垂直居中修正。
       结果：文字中心对齐接缝，左半部分在门内显示。
    */
    transform: translate(50%, -50%);
}

/* 3. 右门的文字设置 */
.elevator-door-right::after {
    /* 锚点定在左侧（也就是门的接缝处） */
    left: 0;
    
    /* 
       逻辑：
       1. left: 0 -> 元素的左边缘贴在门的左边缘。
       2. translate(-50%, -50%):
          - X轴 -50%: 向左移动自身宽度的一半。这样元素的【中心点】就正好位于门的左边缘（接缝）上了。
          - Y轴 -50%: 垂直居中修正。
       结果：文字中心对齐接缝，右半部分在门内显示。
    */
    transform: translate(-50%, -50%);
}


/* --- 雪花特效样式 --- */
#snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 900; /* 高于背景，但在电梯门(9999)和面板(1001)之下 */
    pointer-events: none; /* 关键：允许鼠标点击穿透 Canvas */
    opacity: 0;
    transition: opacity 1s ease; /* 开关时的淡入淡出效果 */
}

/* 当雪花激活时的状态类 */
body.snow-active #snow-canvas {
    opacity: 1;
}

/* 按钮激活状态样式（可选） */
body.snow-active #snow-toggle {
    border-color: #fff;
    text-shadow: 0 0 5px #fff;
    color: #fff;
} 




