body {
  font-family: sans-serif;
  margin: 0;
  background: #cdc4e9;
  color: #222;
}

[v-cloak] {
  display: none;
}

/* 全螢幕遮罩 */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #f0f0ff, #d0d0ff);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: 'Exo 2', 'Noto Sans TC', sans-serif;
}

/* 載入動畫區 */
.loader-container {
  text-align: center;
  color: #555;
}

/* Spinner 動畫 */
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #aaa;
  border-top-color: #6666ff;
  border-radius: 50%;
  animation: spin2 1s linear infinite;
  margin-bottom: 15px;
}

/* 旋轉動畫 */
@keyframes spin2 {
  to {
    transform: rotate(360deg);
  }
}

/* 文字樣式 */
#loading-screen p {
  font-size: 1.2em;
  color: #444;
}

/* 頁首整體區域，包含透明背景與內容 */
.header {
  position: relative;
  text-align: center;
  color: white;
  background-image: url('../assets/img/banner.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  padding-top: 40px;
  padding-bottom: 0px;
}

/* 背景遮罩（可選，讓文字比較清晰） */
.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.3); /* 半透明黑色遮罩 */
  z-index: 0;
}

/* 將 header 中內容拉到遮罩之上 */
.header-content {
  position: relative;
  z-index: 1;
}


/* 背景圖 */
.banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px; /* ↑ 從 220px 調整為 300px */
  z-index: 0;
  overflow: hidden;
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: brightness(0.8);
}


/* 放內容的容器：頭像＋SNS＋導覽列 */
.header-content {
  position: relative;
  z-index: 1;
  padding-bottom: 10px;
  text-align: center;
}


/* 頭像區塊 */
.avatar-container {
  margin-bottom: 0px;
}
.avatar {
  width: 300px;
  height: 300px;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 標語文字 */
.title-text {
  margin: 8px 0;
  font-size: 1.1em;
  color:black;
}
.title-text h1{
	margin:0px 0px 10px 0px;
}
.title-text h2{
	margin:0px 0px 10px 0px;
	font-size:1.3em;
}

/* SNS icon 列 */
.sns-icons {
  display: flex;
  flex-wrap: wrap;
  margin:15px 0px 15px 0px;
  gap: 10px;
  justify-content: center;
}

.sns {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #5a5f83;
  border: 1px solid white;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  transform: scale(1);
  width: 150px;
  box-sizing: border-box;
  justify-content: center;
}

.sns img {
  height: 20px;
  filter: brightness(0) invert(1); /* 白色圖示 */
  transition: filter 0.3s ease;
}

.sns span {
  font-size: 18px;
  transition: color 0.3s ease;
}

/* 滑鼠指上去時：背景變白，文字與圖示變黑，並有平滑放大動畫 */
.sns:hover {
  background-color: white;
  color: black;
  transform: scale(1.05);
}

.sns:hover img {
  filter: brightness(0); /* 變黑圖示 */
}

.sns:hover span {
  color: black;
}


/* 語言切換功能 */
.langset select {
  margin-top: 12px;
  width: 120px;
  height: 38px;
  font-size: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #222;
  border: 1px solid #bbb;
  border-radius: 50px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #ffffff;
  cursor: pointer;
  text-align: center;
}

/* 導覽列 */
/* 導覽列容器：橫塊＋上下陰影 */
.navbar {
  background: rgb(114 101 181 / 100%);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 改為 grid 排版 */
.navbar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 預設四欄 */
  width: 100%;
  height: auto; /* 高度由內容撐起 */
}

/* 導覽列按鈕樣式 */
.navbar li {
  text-align: center;
  font-size: 1.3em;
  padding: 15px 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  color: #000000;
  border-bottom: 2px solid transparent;
}

.navbar li:hover {
  color: #66ccff;
  background-color: rgba(0, 0, 0, 0.05);
}

.navbar .active {
  color: #66ccff;
  border-bottom: 2px solid #66ccff;
}

/* 網頁內容 */

.content {
  min-height: 750px;	
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
}


.textbox {
  background: #f7ebff;
  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%);
  background: rgba(34, 34, 34, 0.95);
  max-width: 80%;   
  max-height: 90%;  
  width:80%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
  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;
}


.modal-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  animation: zoomIn 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;
  color: #111;
}
.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;
}
.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;
}
.clickable-preview:hover .thumb-caption {
}

/* 頁尾 */
footer {
      text-align: center;
      background: #151d43;
      color: #fff;
      padding: 1rem;
    }

	  /* 這裡放手機版的 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(2, 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;
}
