:root {
    --color-bg: #0f0a18;
    --color-bg-gradient: linear-gradient(135deg, #0f0a18 0%, #1a1429 100%); /* 新增：漸變背景色值 */
    --color-card: #1a1429;
    --color-card-hover: #211833; /* 新增：卡片hover背景色 */
    --color-purple: #6e4b9e;
    --color-purple-gradient: linear-gradient(90deg, #6e4b9e 0%, #8a6bc8 100%); /* 新增：紫色漸變 */
    --color-gold: #d4b868;
    --color-gold-light: #e9cd7c; /* 新增：淺金色 */
    --color-text: #e0e0e0;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3); /* 新增：卡片陰影 */
    --shadow-btn: 0 2px 8px rgba(110, 75, 158, 0.4); /* 新增：按鈕陰影 */
    --transition-base: all 0.4s ease; /* 新增：統一過渡動效 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft JhengHei", "Heiti TC", sans-serif;
}

body {
    background: var(--color-bg-gradient); /* 修改：替換為漸變背景 */
    color: var(--color-text);
    line-height: 1.8;
    min-height: 100vh; /* 新增：確保body充滿視口高度 */
}

/* 頂部大圖 */
.top-banner {
    width: 100%;
    position: relative; /* 新增：為後續層級調整預留 */
}
.top-banner img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.95); /* 新增：微調頂圖亮度提升質感 */
}

/* 新增：方案1 - 首屏向下滾動引導提示樣式（國風淡色，不搶視覺） */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    color: rgba(255, 255, 255, 0.7); /* 淡色不突兀 */
}
.hint-text {
    font-size: 16px; /* ← 這裡就是文字大小 */
    margin-bottom: 8px;
    display: block;
    font-family: "Microsoft JhengHei", serif; /* 國風字體 */
    /* 白色字 + 金色描邊（重點在這） */
    color: #ffffff;
    text-shadow: 
        1px 1px 0 var(--color-gold),
        -1px 1px 0 var(--color-gold),
        1px -1px 0 var(--color-gold),
        -1px -1px 0 var(--color-gold);
}
.hint-arrow {
    font-size: 18px; /* ← 這裡就是箭頭大小 */
    opacity: 0.8; /* 改成1，讓白色更亮 */
    transition: all 0.5s ease;

        /* 白色 + 金色描邊 */
    color: #ffffff;
    text-shadow: 
        1px 1px 0 var(--color-gold),
        -1px 1px 0 var(--color-gold),
        1px -1px 0 var(--color-gold),
        -1px -1px 0 var(--color-gold);
}
/* 新增：箭頭浮動動畫 */
.arrow-float {
    transform: translateY(8px);
    opacity: 1;
}

/* 新增：方案3 - 跳過/直接導航按鈕樣式（隱藏式，hover才顯現） */
.skip-nav-btn {
    position: absolute;
    top: 20px;       /* 維持靠上位置，可依需求改成15px/25px */
    left: 50%;       /* 水平居中 */
    transform: translateX(-50%); /* 完美水平置中 */
    z-index: 10;
}
.skip-link {
    background: rgba(21, 16, 34, 0.6);
    color: var(--color-gold-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgba(212, 184, 104, 0.3);
    opacity: 0.9; /* 初始半透明 */
    transition: var(--transition-base);
}
.skip-link:hover {
    opacity: 1; /* hover全顯示 */
    background: rgba(21, 16, 34, 0.9);
    transform: scale(1.05);
}

/* 導航列 */
.custom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid #332a44;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 50px; /* 加上這行 */
        
    /* ↓↓↓ 就是加上這 3 行 ↓↓↓ */
    position: sticky;
    top: 0;
    z-index: 99999;
    backdrop-filter: blur(12px); /* 新增：導航欄毛玻璃效果 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* 新增：導航欄陰影強化 */
    transition: all 0.5s ease; /* 新增：透明度過渡動效 */
}
/* 新增：方案2 - 導航欄首屏半透明狀態 */
.nav-transparent {
    background: rgba(21, 16, 34, 0.95); /* 實色，強化可點擊感 */
}
/* 新增：方案2 - 導航欄滾動後實色狀態 */
.nav-solid {
    background: rgba(21, 16, 34, 0.4); /* 半透明，不擋首屏視覺 */
}

/* LOGO 縮小 */
.nav-logo img {
    height: 32px;
    width: auto;
    transition: transform 0.3s ease; /* 新增：LOGO hover放大動效 */
}
.nav-logo img:hover {
    transform: scale(1.05); /* 新增：LOGO hover輕微放大 */
}

