/* nura-vt.css: page-specific styles (shared nav/footer live in ../site.css) */

/*影片位置調整*/
  @media (max-width: 768px) {
    .video-top-spacing {
    margin-top: 110px;
}
    }

/*人設區*/
.banner-strip {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #ffbacc;
  height: 800px;
  overflow: hidden;
}

.banner-image {
  flex: 1;
  max-width: 50%;
  overflow: hidden;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 20px;
  box-sizing: border-box;
}

.banner-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 從頂部開始排列 */
  color: rgb(255, 255, 255);
}

/* text-block 容器樣式 */
.text-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  /* 移除任何可能影響排版的屬性 */
}

/* 標題樣式 - 使用 data-key 屬性選擇器 */
div[data-key="VTtitle"] { /* 修改了選擇器 */
    display: block;
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-align: left;
    flex-shrink: 0; /* 防止標題被壓縮 */
}

/* 內文樣式 - 使用 data-key 屬性選擇器 */
div[data-key="VTcontent"] { /* 修改了選擇器 */
    display: block;
    font-size: 22px !important;
    font-weight: 400 !important;
    color: #f0f0f0;
    line-height: 2;
    max-width: 1000px;
    text-align: left;
    overflow-y: none; /* 如果內容太多可以滾動 */
}

/* 響應式設計 - 手機版調整 */
@media (max-width: 768px) {
    .banner-strip {
        flex-direction: column;
        height: auto;
    }
    
    .banner-image {
        max-width: 100%;
        height: 300px;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    div[data-key="VTtitle"] { 
        font-size: 1.6rem;
        text-align: center;
    }
    
    div[data-key="VTcontent"] { 
        font-size: 1rem;
        margin-bottom: 30px;
        text-align: center;
    }
}

/* 滾動觸發動畫效果 */
div[data-key="VTtitle"], 
div[data-key="VTcontent"] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

/* 當元素進入視窗時的動畫狀態 */
div[data-key="VTtitle"].animate, 
div[data-key="VTcontent"].animate {
  opacity: 1;
  transform: translateY(0);
}

/* 為內文添加延遲效果 */
div[data-key="VTcontent"].animate {
  transition-delay: 0.3s;
}
/*人設區結束*/

/*漫畫區開始*/
  /* 橫幅區塊樣式 */
  .comic { /* 將 .banner 替換為 .comic */
    background-color: #ffffff; /* 預設底色：鮮綠色 */
    padding: 20px 0; /* 上下內距，左右為0 */
    text-align: center; /* 文字水平置中 */
    margin-top: 30px;
   }

   /* 橫幅文字樣式 */
  .comic-text { /* 將 .banner-text 替換為 .comic-text */
     color: rgb(216, 48, 140);
    font-size: 48px !important;
    font-weight: 500 !important; /* 文字加粗 */
     margin: 0; /* 移除預設的段落外距 */
  }
.comic-thumbnails {
    display: flex;
    align-items: center;
    perspective: 1000px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 30px 20px 40px 20px; /* 上右下左 */
    box-sizing: border-box;
    z-index: 1;
}

.thumbnail-card {
    /* 縮圖改用 <button>（可用鍵盤操作），先清掉按鈕預設外觀 */
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    position: relative;
    width: 150px;
    height: 200px;
    margin-right: 10px;
    display: inline-block;
    transition: transform 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1;
}

.thumbnail-card:hover {
    transform: translateY(-20px) scale(1.1);
    z-index: 10;
}

.thumbnail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 為了讓滾動條更好看*/
.comic-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.comic-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.comic-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.comic-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 漫畫閱覽器：原生 <dialog>，開啟時佔滿整個畫面 */
.comic-viewer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background-color: rgba(0, 0, 0, 0.9); /* 半透明黑色背景 */
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.comic-viewer[open] {
    display: flex;
}

.comic-viewer::backdrop {
    background: transparent;
}

.viewer-content {
    display: flex;
    gap: 20px; /* 兩頁之間的間距 */
    max-width: 90%; /* 限制閱覽寬度 */
    max-height: 90%; /* 限制閱覽高度 */
    justify-content: center;
    align-items: center;
}

.viewer-content img {
    max-width: 48%; /* 讓兩頁各佔約一半寬度 */
    max-height: 100%;
    object-fit: contain; /* 保持圖片比例 */
    cursor: pointer; /* 表示可點擊 */
}

/* 手機樣式 */
@media (max-width: 767px) {
    .comic-thumbnails {
        padding: 10px;
        /* 可選：為了讓滾動更流暢，可以啟用滾動吸附 */
        scroll-snap-type: x mandatory;
    }

    .thumbnail-card {
        width: 120px; /* 調整卡片寬度，讓幾張卡片可以並列顯示並滑動 */
        height: 160px; /* 保持比例 */
        margin-right: 10px; /* 間距 */
        flex-shrink: 0; /* 防止卡片在 flex 容器中縮小 */
        /* 可選：滾動吸附到卡片邊緣 */
        scroll-snap-align: start;
    }

    .thumbnail-card:hover {
        /* 在觸控裝置上禁用 hover 效果，避免不預期的行為 */
        transform: none;
        z-index: 1;
    }

    .viewer-content {
        flex-direction: row; /* 保持橫向排列，但因為只顯示一頁，會自動居中 */
        gap: 0; /* 單頁模式下移除間距 */
        max-width: 100%; /* 最大化閱覽內容寬度 */
        max-height: 100%; /* 最大化閱覽內容高度 */
    }

    .viewer-content img {
        max-width: 95%; /* 讓單張圖片佔據螢幕大部分寬度 */
        max-height: 95%;
        object-fit: contain;
    }
}

/* 平板樣式 (可選，保持原有設置或根據需要調整) */
@media (min-width: 768px) and (max-width: 1023px) {
    .thumbnail-card {
        width: 120px;
        height: 160px;
    }
}
