/* --- 1. 基礎設定與變數 --- */
:root {
    --accent-color: #00a8e8;
    --text-color: #2c3e50;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --linktree-gradient: linear-gradient(135deg, #1de31a 0%, #1e3932 100%);
}

html { 
    scroll-behavior: smooth; 
    height: -webkit-fill-available;
}

/* 核心背景層：解決手機固定背景問題 */
.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    background-image: url('../main-visual.webP'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1; /* 放在內容下方 */
    will-change: transform;
}

body {
    font-family: 'Zen Maru Gothic', 'Noto Sans TC', sans-serif;
    margin: 0; padding: 0;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #e3f2fd; /* 底色 */
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
}

/* --- 2. 佈局組件 --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

section {
    scroll-margin-top: 100px; 
    padding: 60px 0;
}

header {
    background-color: rgba(227, 242, 253, 0.7);
    padding: 4rem 1rem;
    text-align: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

h1 { 
    margin: 0; font-weight: 700; letter-spacing: 3px; 
    color: var(--accent-color); font-size: 2.8rem;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* --- 3. 導覽列與漢堡選單  --- */
nav {
    display: flex;
    justify-content: flex-end; /* 按鈕靠右 */
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    position: sticky;
    top: 0;
    z-index: 9999;
    height: 60px;
    padding: 0 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.menu-toggle { display: none; }

.hamburger {
    display: flex; /* 全面顯示漢堡按鈕 */
    flex-direction: column;
    justify-content: space-around;
    width: 25px;
    height: 20px;
    cursor: pointer;
    padding: 10px;
    z-index: 10002;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* 選單容器預設隱藏 (下拉式) */
.nav-links {
    display: none; 
    position: absolute;
    top: 60px;       /* 銜接 nav 下方 */
    right: 0;        /* 靠右對齊 */
    width: 250px;    /* 設定固定寬度 */
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 10px 0;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
    z-index: 10001;
    border-radius: 0 0 0 12px;
}

/* 當勾選時顯示選單 */
.menu-toggle:checked ~ .nav-links {
    display: flex;
}

/* 選單項目樣式 */
nav a, 
.info-btn,
.lang-btn {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-family: inherit; /* 強制繼承 body 字體 */
    font-size: 1rem;
    margin: 0;
    padding: 18px 0; /* 統一間距 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    background: none; /* 移除按鈕背景 */
    border: none;     /* 移除按鈕邊框 */
    outline: none;
}

/* 漢堡動畫 */
.menu-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.menu-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- 4. 語言選單下拉框 --- */
.info-dropdown,
.lang-dropdown {
    position: relative;
    width: 100%;
}

.info-content, .lang-content {
    display: none;
    width: 100%;
    background-color: #f8f9fa;
    text-align: center;
    border-top: 1px solid #eee;
}

/* 懸停顯示邏輯 (共通) */
.info-dropdown:hover .info-content,
.lang-dropdown:hover .lang-content {
    display: block;
}

.info-content a, .lang-content a {
    padding: 12px 0 !important;
    font-size: 0.9rem;
    height: auto;
}

/* 語言選單：淡藍色背景 */
.lang-content a:hover,
.lang-content a:active {
    background-color: #f0f7ff;
    color: var(--accent-color) !important;
}

/* 相關連結：藍色漸變色 */
.info-content a:hover,
.info-content a:active {
    background: linear-gradient(45deg, #00a8e8 0%, #0077b6 100%) !important;
    color: #ffffff !important;
}

/* --- 5. 內容卡片 --- */
.info-card {
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 24px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.section-title {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 25px;
    border-radius: 50px;
    margin-bottom: 30px;
    font-size: 1.4rem;
}

/* --- 6. SNS 按鈕  --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; /* 按鈕之間的間距 */
    margin-top: 20px;
}

.news-link {
    text-align: center;
    padding: 15px 5px; /* 增加上下高度，減少左右內距防止換行 */
    border-radius: 12px;
    text-decoration: none;
    background: #ffffff;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.95rem; 
    transition: all 0.3s ease;
    border: 1.5px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* 確保文字不換行 */
}

/* Active & Hover 通用效果：文字變白、產生陰影與上移 */
.news-link:hover,
.news-link:active {
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: transparent;
}

/* 各平台專屬 Hover 漸變色 */
.news-link.ig:hover,
.news-link.ig:active {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
}

.news-link.tiktok:hover,
.news-link.tiktok:active {
    background: linear-gradient(45deg, #69C9D0 0%, #EE1D52 100%) !important;
    background-color: #010101 !important;
}

.news-link.twitter:hover,
.news-link.twitter:active {
    background: #1DA1F2 !important;
}

.news-link.youtube:hover,
.news-link.youtube:active {
    background: linear-gradient(45deg, #FF0000 0%, #FF4D4D 50%, #CC0000 100%) !important;
}

.news-link.staff-link:hover,
.news-link.staff-link:active {
    /* 使用 0.6 的透明度，讓顏色看起來比官方帳號淺很多 */
    opacity: 0.7; 
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Staff IG Hover: 較淡的粉紫色 */
.news-link.staff-link.ig:hover {
    background: linear-gradient(45deg, #ffc9a3, #ff96b5) !important;
    color: #ffffff !important;
}

/* Staff X Hover: 較淡的藍灰色 */
.news-link.staff-link.twitter:hover {
    background: #a5d8ff !important;
    color: #ffffff !important;
}

/* --- 7. 加入我們與按鈕 --- */
.contact-btn.linktree {
    background: var(--linktree-gradient);
    color: white !important;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 10px 20px rgba(29, 227, 26, 0.3);
}

/* --- 8. MV 播放器 --- */
#randomMV {
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 24px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 18px;
    overflow: hidden;
}

.video-thumb {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
}

/* --- 9. 行動裝置與相容性整合優化 --- */
@media (max-width: 600px) {
    /* 讓選單佔滿全螢幕寬度，方便觸控 */
    .nav-links {
        width: 100%;
        border-radius: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    /* 調整標題大小，避免手機上太擁擠 */
    h1 { 
        font-size: 2rem; 
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iOS 相容性 */
@supports (-webkit-touch-callout: none) {
    body, .fixed-background { min-height: -webkit-fill-available; }
}
