/* --- 北歐木質風 (Nordic Wood Style) --- */
:root {
    --bg-color: #FAF9F6;
    /* 暖米色 */
    --text-primary: #5D4037;
    /* 調整為要求的內文深棕色 */
    --text-title: #3E2723;
    /* 新增：主要標題深褐色 */
    --text-secondary: #5D4037;
    /* 統一使用高對比深棕色 */
    --accent-wood: #D2B48C;
    /* 木質金 */
    --art-accent: #E2A76F;
    /* 暖橘木 */
    --music-accent: #A3C1AD;
    /* 鼠尾草綠 (北歐常用配比) */
    --wall-bg: #F3EFE0;
    --card-bg: #FFFFFF;
    --font-serif: 'Zen Maru Gothic', sans-serif;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-serif);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 16px;
    /* 增加基礎字級 */
    line-height: 1.8;
    letter-spacing: 0.06em;
    overflow: hidden;
    /* 為了 Entrance 效果 */
    height: 100vh;
}

/* --- Entrance Screen --- */
.entrance-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    background: var(--bg-color);
}

.brand {
    position: absolute;
    top: calc(15% - 10px);
    /* 向上微調 10px */
    left: 0;
    width: 100%;
    z-index: 25;
    text-align: center;
    pointer-events: none;
}

.brand h1 {
    font-size: 3.5rem;
    /* 稍微加大 */
    margin: 15px 0 0 0;
    letter-spacing: 5px;
    color: var(--text-title);
    /* 改用標題專用色 */
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(93, 64, 55, 0.1);
    /* 稍微手繪感的陰影 */
}

/* ELSA 頭像 */
.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--accent-wood);
    margin-right: 12px;
    object-fit: cover;
}

.logo {
    display: flex;
    align-items: center;
}

.brand p {
    font-size: 1.4rem;
    /* 加大 */
    margin-top: 10px;
    letter-spacing: 5px;
    color: var(--text-primary);
    /* 改回深色提升對比 */
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.split-columns {
    display: flex;
    width: 100%;
    height: 100%;
}

.column {
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-left: 2px solid rgba(93, 64, 55, 0.3);
    /* 增加分隔線可見度 */
}

.column:first-child {
    border-left: none;
}

.column:hover {
    flex: 1.5;
}

/* 背景圖 - 美術區換成藝廊感覺的圖 */
.art-col .bg-overlay {
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1544967082-d9d25d867d66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1210&q=80');
    background-size: cover;
    background-position: center;
}

.music-col .bg-overlay {
    background: var(--bg-color);
    /* 移除圖片，保持米色乾淨 */
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
}

.column:hover .bg-overlay {
    transform: scale(1.05);
    /* 微微放大 */
}

.col-content {
    z-index: 5;
    text-align: center;
    opacity: 0.9;
    /* 提高預設透明度，避免看起來太淺 */
    transition: all 0.3s ease;
    transform: translateY(130px);
    /* 往下移 130px */
}

.column:hover .col-content {
    opacity: 1;
}

.col-content h2 {
    font-size: 3rem;
    /* 縮小字體 */
    margin-bottom: 10px;
    /* border-bottom: 4px solid var(--accent-wood); 移除 h2 的邊框 */
    display: inline-block;
    padding: 0 15px;
    /* 再次縮小背景範圍 */
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 1);
    /* 縮小發光範圍讓字體更銳利 */
    background: rgba(255, 255, 255, 0.8);
    /* 白色半透明底色 */
    border-radius: 50px;
}

.zone-title {
    font-weight: 700;
    color: var(--text-title);
    font-family: 'Zen Maru Gothic', sans-serif;
}

.col-content span {
    display: block;
    /* 還原為區塊顯示，在下方 */
    font-size: 1.2rem;
    /* 維持縮小字體 */
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 5px;
    text-shadow: none;
    background: none;
    /* 移除背景 */
    padding: 0;
    margin-top: 15px;
    position: relative;
    /* 為了定位線條 */
}

.col-content span::before {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-wood);
    margin: 0 auto 10px auto;
    /* 線條在文字上方 */
    border-radius: 2px;
}

/* --- Gallery View (Main) --- */
.gallery-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.gallery-view.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    /* 恢復正常流 */
    overflow-y: auto;
    /* 允許垂直捲動 */
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(250, 249, 246, 0.95);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--accent-wood);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
}

.nav-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-family: var(--font-serif);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--text-primary);
    border-color: var(--accent-wood);
    background-color: var(--accent-wood);
    color: white;
}

/* --- The Bookshelf Wall --- */
.bookshelf-wall {
    padding: 100px 40px;
    display: flex;
    /* 改用 flex 配合 margin 更有錯落感 */
    flex-wrap: wrap;
    justify-content: center;
    gap: 80px 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* 單個作品卡片 */
.shelf-item {
    background-color: var(--card-bg);
    width: 320px;
    /* 稍微變寬一點 */
    aspect-ratio: 3/4;
    position: relative;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 15px solid #fff;
    border-bottom: 50px solid #fff;
    /* 底部留白像拍立得 */
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 10px 15px 40px rgba(0, 0, 0, 0.15);
}

/* 膠帶裝飾 */
.shelf-item::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 90px;
    height: 35px;
    background: rgba(210, 180, 140, 0.5);
    backdrop-filter: blur(2px);
    z-index: 15;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 沙龍式錯落：更誇張的位移與旋轉 */
.shelf-item:nth-of-type(4n+1) {
    transform: rotate(-5deg) translateY(40px);
}

.shelf-item:nth-of-type(4n+2) {
    transform: rotate(4deg) translateY(-40px);
}

.shelf-item:nth-of-type(4n+3) {
    transform: rotate(-2deg) translateY(20px);
}

.shelf-item:nth-of-type(4n) {
    transform: rotate(6deg) translateY(-15px);
}

.shelf-item:hover {
    transform: translateY(-20px) rotate(0deg) scale(1.1) !important;
    box-shadow: 0 40px 70px rgba(74, 53, 37, 0.35);
    border-color: #fff;
    z-index: 25;
}

.shelf-item:hover::before {
    opacity: 0;
}

.item-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: transform 0.8s ease;
}

.shelf-item:hover .item-img {
    transform: scale(1.2);
}

.item-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    /* 提高不透明度增加文字清晰度 */
    transform: translateY(0);
    transition: transform 0.3s ease;
    border-top: 1px solid rgba(210, 180, 140, 0.3);
}

.shelf-item:hover .item-info {
    transform: translateY(0);
}

.item-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-family: 'Noto Serif TC', serif;
}

.item-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: sans-serif;
}

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: #fff;
    position: relative;
    border: 4px solid var(--accent-wood);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--accent-wood);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
    background: var(--accent-wood);
    color: #fff;
    transform: scale(1.1);
}

.iframe-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.iframe-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-gold);
    font-size: 1.2rem;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 2;
}

/* Utility */
.hidden {
    display: none !important;
}