:root {
    --ui-blue: #4169E1;
    --ui-pink: #FF69B4;
    --ui-yellow: #FFDF00;
    --noto: 'Noto Sans TC', sans-serif;
}

.main-content h1,h2 { 
    color: white;
    /* 在上下左右與四角各投射 1px 的陰影 */
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px  1px 0 #000, 1px  1px 0 #000, 0px  2px 4px rgba(0,0,0,0.5); /* 額外增加一點自然深度的柔和陰影 */
    font-size: 2rem;
    font-weight: bold; /* 有粗度外框會更好看 */
    
    margin-bottom: 20px; 
    border-left: 5px solid var(--ui-blue); 
    padding-left: 15px; 

}
.main-content p {
    color: white;
    /* 在上下左右與四角各投射 1px 的陰影 */
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px  1px 0 #000, 1px  1px 0 #000, 0px  2px 4px rgba(0,0,0,0.5); /* 額外增加一點自然深度的柔和陰影 */
    font-size: 1.25rem;
    font-weight: bold; /* 有粗度外框會更好看 */
}


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; font-family: var(--noto); background: #fff;}
[v-cloak] { display: none; }
.bbg{
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebd3c1 100%);
    width: 100%;
    height: 100%;
    z-index: 1; 
}
.full-screen-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* 替換成你的背景圖路徑 */
    background-image: url('assets/your-background.jpg'); 
    
    /* 核心設定 */
    background-size: contain;    /* 確保整張圖都能看見，不裁切 */
    background-repeat: no-repeat; /* 防止圖片重複出現 */
    background-position: center;  /* 讓圖片在視窗中間 */

    
    z-index: 2;            /* 確保它在所有層級的最下方 (-2 是 bg-wrapper) */
}
/* 粒子容器 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
    pointer-events: none;
    
    /* 帥氣的漸層底色 (即使背景圖還沒載入也很美) */
}
/* 進場大字遮罩層 */
.intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--ui-blue); /* 初始純色背景 */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-logo-container {
    perspective: 1000px; /* 3D 透視感 */
    display: flex;
}

.intro-char {
    display: inline-block;
    font-size: 8rem;
    font-weight: 900;
    color: white;
    margin: 0 5px;
    opacity: 0; /* 初始隱藏，由 GSAP 控制進場 */
}


/* 背景淡化消失的 Vue Transition */
.intro-fade-leave-active {
    transition: opacity 1s ease;
}
.intro-fade-leave-to {
    opacity: 0;
}
/* 背景與人物 */
.bg-wrapper { 
    position: fixed; width: 100%; height: 100%; z-index: -2; display: flex; 
}
.bg-grid-paper { 
    flex: 1; background-image: radial-gradient(rgba(65, 105, 225, 0.15) 1px, transparent 0); 
    background-size: 30px 30px; 
    background-color: transparent;
}
.bg-art { flex: 2; background-size: cover; background-position: center; clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%); }

.main-char { height: 90vh; filter: drop-shadow(20px 20px 0px rgba(0,0,0,0.03));}

.main-content {
    position: absolute;
    /* 定位在導覽紐上方、側邊欄右側、對話框左側 */
    top: 10%;
    left: 25%;  /* 避開側邊欄 */
    right: 25%; /* 避開對話框 (視你對話框寬度調整) */
    bottom: 20%;  /* 避開下方按鈕區 */

    padding: 10px;
    z-index: 5;
    display: flex;
    height: 73%;

    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox 窄捲軸 */
    scrollbar-color: var(--ui-blue) transparent;
}
.main-content.is-modal-open {
    z-index: 1000; /* 高於 side-ui 的 100 */
}
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb {
    background: var(--ui-blue);
    border-radius: 10px;
}

.content-wrapper {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05); /* 淡淡的底色感 */
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden; /* 讓圖片不超出圓角 */
    display: flex;
    flex-direction: column;

    pointer-events: auto;

    transition: opacity 0.5s ease, transform 0.5s ease;

    overflow-y: auto;
    scrollbar-width: thin; /* Firefox 窄捲軸 */
    scrollbar-color: var(--ui-blue) transparent;
}

.content-wrapper::-webkit-scrollbar { width: 6px; }
.content-wrapper::-webkit-scrollbar-thumb {
    background: var(--ui-blue);
    border-radius: 10px;
}


/* 文字捲動區 */
.content-text-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto; /* 開啟滾輪功能 */
    color: white;
    scrollbar-width: thin; /* Firefox 窄捲軸 */
    scrollbar-color: var(--ui-blue) transparent;
}

/* 捲軸美化 (Chrome/Edge) */
.content-text-area::-webkit-scrollbar { width: 6px; }
.content-text-area::-webkit-scrollbar-thumb {
    background: var(--ui-blue);
    border-radius: 10px;
}

