@font-face {
    font-family: 'NotoSansTC-Medium';
    src: url("/static/asset/NotoSansTC-Medium.ttf") format('truetype');
    font-weight: 100;
    font-style: normal;
}

html {
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'NotoSansTC-Medium', Arial, sans-serif;
    font-size: clamp(14px, 1.2vw + 10px, 18px);
    background-color: #f5f5f5;
    overflow-x: hidden;
    position: relative;
}

/* 滑鼠粒子特效畫布 */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
}

/* 開場歡迎影片遮罩 */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.intro-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

/* 網頁 WebM 轉場遮罩 */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.transition-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 原版頂部導覽列配色與佈局 */
.top-bar {
    position: relative;
    z-index: 10;
    height: 8vh;
    background-color: #2b2b2b;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 2vw;
    font-size: clamp(8px, 1.5vw + 12px, 16px);
}

.header-section {
    flex: 1;
    display: flex;
    align-items: center;
}
.header-section.left { justify-content: flex-start; }
.header-section.center { justify-content: center; }
.header-section.right { justify-content: flex-end; }

/* 漢堡選單按鈕 */
.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: clamp(18px, 2vw + 14px, 28px);
    height: clamp(16px, 1.5vw + 10px, 22px);
}
.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: 0.3s;
}

/* 原版側邊欄深色配置與動畫 */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: clamp(100px, 30vw + 50px, 250px);
    height: 100vh;
    background-color: #1a1a1a;
    z-index: 1000;
    transition: 0.4s ease;
    padding: 40px 20px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}
.sidebar.active {
    left: 0;
}
.sidebar-menu {
    list-style: none;
    margin-top: 60px;
}
.sidebar-menu li {
    margin-bottom: 25px;
    opacity: 0;
    transform: translateX(-30px);
    clip-path: inset(0 0 100% 0);
}
.sidebar.active li {
    animation: slideIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.sidebar.active li:nth-child(1) { animation-delay: 0.12s; }
.sidebar.active li:nth-child(2) { animation-delay: 0.18s; }
.sidebar.active li:nth-child(3) { animation-delay: 0.24s; }
.sidebar.active li:nth-child(4) { animation-delay: 0.30s; }
.sidebar.active li:nth-child(5) { animation-delay: 0.36s; }

.sidebar-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(10px, 1.2vw + 12px, 16px);
    display: block;
    transition: color 0.2s ease, padding 0.2s ease;
}
.sidebar-menu a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #a29bfe;
    transition: width 0.3s ease;
}
.sidebar-menu a:hover::after {
    width: 100%;
}
.sidebar-menu a:hover {
    color: #ff4757;
    padding-left: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: clamp(16px, 2vw + 16px, 24px);
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
}

/* 側邊欄半透明遮罩 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}
.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 網頁主內容區 */
.content {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 20px;
    background-color: #f5f5f5;
}

/* 原版底部頁尾深色配置 */
.bottom-bar {
    position: relative;
    z-index: 10;
    height: 8vh;
    background-color: #2b2b2b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-size: clamp(8px, 1.5vw + 12px, 14px);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.bottom-bar.slide-out {
    opacity: 0;
    transform: translateY(100%);
}

.unselect { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); clip-path: inset(0 0 100% 0); }
    to { opacity: 1; transform: translateX(0); clip-path: inset(0 0 0% 0); }
}
