/* --- 1. 設計系統 --- */
:root {
    --bg-deep: #050508;
    --text-gold: #B19737;
    --text-gold-highlight: #FBDF3B;
    --border-gold: #B19737;
    --nav-text: #ffffff;
    --list-separator: rgba(255, 255, 255, 0.2);
    --font-serif: -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei";
}

html {
    scroll-behavior: smooth;
}
 
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 18px;
}
/* --- 2. Go Top 按鈕樣式 --- */
.css-gotop {
    position: fixed;
    bottom: 50px;       /* 距離底部高度 (避開 Footer) */
    right: 30px;        /* 距離右側寬度 */
    width: 40px;
    height: 40px;   
    /* 配合宇宙旅人的宇宙金配色 */
    border: 1px solid var(--text-gold);
    color: var(--text-gold);
    border-radius: 50%;
    background:var(--text-gold) url(../images/icon_top_up.svg) repeat center top;
    background-size: 100%;
    
    /* 文字與排版置中 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    z-index: 9999;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
/* --- 3. 當 JS 判斷該顯示時，加入這個 class --- */
.css-gotop.show {
    opacity: 0.8; /* 平常維持微透明不干擾視覺 */
    visibility: visible;
    transform: translateY(0); /* 歸位 */
}

/* 滑鼠懸停時的發光浮動特效 */
.css-gotop:hover {
    opacity: 1;
    background:var(--text-gold) url(../images/icon_top_up.svg) repeat center top;
    background-size: 100%;
    color: #000;
    transform: translateY(-5px); /* 往上浮游 */
    box-shadow: 0 5px 15px rgba(177, 151, 55, 0.4);
}


/* --- 2. 導覽列 --- */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, #0000008c 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    transition: 0.3s;
}

.nav-brand {
    text-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    background: url('../images/hanlin-logo.svg') no-repeat center;
    background-size: auto;
    width: 60px;
    height: 50px;

}

/* 確保有設定轉場動畫，讓隱藏顯示很平滑 */
    .top-navbar, .fixed-footer {
        transition: transform 0.3s ease-in-out, background 0.3s !important;
    }

    /* 導覽列隱藏：往上推 100% 的高度 */
    .top-navbar.scroll-hide {
        transform: translateY(-100%);
    }

    /* Footer 隱藏：往下推 100% 的高度 */
    .fixed-footer.scroll-hide {
        transform: translateY(100%);
    }
/* 1. 預設狀態 (電腦版)：隱藏 */
.nav-center-logo {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
   text-decoration: none;
    color: #ddd;
    font-weight: 700;

    transition: 0.3s;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding-bottom: 5px; /* 預留底線的空間 */
    border-bottom: 2px solid transparent; /* 預設透明底線 */
}
.nav-link:hover {
    color: var(--text-gold);
}

.nav-link.active {
    color: #dbbe19 !important; /* 強制變金色 */
    text-shadow: 0 0 10px rgba(177, 151, 55, 0.5) !important;
}
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    background-color: #9B832E;
    padding: 3px 10px 6px;
    color: #fff;

}

/* --- 3. 首頁封面架構 --- */
header.home-cover {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* [圖層 A] 背景圖片層：配合星軌方向漂移 */
.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050508;
    background-image: url('../images/topbg.jpg');
    background-size: cover;
    background-position: center center;
    z-index: 0;
    will-change: transform;
    animation: bgDrift 20s infinite alternate ease-in-out;
}
@keyframes bgDrift {
    0% {
        transform: scale(1) translate(0, 0);
    }

    /* 背景往右下放大移動，與流星方向呼應 */
    100% {
        transform: scale(1.25) translate(40px, 30px);
    }
}

