@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700;900&family=Orbitron:wght@900&family=Montserrat:wght@900&display=swap');

:root {
    --primary-cyan: #00f2ff;
    --status-green: #4ade80;
    --bg-dark: #000000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-dark); color: #fff; font-family: 'Noto Sans TC', sans-serif; overflow-x: hidden; scroll-behavior: smooth; }

/* 背景大雪花粒子 */
#particles-js { position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; }

/* 導覽列膠囊 */
.nav-container { position: fixed; top: 25px; left: 50%; transform: translateX(-50%); z-index: 1000; width: 95%; max-width: 1200px; }
.capsule-nav { 
    background: rgba(15, 15, 20, 0.8); backdrop-filter: blur(20px); 
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 100px; 
    padding: 10px 25px; display: flex; justify-content: space-between; align-items: center;
}

.nav-logo-group { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-img { width: 35px; height: 35px; border-radius: 50%; border: 1.5px solid var(--primary-cyan); }
.nav-logo-text { font-family: 'Orbitron', sans-serif; color: var(--primary-cyan); font-size: 15px; letter-spacing: 1px; }

.nav-links-wrapper { display: flex; align-items: center; gap: 5px; }
.nav-link { 
    font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.4); 
    padding: 10px 20px; transition: 0.4s ease; text-decoration: none; 
}
.nav-link.active { color: #fff; background: rgba(255, 255, 255, 0.08); border-radius: 50px; }

/* SYSTEM ONLINE 呼吸燈動畫 */
.status-pill { display: flex; align-items: center; gap: 10px; padding: 7px 18px; border-radius: 100px; border: 1px solid rgba(74, 222, 128, 0.2); background: rgba(74, 222, 128, 0.05); }
.status-dot { width: 8px; height: 8px; background: var(--status-green); border-radius: 50%; position: relative; }
.status-dot::after { 
    content: ''; position: absolute; inset: 0; background: inherit; border-radius: inherit; 
    animation: status-pulse 2s infinite; 
}
@keyframes status-pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(3.5); opacity: 0; } }
.status-pill span { font-size: 10px; font-weight: 900; color: var(--status-green); letter-spacing: 1px; }

/* 科技感大標題 (圖四風格) */
.tech-header-container { width: 100%; display: flex; justify-content: center; margin: 40px 0 60px; }
.tech-header-frame { 
    background: rgba(0, 242, 255, 0.05); border: 1.5px solid rgba(0, 242, 255, 0.3); 
    border-radius: 15px 50px 15px 50px; padding: 15px 80px; position: relative; text-align: center;
}
.tech-header-frame::before { content: ""; position: absolute; top: -2px; left: 30px; width: 40px; height: 4px; background: var(--primary-cyan); box-shadow: 0 0 15px var(--primary-cyan); }
.tech-header-frame::after { content: ""; position: absolute; bottom: -2px; right: 30px; width: 40px; height: 4px; background: var(--primary-cyan); box-shadow: 0 0 15px var(--primary-cyan); }
.tech-header-main { font-size: 28px; font-weight: 900; letter-spacing: 5px; color: #fff; text-transform: uppercase; }
.tech-header-sub { font-size: 11px; font-family: 'Orbitron'; color: var(--primary-cyan); opacity: 0.8; letter-spacing: 3px; margin-top: 5px; }

/* 內容卡片與 16:9 模板 */
.record-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 30px; padding: 40px; margin-bottom: 40px; backdrop-filter: blur(15px); transition: 0.3s; }
.record-card:hover { border-color: rgba(0, 242, 255, 0.2); background: rgba(255, 255, 255, 0.03); }
.record-card-title { color: var(--primary-cyan); font-size: 24px; font-weight: 900; text-align: center; margin-bottom: 15px; }
.record-card-meta { font-size: 12px; color: #666; text-align: center; line-height: 1.8; margin-bottom: 25px; }

.img-16-9 { width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; object-fit: cover; border: 1.5px solid rgba(255, 255, 255, 0.1); }

/* 修正後的網格 */
.record-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 25px; }
@media (min-width: 768px) { .record-grid-2 { grid-template-columns: 1fr 1fr; } }

