/* ==========================================================================
   1. 字體引入 (Web Fonts)
   ========================================================================== */
@font-face {
  font-family: 'Noto Sans ZH';
  src: url('../fonts/NotoSansTC-Medium.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'Noto Sans JP';
  src: url('../fonts/NotoSansJP-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'Noto Sans';
  src: url('../fonts/NotoSans_Condensed-Regular.ttf') format('truetype');
  font-weight: 400;
}

/* ==========================================================================
   2. 變數設定與重置 (Variables & Reset)
   ========================================================================== */
:root {
  --navy-blue: #071F5D;       
  --accent-blue: #356899;     
  --light-gray: #8892B0;      
  --border-color: #E2E8F0;    
  --text-main: #2D2D2D;       
  --bg-pure-white: #FFFFFF;   
  --bg-hover-gray: #ECEFF1;   
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-pure-white);
  color: var(--text-main);

  font-family: "Noto Sans ZH", "Noto Sans JP", "Noto Sans", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.8;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   3. 網頁佈局 (Layout Wrapper)
   ========================================================================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1080px; 
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------
   第一排：頂部輔助列 (Utility Bar)
   -------------------------------------------------- */
.utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  font-size: 0.8rem;
  color: var(--light-gray);
  border-bottom: 1px solid var(--border-color);
}

.lang-selector {
  display: flex;
  border: 1px solid var(--navy-blue);
  border-radius: 2px;
  overflow: hidden;
}

/* 翻譯格子基礎設定 (0.75rem) */
.lang-btn {
  background: none;
  border: none;
  border-right: 1px solid var(--navy-blue);
  padding: 4px 12px;
  font-size: 0.75rem; 
  color: var(--navy-blue);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lang-btn:last-child {
  border-right: none;
}

/* 翻譯格子選定狀態：維持海軍藍底、白字 */
.lang-btn.active {
  background-color: var(--navy-blue);
  color: var(--bg-pure-white);
}

/* 【修改】翻譯格子 Hover 狀態：非選定項目 Hover 時變海軍藍底、白字 */
.lang-btn:hover:not(.active) {
  background-color: var(--navy-blue);
  color: var(--bg-pure-white);
}

/* --------------------------------------------------
   第二排：主導覽區 (Header & Tohoku Tabs)
   -------------------------------------------------- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}

/* 第一級 h1 姓名改為 1.2em */
.site-title h1 {
  font-size: 1.2em; 
  color: var(--navy-blue);
  font-weight: 700;
  display: inline-block;
}

.site-title .en-sub {
  font-size: 0.85em; 
  font-weight: 400;
  color: var(--light-gray);
  margin-left: 8px;
}

/* Tohoku Tabs 電腦版基礎與對齊設定 */
.tohoku-tabs {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

.tab-item {
  color: var(--navy-blue);
  text-decoration: none;
  font-size: 1.1em; 
  font-weight: 500;
  height: 34px;      /* 精確限制垂直線條與文字等高 */
  line-height: 34px; /* 文字垂直置中 */
  padding: 0 32px;   /* 左右間距 */
  
  /* 拔掉 border-top 與 border-bottom */
  border-top: none;
  border-bottom: none;
  
  /* 將間隔線顏色改為與翻譯格一致的海軍藍 */
  border-right: 1px solid var(--navy-blue); 
  
  transition: all 0.2s ease; 
  display: inline-block;
}

/* 最左側項目補上海軍藍垂直線，確保兩端對稱 */
.tab-item:first-child {
  border-left: 1px solid var(--navy-blue);
}

/* 實際選定（.active）狀態 */
.tab-item.active {
  background-color: var(--bg-hover-gray) !important; 
  color: var(--navy-blue) !important;                
}

/* 滑鼠懸停（Hover）狀態：未選定項目在 Hover 時變成海軍藍底、白字 */
.tab-item:hover:not(.active) {
  background-color: var(--navy-blue); 
  color: var(--bg-pure-white);       
}

/* --------------------------------------------------
   中段橫幅 Block：無固定高度，由 Padding 控制彈性
   -------------------------------------------------- */
.page-title-block {
  background-color: var(--navy-blue);
  padding: 7px 21px;  
  border-radius: 2px; 
  margin-top: 15px;   
  width: 100%;        
  height: auto;       
  display: inline-block; 
}

/* Block 內字體 1.5em */
.current-tab-name {
  font-size: 1.5em;
  color: var(--bg-pure-white);
  font-weight: 500;
  margin: 0;
  line-height: 1.5; 
  letter-spacing: 0.1em;
}

/* --------------------------------------------------
   第三排：主內容兩欄佈局 (Main Content Grid)
   -------------------------------------------------- */
.main-content {
  flex: 1;
  padding-top: 40px;
  padding-bottom: 60px;
}

.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.avatar-container {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--border-color);
  padding: 6px;
  background-color: var(--bg-pure-white);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-card {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.contact-title {
  font-size: 0.95rem;
  color: var(--navy-blue);
  margin-bottom: 12px;
  font-weight: 500;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.contact-label {
  display: block;
  font-weight: 500;
  color: var(--light-gray);
  margin-bottom: 2px;
}

.contact-list a {
  color: var(--navy-blue);
  text-decoration: none;
  border-bottom: 1px dashed var(--light-gray);
  transition: all 0.2s ease;
}

.contact-list a:hover {
  color: var(--accent-blue);
  border-bottom-style: solid;
}

.profile-main {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   4. 第一級與第二級幾何樣式
   ========================================================================== */
.section-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy-blue);
  padding-left: 12px;
  border-left: 3px solid var(--navy-blue);
  margin-top: 32px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.section-title:first-child {
  margin-top: 0;
}

.intro-text, .interests-text {
  color: var(--text-main);
  margin-bottom: 24px;
  text-align: justify;
}

.academic-list {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}

.academic-list li {
  position: relative;
  padding-left: 24px; 
  margin-bottom: 12px;
  color: var(--text-main);
}

.academic-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.9em; 
  transform: translateY(-50%);
  
  width: 6px;
  height: 6px;
  border: 1px solid var(--navy-blue);
  border-radius: 50%;
  background-color: transparent;
}

.news-date {
  font-family: "Noto Sans", sans-serif;
  color: var(--light-gray);
  margin-right: 12px;
}

/* --------------------------------------------------
   第四排：底部欄 (Footer)
   -------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--light-gray);
}

.note-trigger {
  cursor: help;
  border-bottom: 1px dashed var(--light-gray);
  padding-bottom: 2px;
}

/* ==========================================================================
   首頁專屬：非同步差時飄入特效 (Staggered Animations)
   ========================================================================== */

/* 1. 左側欄：向右微移淡入 */
.slide-right {
  opacity: 0; 
  animation: slideRight 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-15px); 
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 2. 右側欄：向上微移淡入 + 延遲 0.15 秒 */
.slide-up-delayed {
  opacity: 0;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(15px); 
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   5. 響應式切版 (RWD) 
   ========================================================================== */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .tohoku-tabs {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .tab-item {
    flex: 1;
    text-align: center;
    padding: 0 16px; 
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .profile-sidebar {
    align-items: center;
    text-align: center;
  }

  .avatar-container {
    max-width: 200px;
  }

  .contact-card {
    border-top: none;
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ==========================================================================
   經歷頁面專屬
   ========================================================================== */
.exp-year {
  font-family: "Noto Sans", sans-serif;
  color: var(--light-gray);
  margin-right: 12px;
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px); 
  }
  to {
    opacity: 1;
    transform: translateY(0);    
  }
}

.exp-item-wrapper {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap; 
  gap: 10px;
}

.organizer-tag {
  display: inline-block;
  border: 1px solid var(--navy-blue);
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 0.75rem; 
  color: var(--navy-blue);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.exp-title {
  color: var(--text-main);
  font-weight: 500;
}

.exp-prize {
  color: var(--navy-blue); 
  font-weight: 600;
  margin-left: 8px; 
}

/* 切換為日、英網頁時的字體回退 */
html[lang="ja"] body {
  font-family: "Noto Sans JP", "Noto Sans", sans-serif;
}

html[lang="en"] body {
  font-family: "Noto Sans", sans-serif;
}

/* ==========================================================================
   日誌頁面專屬 (自適應無圖 / 有圖版面)
   ========================================================================== */
.log-list {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

.log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 24px 0;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  border-bottom: none;
  background-image: radial-gradient(circle, #4d4d4d 1px, transparent 1px);
  background-position: bottom;
  background-size: 4px 3px; 
  background-repeat: repeat-x;
}

.log-item:hover {
  opacity: 0.95;
}

.log-meta-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.log-date {
  font-family: "Noto Sans", sans-serif;
  color: var(--light-gray);
  font-size: 0.9rem;
  line-height: 1;
}

.log-category-tag {
  display: inline-block;
  border: 1px solid var(--navy-blue);
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--navy-blue);
  font-weight: 600;
  line-height: 1;
}

.log-title {
  font-size: 1.15rem;
  color: var(--navy-blue);
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.log-item:hover .log-title {
  color: var(--accent-blue);
}

.log-thumbnail-wrapper {
  width: 180px;
  flex-shrink: 0; 
  aspect-ratio: 16 / 9; 
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover-gray);
}

.log-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease; 
}

.log-item:hover .log-thumbnail {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .log-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
  }
  
  .log-thumbnail-wrapper {
    width: 100%;
    max-width: 320px; 
  }
}

/* ==========================================================================
   東北大風格 11格分頁器 (Pagination Styles)
   ========================================================================== */
.pagination-container {
  display: flex;
  justify-content: flex-end; 
  align-items: center;
  gap: 6px;
}

.pagination-top {
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border-color); 
  padding-bottom: 16px;
}

.pagination-bottom {
  margin-top: 32px;
  padding-top: 16px;
}

.page-btn {
  display: inline-block;
  min-width: 28px;
  height: 28px;
  line-height: 26px;        
  text-align: center;
  font-family: "Noto Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;         
  text-decoration: none;
  border-radius: 2px;       
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.page-btn.num-btn,
.page-btn.nav-btn {
  background-color: var(--navy-blue);
  color: var(--bg-pure-white);
  border: 1px solid var(--navy-blue);
}

.page-btn.num-btn:hover,
.page-btn.nav-btn:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.page-btn.active {
  background-color: transparent;
  color: var(--text-main);
  border: none;
  font-weight: 400;         
  cursor: default;
  pointer-events: none;     
}

.page-btn.nav-btn {
  padding: 0 10px;
  width: auto;
}

/* ==========================================================================
   專案列表專屬：極簡卡片與彈出白框
   ========================================================================== */

/* 1. 專案網格 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* 2. 專案卡片主體 */
.project-card {
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 24px;
  background-color: var(--bg-pure-white);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.project-card:hover {
  border-color: var(--navy-blue);
  transform: translateY(-2px); /* 輕微往上飄，呼應你的日誌 hover 特效 */
  box-shadow: 0 4px 12px rgba(7, 31, 93, 0.05);
}

/* 卡片內專案標題 */
.project-card-title {
  font-size: 1.1rem;
  color: var(--navy-blue);
  font-weight: 600;
  margin-bottom: 12px;
}

/* 卡片內標籤容器 */
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

/* 專案標籤 (單一 tag) */
.project-tag {
  display: inline-block;
  border: 1px solid var(--navy-blue);
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: var(--navy-blue);
  font-weight: 500;
}

/* 卡片底部的日期與狀態 */
.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--light-gray);
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-top: auto;
}

/* 3. 小白框內底部日期資訊 */
.proj-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.8rem;
  color: var(--light-gray);
}

.proj-status {
  font-weight: 600;
  color: var(--navy-blue);
}

/* 小白框內的標題超連結樣式 */
.modal-title-link {
  color: var(--navy-blue);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.modal-title-link:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue); /* hover 時才優雅地浮現底線 */
}

/* ==========================================================================
   動漫清單專屬：極簡展示牆 & 彈出小白框
   ========================================================================== */

/* 1. 動漫網格：自動適應大螢幕，一行至少 4 個，最多 5 個 */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* 2. 動漫卡片主體：鎖定 280x401 漫畫比例 */
.anime-card {
  position: relative;
  aspect-ratio: 280 / 401;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-hover-gray);
  transition: border-color 0.3s ease;
}

.anime-card:hover {
  border-color: var(--navy-blue);
}

/* 3. 封面圖片：平時乾淨，滑鼠懸停放大 */
.anime-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-card:hover .anime-card-cover {
  transform: scale(1.05);
}

/* 4. 滑動白底遮罩：平時藏在底部，滑鼠懸停滑入 */
.anime-card-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 45%; 
  background: rgba(255, 255, 255, 0.96); 
  backdrop-filter: blur(4px);
  padding: 16px 16px 24px 16px; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  transition: bottom 0.55s cubic-bezier(0.16, 1, 0.3, 1); 
  border-top: 1px solid var(--border-color);
}