/* [圖層 B] 遮罩層 */
.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(5, 5, 8, 0.95) 0%, rgba(5, 5, 8, 0.3) 60%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* [圖層 C] 星軌特效層 */
.star-trails {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* 流星基礎設定 */
.star {
    position: absolute;
    /* 預設值，後面會用 nth-child 覆蓋做出差異化 */
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, transparent, rgba(255, 255, 255, 0.8), #fff);
    opacity: 0;
    transform: rotate(45deg);
    /* 方向：左上 -> 右下 */
    animation: shooting 3s linear infinite;
    will-change: transform, opacity;
    border-radius: 50%;
    /* 讓頭尾稍微圓潤一點 */
}
@keyframes shooting {
    0% {
        transform: rotate(45deg) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    80% {
        opacity: 0;
    }

    100% {
        transform: rotate(45deg) translateX(2000px);
        opacity: 0;
    }
}

/* --- 針對每顆流星做「遠近大小」的差異化設定 --- */

/* 1. 超級近：巨大、超亮、超快 */
.star:nth-child(1) {
    top: 0;
    left: 15%;
    width: 500px;
    height: 3px;
    /* 粗長 */
    animation-duration: 2s;
    animation-delay: 0s;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), #fff);
}

/* 2. 遠方：細小、慢速、稍暗 */
.star:nth-child(2) {
    top: -10%;
    left: 45%;
    width: 200px;
    height: 1px;
    /* 細短 */
    animation-duration: 4s;
    animation-delay: 1.5s;
    opacity: 0.6;
}

/* 3. 中距離：標準 */
.star:nth-child(3) {
    top: 15%;
    left: 5%;
    width: 350px;
    height: 2px;
    animation-duration: 2.5s;
    animation-delay: 0.5s;
}

/* 4. 遠方背景 */
.star:nth-child(4) {
    top: 30%;
    left: -5%;
    width: 150px;
    height: 1px;
    animation-duration: 5s;
    animation-delay: 2.5s;
    opacity: 0.5;
}

/* 5. 近距離穿插 */
.star:nth-child(5) {
    top: -15%;
    left: 65%;
    width: 450px;
    height: 2.5px;
    animation-duration: 2.2s;
    animation-delay: 1s;
}

/* [圖層 D] 內容層 */
.header-content {
    position: relative;
    z-index: 10;
    padding-left: 15%;
    max-width: 650px;
    text-align: left;
}

/* 標題設計 */
h1.main-title {
    position: relative;
    text-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    background: url('../images/in-title.svg') no-repeat center;
    background-size: auto;
    width: 500px;
    height: 250px;
}

h1.main-title::after {
    content: "✦";
    font-size: 2.5rem;
    position: absolute;
    top: 0;
    right: 50px;
    color: var(--text-gold-highlight);
    animation: blink 3s infinite;
}

h1.main-title::before {
    content: "✦";
    font-size: 1.5rem;
    position: absolute;
    bottom: 10px;
    left: -40px;
    color: var(--text-gold);
    opacity: 0.7;
    animation: blink 4s infinite reverse;
}
@keyframes blink {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.title-decoration {
    width: 130%;
    height: 30px;
    background: radial-gradient(ellipse at center, var(--text-gold) 0%, transparent 70%);
    background-size: 100% 2px;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
    opacity: 0.8;
}

.subtitle {
    font-size: 1.2rem;
    color: #f0f0f0;
    letter-spacing: 2px;
    line-height: 1.8;
    margin-bottom: 50px;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* 按鈕網格 */
.hero-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 關鍵：強制分成 3 個等寬直欄 */
    gap: 20px;
    max-width: 600px; /* 稍微加寬以容納三顆按鈕 (原本是 500px) */
    width: 100%;
}
.hero-btn {
    display: block;
    text-align: center;
    padding: 12px 0;
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 3px;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.5);
    /* padding: 10px 35px; */
}
.hero-btn:hover {
       background:var(--border-gold);
    box-shadow: 0 0 15px #f7ca774d;
    color: #2c2c2c;
    border-color: #c59f5913;
}

.hero-btn.filled {
    background: var(--text-gold);
    color: #050508;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
}
.hero-btn.filled:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

.header-copyright {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    z-index: 10;
    letter-spacing: 1px;
}

/* --- 4. 內頁共用背景 (慢速優雅版) --- */
.pager-bg {
    position: relative;
    background-color: var(--bg-deep);
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)), url('../images/p1.jpg');
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    padding-bottom: 80px;
    z-index: 1;
    overflow: hidden;
}
/* 第一層星星：改為 8秒 */
.pager-bg::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;

    background-image: radial-gradient(1.5px 1.5px at 10% 10%, #fff, transparent), radial-gradient(1.5px 1.5px at 20% 80%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 45% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 10%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 90%, #fff, transparent), radial-gradient(1.5px 1.5px at 80% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 95% 50%, #fff, transparent);

    background-repeat: repeat;
    background-size: 550px 550px;

    opacity: 0.3;
    will-change: opacity;
    animation: stars-twinkle 8s infinite ease-in-out alternate;
}