.tech-btn { display: inline-block; padding: 10px 30px; border-radius: 100px; border: 1px solid rgba(0, 242, 255, 0.3); color: var(--primary-cyan); font-size: 11px; font-weight: 900; text-decoration: none; transition: 0.3s; }
.tech-btn:hover { background: rgba(0, 242, 255, 0.1); box-shadow: 0 0 20px rgba(0, 242, 255, 0.2); transform: translateY(-2px); }

/* 全站頁尾 */
.footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 60px 0; text-align: center; color: rgba(255,255,255,0.2); font-size: 11px; letter-spacing: 2px; font-weight: 700; }

/* 自定義滾動條 (授權視窗用) */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 10px;
}
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-cyan) transparent;
}
#particles-js {
    position: fixed; /* 固定背景，捲動時不會消失 */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* 確保在所有內容下面 */
    background-color: #000000; /* 預設底色 */
}
/* 導覽列膠囊容器 */
.nav-links-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 動態膠囊：確保 z-index 比連結低，才不會擋到點擊 */
.nav-indicator {
    position: absolute;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0; /* 設為 0 */
}

/* 導覽連結：z-index 必須比膠囊高 */
.nav-link {
    position: relative;
    z-index: 1; /* 設為 1 */
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 18px;
    text-decoration: none;
    transition: 0.3s;
}

.nav-link.active {
    color: #fff;
}

/* 讓 SYSTEM ONLINE 也可以點擊 */
.status-pill {
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}
.status-pill:hover {
    border-color: rgba(0, 242, 255, 0.5);
    background: rgba(0, 242, 255, 0.1);
}
/* 讓狀態藥丸變成可點擊連結 */
.status-pill-link {
    display: block;
    transition: transform 0.2s ease;
}

.status-pill-link:hover {
    transform: scale(1.05); /* 鼠標移上去稍微放大 */
}

.status-pill {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 7px 18px; 
    border-radius: 100px; 
    border: 1px solid rgba(74, 222, 128, 0.2); 
    background: rgba(74, 222, 128, 0.05);
    cursor: pointer; /* 關鍵：強制顯示手指符號 */
}

/* 呼吸燈動畫 (確保沒跑掉) */
.status-dot { 
    width: 8px; 
    height: 8px; 
    background: var(--status-green); 
    border-radius: 50%; 
    position: relative; 
}
.status-dot::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: inherit; 
    border-radius: inherit; 
    animation: status-pulse 2s infinite; 
}
/* 手機版選單連結樣式 */
.mobile-nav-link {
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    background: rgba(0, 242, 255, 0.05);
    color: var(--primary-cyan);
    border-color: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

/* 讓 nav-container 在手機版不要被切掉 */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 15px;
    }
    .capsule-nav {
        padding: 8px 15px;
    }
}
/* 手機版連結樣式 */
.mobile-nav-link {
    color: rgba(255, 255, 255, 0.5);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.mobile-nav-link.active, .mobile-nav-link:hover {
    background: rgba(0, 242, 255, 0.1);
    color: #00f2ff;
    padding-left: 25px; /* 移入時有個小位移感 */
}

/* 漢堡旋轉動畫效果 (選配) */
.menu-open .menu-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-line:nth-child(2) { opacity: 0; }
.menu-open .menu-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); width: 24px; }
/* 手機選單按鈕動畫 */
.menu-open .line-t { transform: translateY(4px) rotate(45deg); }
.menu-open .line-b { transform: translateY(-4px) rotate(-45deg); }

/* 手機版選單項目 */
.m-nav-item {
    display: block;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s;
}

.m-nav-item.active, .m-nav-item:hover {
    background: rgba(0, 242, 255, 0.1);
    color: #00f2ff;
    padding-left: 28px;
}

/* 確保導覽列容器不會被內容切掉 */
.nav-container {
    overflow: visible !important;
}
/* 確保選單不會被裁切 */
.nav-container { overflow: visible !important; }

