/* 1. 彈窗主容器：強制雙欄佈局 */
.modal-layout-v2 {
  display: flex;
  flex-direction: row; /* 強制橫向排列[cite: 32] */
  gap: 30px;
  height: 100%;
  overflow: hidden; /* 防止外層滾動[cite: 29] */
}
/* 一般投稿：牌組圖片只顯示左側 70%，右側 30% 隱藏，但卡片大小不變 */
#common-deck-list .deck-image-container {
  overflow: hidden;
  position: relative;
}

#common-deck-list .deck-image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% / 0.8);
  height: calc(100% / 0.75);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: translate(-50%, -50%);
}
/* 2. 左側：圖片與心得區 (佔 1.2 比例)[cite: 29, 32] */
.modal-left-content {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 讓圖片與心得可以獨立滾動[cite: 12] */
  padding-right: 15px;
  min-height: 0; /* 關鍵：flex 子層要能正確收縮，捲動才會生效 */
}

/* 圖片顯示區：限制最大高度，圖片本身依比例縮小，不裁切 */
.modal-img-area-v2 {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: #000;
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow-red);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0; /* 不要被壓縮，維持原本的圖片顯示比例 */
}

#m-img {
  width: 70%;
  height: auto;
  max-height: 480px;
  display: block;
  object-fit: contain; /* 確保圖片不變形[cite: 15] */
}

/* 3. 右側：評論區 (佔 0.8 比例)[cite: 29, 32] */
.modal-right-comments {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  padding-left: 20px;
  position: relative; /* 為了懸浮按鈕固定[cite: 29] */
}

.comment-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px; /* 為按鈕留空間[cite: 29] */
}

/* 評論項目樣式[cite: 29] */
.comment-item {
  background: var(--bg-elevated);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
  border-left: 4px solid var(--text-low);
}

.comment-item.pro {
  border-left-color: var(--color-primary);
  background: rgba(230, 57, 70, 0.05);
}

/* 4. 右下角懸浮按鈕[cite: 29] */
.float-comment-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--gradient-lava);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow-glow-red);
}

/* 5. 手機版適配：切換為垂直排列[cite: 16] */
@media (max-width: 1000px) {
  .modal-layout-v2 {
    flex-direction: column;
  }
  .modal-right-comments {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding-left: 0;
    padding-top: 20px;
    height: 400px; /* 手機版給予固定高度 */
  }
}
/* 暱稱彈窗美化 */
.nickname-card {
  max-width: 380px !important;
  padding: 40px !important;
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-glow-red) !important;
  text-align: center;
}
.lava-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}
.nickname-card h2 {
  color: var(--color-primary);
  margin-bottom: 10px;
}
.nickname-card .warning {
  font-size: 0.8rem;
  color: #ff8c42;
}

.input-group {
  margin: 25px 0;
}
#new-nickname {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  transition: 0.3s;
}
#new-nickname:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.3);
}

.btn-confirm-lava {
  width: 100%;
  padding: 12px;
  background: var(--gradient-lava);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.btn-confirm-lava:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

/* 評論輸入框樣式 */
.comment-input-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}
.comment-user-info {
  font-size: 0.85rem;
  color: var(--color-secondary);
  margin-bottom: 8px;
  font-weight: bold;
}
.comment-flex {
  display: flex;
  gap: 10px;
}
#comment-text {
  flex: 1;
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: white;
  resize: none;
}
.btn-send-comment {
  background: var(--color-primary);
  border: none;
  border-radius: 6px;
  padding: 0 15px;
  color: white;
  cursor: pointer;
}
/* 主播銳評專用樣式[cite: 12] */
.comment-item.pro {
  border-left: 5px solid #ffcc00; /* 金色邊框 */
  background: rgba(255, 204, 0, 0.1) !important;
  position: relative;
  order: -1; /* 確保 Flex 佈局中置頂 */
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.crown {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 5px rgba(255, 204, 0, 0.5));
}

.pro-tag {
  background: #ffcc00;
  color: #000;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

/* 1. 容器定位：讓它出現在評論區右下角 */
.comment-action-container {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
  margin-top: auto;
}

/* 2. 魔法：將 Google 藍色按鈕濾鏡成紅色/橙色調 */
#google-login-btn-official {
  filter: hue-rotate(150deg) saturate(1.5) brightness(1.1); /* 藍色旋轉 150 度會變成橘紅色 */
  box-shadow: var(--shadow-glow-red);
  border-radius: 30px;
  overflow: hidden;
  transition: 0.3s ease;
}

#google-login-btn-official:hover {
  transform: scale(1.05);
  filter: hue-rotate(150deg) saturate(2) brightness(1.2);
}

/* 3. 確保評論清單留出空間給按鈕 */
.comment-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}
/* 按鈕區塊容器 */
.comment-auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 20px;
}

/* 自訂提示標籤：繼承 Lava 風格 */
.comment-hint-tag {
  background: var(--gradient-lava);
  color: white;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: var(--shadow-glow-red);
  animation: pulse 2s infinite; /* 呼吸燈效果吸引注意 */
}

/* 修正 Google 按鈕色調 */
#google-login-btn-official {
  filter: hue-rotate(150deg) saturate(1.2);
  box-shadow: var(--shadow-glow-red);
  border-radius: 30px;
  transition: 0.3s;
}

#google-login-btn-official:hover {
  transform: scale(1.02);
}

@keyframes pulse {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}
.tag-icon {
  width: 28px;
  aspect-ratio: 344 / 221;
  border-radius: 2px;
  background-repeat: no-repeat;
  background-size: 118.6% 258.8%;
  background-position: 50% 25.07%;
  flex-shrink: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.3);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  cursor: pointer;
}
/* 一般評論 */
.comment-item {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  color: #fff;
}

/* ⭐ 主播評論（置頂） */
.comment-item.pro-review {
  background: linear-gradient(90deg, #3a2f00, #2a2100);
  border: 2px solid gold;
}

/* header */
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* 皇冠 */
.crown {
  font-size: 18px;
}

/* 暱稱 */
.nickname {
  color: #ffb347;
  font-weight: bold;
}

/* 標籤 */
.pro-badge {
  background: gold;
  color: #000;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
}

/* 內容 */
.comment-content {
  font-size: 14px;
}