/* 第二層星星：改為 13秒 (故意設不一樣的數字，讓閃爍更隨機) */
.pager-bg::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;

    background-image: radial-gradient(2.5px 2.5px at 5% 90%, #fff, transparent), radial-gradient(2px 2px at 25% 10%, #fff, transparent), radial-gradient(2.5px 2.5px at 50% 50%, #fff, transparent), radial-gradient(2px 2px at 75% 20%, #fff, transparent), radial-gradient(2.5px 2.5px at 90% 85%, #fff, transparent);

    background-repeat: repeat;
    background-size: 400px 400px;

    opacity: 0.3;
    will-change: opacity;
    animation: stars-twinkle 13s infinite ease-in-out alternate-reverse;
    animation-delay: 2s;
}
@keyframes stars-twinkle {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.pager-bg section {
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1110px;
    margin: 0 auto;
    padding: 0 30px;
}

section {
    padding: 100px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 80vh;
}

.tab-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.tab-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-gold);
    color: var(--border-gold);
    padding: 10px 40px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.5rem;
    letter-spacing: 2px;
    font-weight: bold;
}
.tab-btn.active,
.tab-btn:hover {
    background: var(--border-gold);
    color: #2c2c2c;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

.content-flex {
    display: flex;
    gap: 40px;
    /* 欄位間距 */
}

.text-col {
    flex: 0 0 450px;
    /* 強制左邊列表寬度固定 350px，就不會變形 */
    max-width: 40%;
}

.intro-title {
    font-size: 28px;
    font-weight: 400;
    color: #DDB83F;
    line-height: 1.6;
    margin: 10px auto;
}

.desc-text {
    line-height: 1.8;
    font-weight: 400;
}

.media-col {
    flex: 1;
    /* 右邊影片填滿剩下空間 */
    position: relative;
}

.tab-pane {
    display: none;
    animation: slideUp 0.5s ease;
}

.tab-pane.active {
    display: block;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 列表樣式 (Icon 分流設定) --- */
.video-list-box ul {
    list-style: none;
}

.video-item {
    padding: 15px 5px;
    border-bottom: 1px solid var(--list-separator);
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 1.1rem;
    transition: 0.2s;
}
.video-item:last-child {
    border-bottom: none;
}

/* Icon 基礎設定 */
.video-item::before {
    font-size: 1.2rem;
    margin-right: 12px;
    color: var(--text-gold);
    min-width: 25px;
    text-align: center;
}

#moon .video-item::before,#sun .video-item::before,#star .video-item::before,#solar .video-item::before{
     content: ""; /* 留空，但必須有 */
    display: inline-block; /* 讓它有寬高 */
    width: 24px;  /* 設定 Icon 寬度 */
    height: 24px; /* 設定 Icon 高度 */ 
  /* 設定圖片 */
    background-size: contain; /* 讓圖片完整縮放在格子內 */
    background-repeat: no-repeat;
    background-position: center;
    /* 調整位置 */
    vertical-align: middle;
    margin-right: 10px; /* 跟文字的距離 */
}
/* [修改點] 針對不同篇章 ID 更換 Icon */
#moon .video-item::before {
    /* 設定圖片 */
    background-image: url("../images/icon-04.svg");
}

/* 觀月篇 */
#sun .video-item::before {
    background-image: url("../images/icon-02.svg");
    
}

/* 觀日篇 */
#star .video-item::before {
     background-image: url("../images/icon-02.svg");
}

/* 觀星篇 */
#solar .video-item::before {
     background-image: url("../images/icon-01.svg");
}

/* 太陽系 */
.video-item.active,
.video-item:hover {
    color: var(--text-gold-highlight);
    text-shadow: 0 0 8px var(--text-gold);
}

/* --- 修正後的圖片與連結系統 --- */