.anime-card:hover .anime-card-overlay {
  bottom: 0;
}

/* 5. 遮罩內的動漫名稱：限制最多兩行 */
.anime-card-title {
  font-size: 0.95rem;
  color: var(--navy-blue);
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   評分條亮起修正（對齊 anime-loader.js 結構）
   ========================================================================== */
.anime-rating-bar {
  position: absolute;
  bottom: 0; 
  left: 0;   
  width: 100%; 
  height: 6px; 
  background-color: rgba(7, 31, 93, 0.1); 
  display: flex; /* 💡 使用 flex 讓 5 格均勻橫向排開 */
  overflow: hidden;
}

/* 每一個評分格段的基礎設定 */
.rating-segment {
  flex: 1;
  height: 100%;
  background-color: transparent; /* 預設不亮起時為透明，透出背後的淡藍灰色 */
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 💡 當卡片被滑鼠懸停 (hover) 時，有 active 類別的格段才會注入海軍藍亮起！ */
.anime-card:hover .rating-segment.active {
  background-color: var(--navy-blue) !important;
}


/* 7. 心得彈出小白框 (Modal) 覆蓋層 */
.anime-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 31, 93, 0.4); 
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 當 Modal 處於顯示狀態 */
.anime-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* 8. 小白框卡片：精緻極簡學術風 */
.anime-modal-card {
  background-color: var(--bg-pure-white);
  border: 1px solid var(--navy-blue);
  border-radius: 2px;
  width: 90%;
  max-width: 480px;
  padding: 32px;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 10px 30px rgba(7, 31, 93, 0.15);
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.anime-modal-overlay.show .anime-modal-card {
  transform: translateY(0);
}

/* 9. 關閉按鈕 */
.anime-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--navy-blue);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s;
}