/* 選單 */
.nav-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu a {
    color: var(--color-text);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base); /* 新增：統一選單按鈕過渡動效 */
    position: relative; /* 新增：為外部鏈接小圖標定位 */
}
/* 新增：外部鏈接提示小圖標樣式 */
.nav-menu a.external-link::after {
    content: "\f35d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 8px;
    margin-left: 4px;
    color: var(--color-gold);
}
.nav-menu a.active,
.nav-menu a:hover {
    background: var(--color-purple-gradient); /* 修改：替換為漸變背景 */
    color: white;
    transform: translateY(-1px); /* 新增：hover輕微上浮 */
    box-shadow: var(--shadow-btn); /* 新增：hover陰影 */
}
/* 新增：選單按鈕點擊反饋 */
.nav-menu a:active {
    transform: scale(0.98);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}

/* 內容區塊 */
.tab-content {
    display: none;
    opacity: 0; /* 新增：淡入淡出動畫初始透明度 */
    transform: translateY(10px); /* 新增：淡入淡出動畫初始位移 */
    transition: opacity 0.5s ease, transform 0.5s ease; /* 新增：分頁切換動畫 */
}
.tab-content.active {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    opacity: 1; /* 新增：激活分頁透明度還原 */
    transform: translateY(0); /* 新增：激活分頁位移還原 */
}

/* 卡片 */
.card {
    background: var(--color-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2b2240;
    margin-bottom: 20px;
    transition: var(--transition-base); /* 新增：卡片hover過渡動效 */
    box-shadow: var(--shadow-card); /* 新增：卡片陰影強化層次 */
}
/* 新增：卡片hover效果 */
.card:hover {
    background: var(--color-card-hover);
    transform: translateY(-2px); /* 輕微上浮 */
    border-color: #3a2e52; /* 邊框色加深 */
}
.card h2 {
    color: var(--color-gold);
    margin-bottom: 12px;
    font-size: 18px;
    position: relative; /* 新增：為標題底線定位 */
    padding-bottom: 8px; /* 新增：標題底線間距 */
}
/* 新增：標題下金色底線裝飾 */
.card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 720px;
    height: 2px;
    background: var(--color-gold);
    border-radius: 1px;
}
.card ul {
    padding-left: 20px;
}
.card li {
    margin: 8px 0;
}
.card a {
    color: #c8a3ff;
    text-decoration: none;
    position: relative; /* 新增：為鏈接下劃線動畫定位 */
    transition: color 0.3s ease; /* 新增：鏈接顏色過渡 */
}
/* 新增：鏈接下劃線動畫 */
.card a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}
.card a:hover::after {
    width: 100%; /* hover時下劃線展開 */
}
.card a:hover {
    color: #f7f7c0;
    /* text-decoration: underline; 移除原下劃線，替換為動畫版 */
}

/* 新增：社群ICON樣式 */
.social-list {
    list-style: none;
    padding-left: 0 !important;
}
.social-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px; /* 新增：ICON圓角優化 */
    transition: var(--transition-base); /* 新增：ICON hover動效 */
}
/* 新增：社群ICON hover旋轉+放大 */
.social-icon:hover {
    transform: rotate(5deg) scale(1.1);
}

/* 頁尾 */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    margin-top: 20px;
    background: rgba(26, 20, 41, 0.5); /* 新增：頁尾半透明背景 */
    border-top: 1px solid #2b2240; /* 新增：頁尾上邊框 */
    border-radius: 12px 12px 0 0; /* 新增：頁尾上圓角 */
    margin: 20px auto 0; /* 新增：頁尾居中 */
    max-width: 800px; /* 新增：頁尾寬度與內容區一致 */
}