/* 1. 外層連結：設為 block 確保撐開空間 */
.img-link-wrapper {
    display: block;
    text-decoration: none;
    position: relative;
    /* 確保子元素定位參照此處 */
    width: 100%;
    /* 填滿 media-col */
}

/* 2. 圖片容器：定位基準點 + 底部光暈 */
.video-frame-container {
    position: relative;
    /* [關鍵] 讓裡面的絕對定位按鈕以此為基準 */
    border: 10px solid #b19a3b70;

    /* 青色底座 */
    padding: 0;
    background: #0000004d;
    overflow: visible;
    /* 讓底部的光暈可以顯示出來 */
    transition: 0.3s ease-in-out;

}
/* --- 新增：四個角落的金色細線框 (Tech Frame 效果) --- */
.video-frame-container::before {
    content: '';
    position: absolute;

    /* 定位：因為有 10px 邊框，設為 -15px 代表往外推 5px 的距離 */
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;

    pointer-events: none;
    /* 讓滑鼠穿透，不影響點擊 */
    z-index: 5;
    /* [新增] 這裡設定 50% 透明度 */
    opacity: 0.5;
    /* 左上角 (水平線, 垂直線) */
    /* 利用背景漸層畫線：
       每一組 gradient 代表一條線，分別畫出四個角落的 L 形
    */
    background:linear-gradient(var(--text-gold), var(--text-gold)) top left, linear-gradient(var(--text-gold), var(--text-gold)) top left,

    /* 右上角 (水平線, 垂直線) */
    linear-gradient(var(--text-gold), var(--text-gold)) top right, linear-gradient(var(--text-gold), var(--text-gold)) top right,

    /* 右下角 (水平線, 垂直線) */
    linear-gradient(var(--text-gold), var(--text-gold)) bottom right, linear-gradient(var(--text-gold), var(--text-gold)) bottom right,

    /* 左下角 (水平線, 垂直線) */
    linear-gradient(var(--text-gold), var(--text-gold)) bottom left, linear-gradient(var(--text-gold), var(--text-gold)) bottom left;

    background-repeat: no-repeat;

    /* 控制線條長度與粗細：
       數值格式：寬度 高度
       這裡是設定：長度30px 粗度1px
    */
    background-size:30px 1px, 1px 30px,
    /* 左上 */
    30px 1px, 1px 30px,
    /* 右上 */
    30px 1px, 1px 30px,
    /* 右下 */
    30px 1px, 1px 30px;
    /* 左下 */
}

/* 確保圖片撐滿容器，且無底部縫隙 */
.video-frame-container img {
    width: 100%;
    display: block;
    /* [關鍵] 消除圖片下方的預設留白 */
    border-radius: 2px;
}

/* 3. [您的指定效果] 底部藍色光暈：只在下方 */
.video-frame-container::after {
    content: "";
    position: absolute;
    bottom: -50px;
    /* 位於容器正下方 */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 50px;
    background: radial-gradient(ellipse at center, rgba(0, 150, 255, 0.6) 0%, transparent 70%);
    filter: blur(15px);
    z-index: -1;
    /* 放在容器後面 */
    pointer-events: none;
    opacity: 1;
    /* 常駐顯示 */
    transition: 0.3s;
}

/* Hover 動畫：上浮 + 光暈增強 */
.img-link-wrapper:hover .video-frame-container::after {
    bottom: -50px;
    /* 跟隨上浮調整位置 */
    background: radial-gradient(ellipse at center, rgba(0, 180, 255, 0.9) 0%, transparent 70%);
    width: 95%;
}