/* 文字排版 */
.rich-text { text-align: left; line-height: 1.8; }
.text-center { text-align: center; } /* 給 HOME 用的置中類別 */

.page-title { font-size: 2.5rem; margin-bottom: 20px; border-left: 5px solid var(--ui-blue); padding-left: 15px; }

/* 頁面切換動畫 */
.fade-slide-enter-active, .fade-slide-leave-active { 
    transition: all 0.5s ease; 
}
.fade-slide-enter-from { 
    opacity: 0; 
    transform: translateX(20px) scale(0.95); /* 加一點縮放感更像選單 */
}
.fade-slide-leave-to { 
    opacity: 0; 
    transform: translateX(-20px) scale(0.95); 
}

/* 對話框淡入淡出動畫 */
/* 進入與離開的動畫過程 */
.v-enter-active,
.v-leave-active {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 進入時：從「縮小 + 透明」到正常 */
.v-enter-from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
}

/* 離開時：變成「放大 + 透明」 */
.v-leave-to {
    opacity: 0;
    transform: scale(1.2); /* 放大到 1.1 倍 */
}
/* 狀態欄 (側邊 UI) */
.side-ui { 
    position: absolute; top: 40px; left: 40px; width: 20%; z-index: 100; 
    opacity: 1 !important; visibility: visible !important;
}
.profile-card { 
    display: flex; align-items: center; gap: 5px; background: white; border: 5px solid var(--ui-blue); 
    padding: 15px 25px; border-radius: 100px 40px 40px 100px; cursor: pointer;
    box-shadow: 10px 10px 0px rgba(65, 105, 225, 0.1);
}
.avatar-circle { 
    width: 70px; height: 70px; border-radius: 50%; border: 4px solid var(--ui-blue); 
    overflow: hidden; flex-shrink: 0; transition: 0.3s; background: #fff;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 1.5rem; font-weight: 900; color: var(--ui-blue); line-height: 1; }
.brand-tag { background: var(--ui-pink); color: white; padding: 2px 10px; font-size: 0.8rem; border-radius: 5px; margin-top: 5px; display: inline-block; }
.mobile-arrow { font-size: 1.1rem; color: var(--ui-blue); transform: rotate(180deg) }
.side-ui.is-open .mobile-arrow { transform: rotate(360deg); }

/* 社群媒體格線 */
.social-container { 
    margin-top: 0; 
    background: white; 
    border: 0px solid var(--ui-blue); /* 關閉時邊框為0 */
    border-radius: 30px; 
    padding: 0;           /* 關閉時內距為0 */
    box-shadow: none;     /* 關閉時無陰影 */
    
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;        /* 關鍵：預設高度為0 */
    opacity: 0;           /* 關鍵：預設透明度為0 */
}

/* 2. 定義「開啟狀態」：當 side-ui 擁有 .is-open 時觸發 */
.side-ui.is-open .social-container { 
    max-height: 500px;    /* 展開後的高度 */
    opacity: 1; 
    padding: 25px; 
    margin-top: 15px;
    border-width: 5px; 
    box-shadow: 10px 10px 0px rgba(0,0,0,0.05);
}
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.social-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; transition: 0.2s; }
.social-item:hover { transform: translateY(-5px); }
.social-item img { width: 45px; height: 45px; margin-bottom: 5px; }
.social-item span { font-size: 0.75rem; color: var(--ui-blue); font-weight: 900; }

/* 對話框 */
.dialogue-box { 
    position: absolute; top: 20%; right: 10%; background: white; border: 4px solid var(--ui-blue); 
    padding: 25px; border-radius: 40px 40px 0 40px; max-width: 350px; z-index: 100;
}

/* 三大導覽按鈕 (固定置底) */
.mega-nav-container {
    position: fixed !important; bottom: 40px !important; left: 50% !important;
    transform: translateX(-50%) !important; display: flex; gap: 25px; z-index: 9;
}
.gacha-btn {
    width: 240px; height: 85px; cursor: pointer; background: white; border: 5px solid var(--ui-blue);
    transform: skewX(-15deg); transition: all 0.2s; box-shadow: 8px 8px 0px var(--ui-blue); position: relative;
}
.btn-inner { transform: skewX(15deg); display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; }
.btn-en { font-size: 1.8rem; font-weight: 900; color: var(--ui-blue); }
.btn-jp { font-size: 0.8rem; color: var(--ui-pink); letter-spacing: 2px; }

.gacha-btn:hover { transform: skewX(-15deg) translateY(-8px); box-shadow: 12px 12px 0px var(--ui-yellow); }
.gacha-btn:active { transform: skewX(-15deg) translateY(4px); box-shadow: 2px 2px 0px var(--ui-blue); }
.gacha-btn.active { background: var(--ui-blue); transform: skewX(-15deg) scale(1.05); }
.gacha-btn.active .btn-en { color: white; }
.gacha-btn.active .btn-jp { color: var(--ui-yellow); }