/* 手機板 - 最終完美版：Logo 與選單並排 */
@media (max-width: 768px) {
    
    /* 1. 導航列本體：開啟換行，讓Logo與選單並排 */
    .custom-nav {
        background: #151022 !important;
        opacity: 0.85 !important;
        backdrop-filter: blur(10px) !important; /* 保留半透明毛玻璃 */

        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important; /* 整體居中 */
        padding: 8px 5px !important; /* 縮小內距，節省空間 */
        box-sizing: border-box !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        flex-wrap: wrap !important; /* 關鍵：允許換行 */
        min-height: auto !important; /* 自動高度 */
        backdrop-filter: blur(8px) !important; /* 調整：手機端毛玻璃強度 */
        box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important; /* 新增：手機端導航欄陰影 */
        transition: all 0.5s ease !important; /* 保留：手機端也有透明度過渡 */
    }
    /* 新增：方案2 - 手機端導航欄滾動狀態優化 */
    .nav-transparent {
        background: rgba(21, 16, 34, 0.95) !important; /* 靜止狀態：接近實色，點擊感強 */
    }
    
    .nav-solid {
      background: rgba(21, 16, 34, 0.4) !important; /* 滾動狀態：半透明，毛玻璃明顯 */
    }

    /* 2. Logo 設定：縮小尺寸，並與選單並排 */
    .nav-logo {
        flex-shrink: 0 !important; /* 不被壓縮 */
        margin-right: 5px !important; /* 與選單留一點縫隙 */
    }
    .nav-logo img {
        height: 30px !important; /* 稍微縮小Logo */
        width: auto !important;
    }

    /* 3. 選單容器：換行且居中 */
    .nav-menu {
        display: flex !important;
        flex-wrap: wrap !important; /* 允許選單換行 */
        justify-content: center !important; /* 選單內容居中 */
        gap: 3px !important; /* 縮小按鈕間距，省空間 */
        flex: 1 !important; /* 占滿剩餘空間 */
    }

    /* 4. 選單按鈕：精簡尺寸 */
    .nav-menu a {
        font-size: 11px !important; /* 字體稍微縮小 */
        padding: 4px 6px !important; /* 縮小按鈕內距 */
        white-space: nowrap !important; /* 文字不換行 */
        color: #fff !important;
        text-decoration: none !important;
        border-radius: 4px !important; /* 調整：手機端按鈕圓角更小 */
    }
    /* 新增：手機端選單按鈕hover優化 */
    .nav-menu a:hover {
        transform: translateY(0) !important; /* 取消上浮，避免手機端誤觸 */
        box-shadow: 0 1px 4px rgba(110,75,158,0.3) !important;
    }

    /* 5. 頂部內距：防止內容被擋住 */
    body {
        padding-top: 50px !important; /* 根據實際高度調整，這裡先鎖定50px */
    }


    /* 手機版隱藏「往下滑提示」和「直接導航」按鈕 */
    .scroll-hint, .skip-nav-btn {
        display: none !important;
    }


    /* 新增：方案1 - 手機端向下滾動提示優化 */
    .scroll-hint {
        bottom: 20px;
    }
    .hint-text {
        font-size: 14px;
        color: #ffffff;
        text-shadow: 
            1px 1px 0 var(--color-gold),
            -1px 1px 0 var(--color-gold),
            1px -1px 0 var(--color-gold),
            -1px -1px 0 var(--color-gold);
    }
    .hint-arrow {
        font-size: 16px;
        color: #ffffff;
        text-shadow: 
        1px 1px 0 var(--color-gold),
        -1px 1px 0 var(--color-gold),
        1px -1px 0 var(--color-gold),
        -1px -1px 0 var(--color-gold);
    }

    /* 新增：方案3 - 手機端跳過按鈕優化 */
    .skip-nav-btn {
        top: 15px;
       transform: translateX(-50%);  /* 完美置中 */
    }
    .skip-link {
        padding: 4px 10px;
        font-size: 10px;
    }

    /* 新增：手機端卡片優化 */
    .card {
        padding: 16px !important;
        margin-bottom: 16px !important;
        border-radius: 8px !important;
    }
    .card h2 {
        font-size: 16px !important;
        padding-bottom: 6px !important;
    }
    .card h2::after {
        width: 100% !important; /* 手機端標題底線縮短 */
    }
}

/* 基礎樣式 */
.detail-link {
    color: #e6d8ff;
    text-decoration: underline;
    transition: color 0.3s ease; /* 滑動過渡效果 */
}

/* hover 淺黃色效果 */
.detail-link:hover {
    color: #f7f7c0; /* 淺黃色（可自行調整色碼） */
    /* 可選：加強效果，比如滑鼠變手型（預設a標籤已有）、加粗等 */
    /* font-weight: bold; */
}

/* 新增：回到頂部按鈕樣式 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-purple-gradient);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: var(--transition-base);
    opacity: 0; /* 初始隱藏 */
    pointer-events: none; /* 初始不可點擊 */
    z-index: 9999;
}
/* 新增：回到頂部按鈕顯示狀態 */
.back-to-top.show {
    opacity: 1;
    pointer-events: all;
}
/* 新增：回到頂部按鈕hover效果 */
.back-to-top:hover {
    background: var(--color-gold-gradient, var(--color-gold));
    transform: translateY(-3px);
}
/* 新增：回到頂部按鈕點擊反饋 */
.back-to-top:active {
    transform: translateY(0);
}

/* 新增：背景漸變遮罩層（強化視覺層次） */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(110,75,158,0.15) 0%, transparent 60%);
    pointer-events: none; /* 不影響頁面交互 */
    z-index: -1; /* 置於最底層 */
}