.anime-modal-close:hover {
  opacity: 0.7;
}

/* 10. 小白框內文排版 */
.modal-title {
  font-size: 1.25rem;
  color: var(--navy-blue);
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* 標籤容器 */
.modal-genres-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* 類型標籤格子：100% 繼承你的「翻譯格子 / 機構標籤」海軍藍極細格子設計 */
.modal-genre-tag {
  display: inline-block;
  border: 1px solid var(--navy-blue);
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--navy-blue);
  font-weight: 400;
  line-height: 1.2;
}

/* 心得文字區 */
.modal-comment-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.8;
  text-align: justify;
  border-top: 1px dashed var(--border-color);
  padding-top: 16px;
}

/* 首頁個人興趣清單內的動漫連結樣式 */
.interests-link {
  color: var(--navy-blue);
  text-decoration: none;
  border-bottom: 1px dashed var(--navy-blue); 
  transition: all 0.2s ease;
  font-weight: 500;
}

.interests-link:hover {
  color: var(--accent-blue);
  border-bottom-style: solid; 
}

/* ==========================================================================
   動漫牆彈出白框 - 💡 專屬隔離樣式（100% 獨立，絕不影響專案與公用 Footer）
   ========================================================================== */

/* 1. 專屬卡片主體 */
.anime-specific-card {
  background-color: var(--bg-pure-white) !important;
  border: 1px solid var(--navy-blue) !important;
  border-radius: 2px !important;
  width: 90% !important;
  max-width: 760px !important;    /* 💡 擴展到 760px，確保文字與圖片各有足夠空間 */
  padding: 0 !important;          /* 💡 拔除 padding，讓海報 100% 貼邊無框 */
  box-shadow: 0 10px 30px rgba(7, 31, 93, 0.15) !important;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative !important;
  
  display: flex !important;
  flex-direction: row !important; /* 💡 確保橫向左右排列 */
  overflow: hidden !important;    /* 💡 裁切海報超出的圓角 */
}