/* RWD 適配 */
@media (max-width: 1300px){
    .main-content{
        left: 5%;  /* 避開側邊欄 */
        right: 5%; /* 避開對話框 (視你對話框寬度調整) */
        transition: opacity 0.5s ease;
    }
    .side-ui { top: 20px; left: 5%; width: 90%; }
    .profile-card{ padding: 0px 0px; height: 70px;}
    .dialogue-box { top: auto; bottom: 140px; left: 10%; right: 10%; max-width: none; border-radius: 20px; padding: 20px; }
}
@media (max-width: 900px) {
    .main-content{
        left: 5%;  /* 避開側邊欄 */
        right: 5%; /* 避開對話框 (視你對話框寬度調整) */
        top: 15%;
    }

    .side-ui { top: 20px; left: 5%; width: 90%; }
    .profile-card{ padding: 0px 0px; }
}
@media (max-width: 760px) {
    .side-ui { top: 20px; left: 5%; width: 90%; }
    .profile-card { padding: 10px 20px; border-radius: 60px; }
    .avatar-circle { width: 60px; height: 60px; }
    .brand-name { font-size: 1.4rem; }
    .mobile-arrow { display: block; margin-left: auto; }

    .main-content{
        left: 5%;  /* 避開側邊欄 */
        right: 5%; /* 避開對話框 (視你對話框寬度調整) */
        top: 15%;
    }

    .intro-char { font-size: 3.5rem; }
    
    .social-container { 
        margin-top: 15px; 
        background: white; 
        border: 5px solid var(--ui-blue); 
        border-radius: 30px; 
        padding: 25px; 
        box-shadow: 10px 10px 0px rgba(0,0,0,0.05);
        
        /* 動態開關核心邏輯 */
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 0;
        opacity: 0;
        padding: 0;
        border-width: 0;
        margin-top: 0;
    }
    .side-ui.is-open .social-container { 
        max-height: 500px; 
        opacity: 1; 
        padding: 25px; 
        border-width: 5px; 
        margin-top: 15px;
    }
    .side-ui.is-open .mobile-arrow { transform: rotate(360deg); }

    .mega-nav-container { bottom: 20px !important; width: 92%; gap: 10px; }
    .gacha-btn { width: 33%; height: 65px; transform: skewX(-10deg); box-shadow: 4px 4px 0px var(--ui-blue); }
    .btn-inner { transform: skewX(10deg); }
    .btn-en { font-size: 1.1rem; }
    .btn-jp { display: none; }
    .dialogue-box { top: auto; bottom: 120px; left: 5%; right: 5%; max-width: none; border-radius: 20px; padding: 15px; }
}


/* --------------------- */
/* --------------------- */
/* --------------------- */
/* --------------------- */


.textbox {
  background: rgba(255, 255, 255, 0.05); /* 淡淡的底色感 */
  backdrop-filter: blur(3px);
  border-radius: 12px;
  border: 2px solid #3498db;

  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  color: #222;
}

/*美術 相簿 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.thumb {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}
.thumb:hover {
  transform: scale(1.05);
}
.artmodal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;   
  max-height: 90%;  
  width:80%;
  border-radius: 12px;
  z-index: 9999;
  overflow: hidden;  /* 防止內容溢出 modal */
  display: flex;
  flex-direction: column;
}

.modal-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}
.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: black;
  font-size: 2em;
  cursor: pointer;
  z-index: 1005;
  transition: all 0.3s ease;
  
}
.close:hover{
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
	background-color: rgba(255, 255, 255, 0.5);
}

/* Modal 進場動畫 */
@keyframes zoomIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.modal {
  animation: modalFadeIn 0.3s ease;
}
.artmodal {
  animation: modalFadeIn 0.3s ease;
}
/* 影片模組 */

.video-row {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  margin: 20px 0;
}
.video-box {
  flex: 0 0 auto;
  width: 320px;
  height: 180px;
  background: black;
  border-radius: 8px;
}
.video-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  gap: 20px;
}

.video-preview {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}

.video-preview:hover {
  transform: scale(1.02);
}

.video-large {
  width: 100%;
  max-width: 800px;
  height: 450px;
  object-fit: cover;
  border-radius: 10px;
}

/* Modal 全螢幕影片播放 */
.modal-video {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  animation: zoomIn 0.3s ease;
}

