/* 基礎設定 */
:root {
    --text-color: #2c2c2c;
    --text-light: #5a5a5a;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --accent-color: #5c6258; /* 淡水墨綠色 */
    --hover-bg: rgba(92, 98, 88, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Serif TC', "PingFang TC", "Microsoft JhengHei", serif;
    color: var(--text-color);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-color: #f5f5f0; /* 背景備用色 */
}

/* 隱隱浮現的江南園林背景 */
#bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.25; /* 清淡不干擾閱讀 */
    z-index: -1;
}

/* 主容器（無背景底色） */
.glass-container {
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    background: transparent; /* 移除白底 */
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
}

/* 標題區域 */
header {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-family: "LiSu", "隸書", "KaiTi", "楷體", serif;
    font-size: 36px; /* 用戶要求的 36 級字 (若要對應傳統級數可用 pts，但網頁中通用 36px) */
    font-weight: normal;
    letter-spacing: 4px;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
    letter-spacing: 2px;
}

/* 導航列 */
.main-nav {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

#nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

#nav-list li {
    margin: 0;
}

#nav-list button {
    background: transparent;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#nav-list button:hover, #nav-list button.active {
    background: var(--hover-bg);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

/* 內容區域 */
#content-area {
    flex-grow: 1;
    min-height: 400px;
    animation: fadeIn 0.5s ease;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    font-size: 24px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* 美化內容中的圖片與影片 */
.media-container {
    text-align: center;
    margin: 20px 0;
}

.media-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.youtube-iframe {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 腳註 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 14px;
    color: var(--text-light);
}

/* 動畫 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 響應式 */
@media (max-width: 768px) {
    .glass-container {
        width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
}