/* 彈出時的升起動畫 */
.anime-modal-overlay.show .anime-specific-card {
  transform: translateY(0) !important;
}

/* 2. 左側：文字與資訊內容區 */
.anime-specific-card .anime-modal-body {
  flex: 1 !important;
  padding: 48px 32px 32px 32px !important; /* 頂部留 48px 避開左上角的 X 關閉按鈕 */
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  min-width: 0 !important; /* 防止文字過長時擠壓 flex 排版 */
}

/* 3. 右側：海報容器，完美鎖定外面卡片的 280 / 401 比例 */
.anime-specific-card .modal-poster-side {
  width: 280px !important;            /* 💡 牢牢鎖定寬度 280px，不允許被壓縮 */
  aspect-ratio: 280 / 401 !important; /* 💡 完美同步外面方塊的漫畫比例 */
  flex-shrink: 0 !important;          /* 💡 確保寬度不會縮水 */
  background-color: var(--bg-hover-gray) !important;
  border-left: 1px solid var(--border-color) !important; 
}

/* 右側海報本身：完全無邊框、100% 填滿 */
.anime-specific-card .modal-inline-poster {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* 4. 關閉按鈕：定位於白底文字區的左上方 */
.anime-specific-card .left-close {
  position: absolute !important;
  top: 16px !important;
  left: 16px !important; 
  right: auto !important;
  background: none !important;
  border: none !important;
  font-size: 1.8rem !important;
  color: var(--navy-blue) !important; 
  cursor: pointer !important;
  line-height: 1 !important;
  padding: 0 !important;
  z-index: 1010 !important;
}

/* 5. 廠商/年份資訊區排版（精確對齊） */
.anime-specific-card .modal-copyright-metadata {
  margin-top: auto !important; /* 💡 自動將這區塊推到文字區的最下方 */
  padding-top: 16px !important;
  border-top: 1px dashed var(--border-color) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.anime-specific-card .metadata-row {
  display: flex !important;
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
}

/* 💡 鎖定標籤寬度（100px），讓所有冒號與後方資訊完美對齊，不再各高各低 */
.anime-specific-card .meta-label {
  color: var(--light-gray) !important;
  width: 100px !important; 
  flex-shrink: 0 !important;
  font-weight: 500 !important;
}

.anime-specific-card .meta-value {
  color: var(--text-main) !important;
  font-family: "Noto Sans", sans-serif !important;
}

/* 讓版權所有者資訊稍作斜體區隔 */
.anime-specific-card #modal-anime-rights {
  font-style: italic !important;
  font-size: 0.7rem !important;
  color: var(--light-gray) !important;
}

/* 6. 響應式：手機版降級為上下排版（上圖下文） */
@media (max-width: 650px) {
  .anime-specific-card {
    flex-direction: column-reverse !important; 
    max-width: 90% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }
  .anime-specific-card .modal-poster-side {
    width: 100% !important;
    aspect-ratio: 280 / 401 !important; 
    border-left: none !important;
    border-top: 1px solid var(--border-color) !important;
  }
  .anime-specific-card .left-close {
    top: 12px !important;
    left: 12px !important;
  }
}