/* 手機版按鈕動畫 */
.menu-open .line-t { transform: translateY(4.5px) rotate(45deg); width: 20px; }
.menu-open .line-b { transform: translateY(-4.5px) rotate(-45deg); width: 20px; }

/* 手機選單項目樣式 */
.m-nav-item {
    display: block;
    padding: 18px 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    border-radius: 14px;
    transition: 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    letter-spacing: 1px;
}

.m-nav-item:hover, .m-nav-item.active {
    background: rgba(0, 242, 255, 0.1);
    color: #00f2ff;
    padding-left: 32px;
}
/* 1. 外層容器：負責整體定位與置中 */
.tech-header-container {
    width: 100%;
    display: flex;
    justify-content: center; /* 確保水平置中 */
    align-items: center;
    margin-bottom: 5rem; /* 對應你的 !mb-20 */
    position: relative;
    z-index: 10;
}

/* 2. 邊框內層：負責根據文字縮放長度 */
.tech-header-frame {
    display: inline-flex; /* 讓寬度等於內容物 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 5rem; /* 增加左右留白，讓兩端亮條更好看 */
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 100px; /* 保持膠囊形狀 */
    background: rgba(0, 242, 255, 0.03);
    backdrop-filter: blur(8px);
    position: relative;
}

/* 3. 確保文字本身不被拉伸 */
.tech-header-main {
    font-size: 2.25rem; /* 36px */
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.1em;
    margin: 0;
}

.tech-header-sub {
    font-size: 0.75rem; /* 12px */
    color: #00f2ff;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.4em;
    margin-top: 0.5rem;
}
/* 1. 強制外層容器撐滿並置中 */
.tech-header-container {
    display: flex !important;
    justify-content: center !important; /* 水平置中 */
    align-items: center !important;
    width: 100% !important;
    margin-top: 50px; /* 根據需要調整與導覽列的距離 */
    margin-bottom: 80px !important; /* 取代 !mb-20 */
    position: relative;
    z-index: 10;
    left: 0;
}

/* 2. 標題框：自動適應文字寬度 */
.tech-header-frame {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 60px; /* 左右留白讓邊框兩端亮條位置正確 */
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 100px;
    background: rgba(0, 242, 255, 0.03);
    backdrop-filter: blur(8px);
    white-space: nowrap; /* 防止文字換行導致框框變形 */
}

/* 3. 修正原本可能干擾的 padding */
.depth-wrapper {
    padding-top: 150px !important; /* 調整整體頂部距離 */
}
/* 強制標題容器水平置中並修正寬度 */
.tech-header-container {
    display: flex !important;
    justify-content: center !important; /* 核心：水平置中 */
    align-items: center !important;
    width: 100% !important; /* 確保佔滿整行 */
    margin: 40px 0 80px 0 !important; /* 調整上下間距 */
    position: relative;
    left: 0;
}

/* 修正框線長度：隨文字長度自動縮放 */
.tech-header-frame {
    display: inline-flex !important; /* 讓寬度等於內容物 */
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 4.5rem !important; /* 左右適度留白讓亮條位置好看 */
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 100px;
    background: rgba(0, 242, 255, 0.03);
    backdrop-filter: blur(8px);
}
/* --- 手機選單專屬樣式 --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(25px);
    z-index: 9999;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    border-left: 1px solid rgba(0, 242, 255, 0.15);
    display: flex;
    flex-direction: column;
    padding: 120px 40px;
}

.mobile-menu-overlay.active { right: 0; }

.m-nav-item {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 25px;
    letter-spacing: 2px;
    transition: 0.3s;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.m-nav-item.active { color: #00f2ff; text-shadow: 0 0 15px rgba(0, 242, 255, 0.5); }

/* 漢堡按鈕線條動畫 */
.line-t, .line-b { transition: transform 0.3s, margin 0.3s; }
.menu-open .line-t { transform: translateY(4px) rotate(45deg); }
.menu-open .line-b { transform: translateY(-4px) rotate(-45deg); }