/* 🎯 字体注入 */
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+XiaoWei&family=Cormorant+Garamond:wght@600;700&display=swap');

/* 🎯 全局基础设定 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: #000;
}

* { box-sizing: border-box; }

body {
    background: #000;
    color: #fff;
    font-family: "Arial", sans-serif;
}

a { text-decoration: none; transition: all 0.3s ease; }

/* ==========================================================================
   🖼️ 电脑端固定导航栏 (保持不变)
   ========================================================================== */
.site-menu {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 1000;
    pointer-events: none; 
}

.brand-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: auto; 
}

.site-title {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.site-title span:first-child {
    font-family: "Cormorant Garamond", serif !important;
    font-size: 2.2em;
    line-height: 1.1;
    color: #fff; 
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}

.site-title span:last-child {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 1.2em;
    letter-spacing: 0.2em;
    color: #fff; 
    margin-top: 10px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-under-title {
    display: flex;
    gap: 20px;
}

.nav-under-title a {
    font-family: "Cormorant Garamond", serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff; 
    letter-spacing: 0.05em;
}

.nav-under-title a.is-active {
    text-decoration: underline;
    text-underline-offset: 6px;
}

/* 📂 Works 抽屉列表 (通用基础) */
.works-drawer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.works-drawer.is-open {
    max-height: 85vh;
    opacity: 1;
    margin-top: 20px;
}

.drawer-item {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    line-height: 1.8;
    color: #fff; 
    font-weight: 700;
    white-space: nowrap; /* 电脑端保持单行 */
}

/* ==========================================================================
   📐 首页全屏拼接 & 内容页基础
   ========================================================================== */
.scroll-section {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-overlay {
    position: absolute;
    bottom: 80px;
    left: 40px;
    color: #fff;
    z-index: 5;
}

.work-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(20px, 3vw, 32px) !important; 
    font-weight: 700;
    text-shadow: 0 2px 15px rgba(0,0,0,0.6);
}

.inner-page-wrapper {
    background: #000;
    min-height: 100vh;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 180px 40px 100px;
    line-height: 1.8;
    color: #fff;
}

/* 🎥 视频自适应 */
.page-container iframe, 
.page-container video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 20px 0;
    border: none;
}

/* ==========================================================================
   📱 手机端深度优化 (修复目录溢出与图片全屏)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. 导航区域居中 */
    .site-menu {
        left: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        top: 20px !important;
    }

    .brand-group {
        align-items: center !important;
        text-align: center !important;
        width: 100%;
    }

    .site-title span:first-child {
        font-size: 1.45em !important;
        letter-spacing: 0.02em !important;
    }

    /* 2. 【核心修复】解决目录超出边框问题 */
    .works-drawer {
        align-items: center !important; 
        width: 85% !important; /* 限制宽度，防止冲出屏幕 */
        margin: 0 auto;
        background: rgba(0, 0, 0, 0.7); /* 半透明背景，防止白字在亮色图片上看不清 */
        backdrop-filter: blur(8px); /* 磨砂玻璃效果，更有质感 */
        border-radius: 10px;
    }

    .works-drawer.is-open {
        margin-top: 15px;
        padding: 15px; /* 展开后增加内部间距 */
    }

    .drawer-item {
        white-space: normal !important; /* 【关键】允许标题在手机端自动换行 */
        text-align: center;
        font-size: 16px !important;
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1); /* 列表项之间的细分界线 */
    }
    
    .drawer-item:last-child {
        border-bottom: none;
    }

    /* 3. 封面图保持全屏与剪裁 */
    .scroll-section, .image-box, .image-box img {
        height: 100dvh !important;
    }

    .image-box img {
        object-fit: cover !important;
    }

    /* 4. 信息层居中 */
    .info-overlay {
        bottom: 8% !important;
        left: 0 !important;
        right: 0 !important;
        text-align: center !important;
        padding: 0 30px;
    }

    .work-title {
        font-size: 22px !important;
    }

    .page-container {
        padding: 140px 20px 60px !important;
    }
}