/* 4. 按鈕：絕對定位在容器右下角 */
.overlay-action-btn {
    position: absolute;
    /* 絕對定位 */
    bottom: 15px;
    /* 距離底部距離 (依照 padding 調整) */
    right: 15px;
    /* 距離右側距離 */

    padding: 6px 16px;
    background: rgba(5, 5, 8, 0.85);
    /* 深色半透明底 */
    border: 1px solid var(--text-gold);
    color: var(--text-gold);

    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 50px;

    z-index: 10;
    transition: 0.3s;

    /* 讓內容不換行，避免擠壓變形 */
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.overlay-action-btn::after {
    content: "→";
    font-size: 1.1rem;
    transition: 0.3s;
    display: inline-block;
}

/* Hover 時按鈕變色 */
.img-link-wrapper:hover .overlay-action-btn {
    background: var(--text-gold);
    color: #000;
    padding-right: 25px;
}
.img-link-wrapper:hover .overlay-action-btn::after {
    transform: translateX(3px);
}

/* --- 2. 修復影片堆疊定位 (解決影片跑版) --- */
.video-frame {
    position: relative;
    /* 讓裡面的影片以這裡為基準 */
    padding-bottom: 56.25%;
    /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    background: #000;
}

/* 這是新的 class，用來控制多個影片切換 */
.video-box {
    position: absolute;
    /* 絕對定位：讓6個影片疊在同一個位置 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    /* 預設全部隱藏 */
}

.video-box video,
.video-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

/* 預設讓第一個顯示 */
#v1 {
    display: block;
}

/* 影片下方狀態欄 */
.video-status-bar {
    text-align: center;
    margin-top: 10px;
    color: #aaa;
    font-size: 0.9rem;
}

/* 正在播放的影片標題文字 */
.nowPlayingTitle {
    color: var(--text-gold);
    font-weight: 400;
}
/* icon 開始 */




/* --- 固定在底部的 Footer --- */
.fixed-footer {
    position: fixed;   /* 關鍵：鎖定位置 */
    bottom: 0;         /* 貼齊底部 */
    left: 0;
    width: 100%;       /* 寬度滿版 */
    
    background-color: rgba(5, 5, 8, 0.95); /* 深色背景，略帶透明 */
    color: #ffffffcd;       /* 淺灰色文字 */
    text-align: center;
    padding: 15px 0;
    font-size: 0.8rem; /* 字體稍小 */
    letter-spacing: 1px;
    
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* 上方細線 */
    z-index: 9999;     /* 確保在最上層，不被其他內容蓋住 */
}

/* 避免內容被 Footer 擋住，給最外層容器加一點底部內距 */
.pager-bg {
    padding-bottom: 60px; /* 預留 Footer 的高度空間 */
}

.icon-moon{ background: url('../images/icon-04.svg') no-repeat center ;height: 25px; width: 35px;  background-size: 75%;display: inline-flex;}
.icon-star{background: url('../images/icon-02.svg') no-repeat center ;height: 25px; width: 35px;  background-size: 75%;display: inline-flex;}
.icon-solar{background: url('../images/icon-01.svg') no-repeat center ;height: 25px; width: 35px;  background-size: 75%;display: inline-flex;}
.icon-sun{background: url('../images/icon-03.svg') no-repeat center ;height: 25px; width: 35px;  background-size: 75%;display: inline-flex;}
@media (max-width:1024px) {
/* [圖層 A] 背景圖片層：配合星軌方向漂移 */
.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:#050508 url('../images/topbg.jpg')no-repeat top right 15%;
    background-size:200%;
 
    z-index: 0;
    animation: bgDrift 20s infinite alternate ease-in-out;
}
.container {
    max-width: 980px;
}}