/* 影片模組 */
.video-caption {
  margin-top: 10px;
  color: #444;
  font-size:1.3em;
}
.video-caption h4 {
  margin: 0;
  font-size: 1.2em;
  color: #222;
}
.video-caption p {
  font-size: 0.95em;
  margin: 5px 0 0 0;
}
/* 文字模組 */
.text-img {
  max-width: 100%;
  margin: 10px 0;
  border-radius: 8px;
}
.text-block {
  margin-bottom: 20px;
}

.text-title {
  margin: 20px 0 10px 0;
  font-weight: bold;
}
.text-title + p {
  margin-top: 0;
  font-size:1.2em;
}

.text-block p {
  font-size:1.2em;
}


/* 文字按鈕群組 */
.button-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* 按鈕本體 */
.text-button {
  display: inline-block;
  padding: 20px 50px;
  font-size:1.3em;
  background-color: #66ccff;
  color: #111;
  font-weight: bold;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.text-button:hover {
  background-color: #88ddff;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
}

/* 圖片與文字包在 thumb-wrapper，設定 hover 效果 */
.thumb-wrapper {
  transition: transform 0.3s;
}
.thumb-wrapper:hover {
  transform: scale(1.05);
}

/* 讓文字也變淡或消失（可選） */
.thumb-wrapper:hover .thumb-caption {
  color: #66ccff;
  text-shadow: 0 0 5px #000;
}
.modal .thumb-caption {
  display: none;
}

.caption-text {
  margin-top: 12px;
  font-size: 1.1em;
  color: #555;
  line-height: 1.6;
  text-align: center;
  padding: 0 10px;
}

/* */
/* 讓 modal 內的文字框可滾動，且不超過 modal 大小 */
.modal .textbox {
  overflow-y: auto;
  flex-grow: 1;       /* 讓 textbox 填滿 modal 高度剩餘空間 */
  max-height: 100%;
  padding-right: 10px; /* 避免滾動條蓋到文字 */
  box-sizing: border-box;
}

/* 確保 textbox 內的圖片、影片最大寬度與高度不超出容器 */
.textbox img,
.textbox video,
.textbox iframe {
  max-width: 80%;
  max-height: 400px; /* 或依需要調整最大高度 */
  border-radius: 8px;
  display: block;
  margin: 10px auto;
  object-fit: contain;
  cursor: pointer; /* 點擊提示效果 */
}

/* 彈出式文字框標題 */
.thumb-title{
	margin-bottom:3px;
  font-size: 1.2em;
}
.thumb-caption{
	margin-top:0px;
}
/* 讓滾動條更顯眼且美觀（可選） */
.modal .textbox::-webkit-scrollbar {
  width: 8px;
}
.modal .textbox::-webkit-scrollbar-thumb {
  background-color: #66ccff88;
  border-radius: 4px;
}

/* Modal 動畫：淡入+縮放 */
@keyframes modalFadeIn2 {
  0% {
    opacity: 0;
    transform: scale(0.9) translate(-50%, -50%);
  }
  100% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%);
  }
}
.modal {
  animation: modalFadeIn2 0.3s ease;
}

/*彈出式模組縮圖*/
.clickable-preview {
  cursor: pointer;
  border-radius: 10px;
  padding: 5px;
  transition: transform 0.2s;
}
.clickable-preview:hover {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.5);
}
.clickable-preview img.thumb {
  width: 100%;
  border-radius: 8px;
}
.clickable-preview .thumb-title,
.clickable-preview .thumb-caption {
  margin: 5px 0;
  text-align: center;
  transition: color 0.3s, text-shadow 0.3s;
}

/* 這裡放手機版的 CSS 樣式 */
@media screen and (max-width: 768px) {
	.gallery-grid {
	  grid-template-columns: repeat(1, 1fr);
	}

	.modal{
	  max-width: 95%;
	  max-height: 95%;
	  width: 95%;
	}
	
	.navbar ul {
		grid-template-columns: repeat(3, 1fr); /* 每行兩欄，總共兩行 */
	}
	
	.navbar li {
	font-size: 1em;
	}
}


/* 圖片讀取 */

.lazy-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
}

/* Spinner */
.lazy-loading-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(0,0,0,0.2);
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 淡入動畫也可以加上 */
img {
  transition: opacity 0.3s ease;
}
img:not([src]) {
  opacity: 0;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}


/* 網頁切換、輕柔淡入淡出效果 */
.slide-fade-enter-active,
.slide-fade-leave-active {
  transition: all 0.3s ease;
}
.slide-fade-enter-from {
  opacity: 0;
  transform: translateY(20px);
}
.slide-fade-leave-to {
  opacity: 0;
  transform: translateY(-20px);
}
.slide-fade-enter-to,
.slide-fade-leave-from {
  opacity: 1;
  transform: translateY(0);
}




/* ====================== */

.lazy-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f3f3f3;
  border-radius: 6px;
  overflow: hidden;
}

/* Spinner 一樣 */
.lazy-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.lazy-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}