/* --- 5. RWD 手機版 --- */
@media (max-width: 900px) {
    .css-gotop {
        bottom: 30px;
        right: 15px;
        width: 35px;
        height: 35px;
    }


    header.home-cover {
        justify-content: center;
    }

    .overlay-layer {
        background: linear-gradient(0deg, rgba(5, 5, 8, 0.95) 0%, rgba(5, 5, 8, 0.6) 100%);
    }

    .bg-layer {
        
        background-position: 70% top 60px;
    }

    .header-content {
        padding: 0 20px;
        text-align: center;
        margin: 0 auto;

    }

    h1.main-title {
        background-size: 50%;
        height: 100px;
    }

    h1.main-title::after {
        content: "✦";
        font-size: 2.5rem;
        position: absolute;
        top: 0;
        right: 100px;
        color: var(--text-gold-highlight);
        animation: blink 3s infinite;
    }

    h1.main-title::before {
        content: "✦";
        font-size: 1.8rem;
        position: absolute;
        bottom: 20px;
        left: 90px;
        color: var(--text-gold);
        opacity: 0.7;
        animation: blink 4s infinite reverse;
    }

    .hero-nav {
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        max-width: 280px;
        flex-direction: column;
    }

    .title-decoration {
        margin: 0 auto 20px;
        width: 80%;
    }

    .top-navbar {
        background-color: #ffffff36;
        /* background: transparent; */
    }

    .nav-center-logo {
        display: block;
        position: absolute;
        /* 絕對定位：抽離排版流 */
        left: 50%;
        /* 水平位置 50% */
        top: 50%;
        /* 垂直位置 50% */
        transform: translate(-50%, -50%);
        /* 修正自身寬高，達成完美置中 */

        /* 設定 Logo 大小與圖片 */
        width: 140px;
        /* 依據您的圖片寬度調整 */
        height: 50px;
        /* 依據您的圖片高度調整 */

        /* 請確認這裡的圖片路徑是否正確，通常是與主標題同一張圖 */
        background: url('../images/in-title-m.svg') no-repeat center center;
        background-size: contain;
        /* 確保圖片完整顯示不變形 */

        z-index: 1001;
        /* 確保層級 */
        pointer-events: none;
        /* 讓點擊穿透 (看需求，若不需要點擊回首頁則加上這行) */
    }

    .nav-link {
        /* color: #888; */
        text-shadow: none;
    }

    .hamburger {
        display: block;
        border-radius: 4px; /* 稍微給點圓角比較好看 */
    }

    /* 2. 將選單改成側邊欄 (預設藏在畫面右側外) */
    .nav-menu {
        position: absolute;
        top: 60px; /* 配合您導覽列的 height: 60px，從下方開始長 */
         /* right: -100%;[關鍵] 預設藏在右邊 100% 畫面外 */
        width: 250px; 
        left: 0;
        height: calc(100vh - 60px); /* 扣掉頂部導覽列的高度 */
        
        background: rgba(5, 5, 8, 0.97);
        
        /* 讓裡面的連結變成垂直排列 */
        flex-direction: column;
        justify-content: flex-start;
         /* padding-top: 50px;往下推一點 */
        align-items: center;
        gap: 40px;
        
        /* 【關鍵修復】關閉時高度與內距強制歸零，底色徹底消失 */
        max-height: 0;       
        padding: 0;          
        overflow: hidden;    /* 隱藏內容不外溢 */
        transition: all 0.4s ease-in-out; /* 平滑收合動畫 */
        
        /* 移除左右邊框，改放下方 */
        border-left: none;
    }

    /* 3. 當 JS 加上 active class 時，將選單拉回畫面內 */
    .nav-menu.active {
        right: 0; 
        max-height: 400px;   /* 展開的高度 (只要比選單內容總和高即可) */
        padding: 40px 0;     /* 【關鍵】展開時才給予空間 */
        border-bottom: 1px solid rgba(197, 160, 89, 0.3); /* 底部加微弱金線收邊 */
    }
 
 

    /* 4. 手機版的字體稍微放大，方便手指點擊 */
    .nav-link {
        font-size: 1.1rem;
        padding: 10px 20px;
    }

    .container {
        width: 100%;
        padding: 0 20px;
    }

    .content-flex {
        flex-direction: column;
        gap: 30px;
    }

    .pager-bg {
        padding: 0 20px;
    }

    .text-col {
        width: 100% !important;
        max-width: none !important;
        /* 解除原本的 40% 限制 */
        flex: 0 0 auto !important;
        margin-bottom: 20px;
    }

    .media-col {
        width: 100%;
    }

    .tab-controls {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 20px;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 12px 0;
        font-size: 1rem;
    }

    /* 讓影片清單填滿全螢幕寬度 */
    .video-list-box {
        width: 100%;
    }

    .video-list-box ul {
        max-height: 300px;
        overflow-y: auto;
        padding-right: 5px;
    }

    .video-item {
        width: 100%;
        padding: 10px;
        /* 手機版稍微加大點擊範圍 */
    }

    /* 修正內容排列方向 */
    .content-flex {
        flex-direction: column;
    }

    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #050508;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: 0.4s;
        gap: 0;
        border-bottom: thin solid #33333328;
    }

  
    .nav-link {
        display: block;
        text-align: center;
        padding: 20px;
        border-top: 1px solid #222;
    }

}


