/* --- 🎨 全局色彩與設計變數 --- */
:root {
  /* 核心色調：深邃的星空藍與活力的電光紫 */
  --primary-color: #4f46e5; /* 電光紫 */
  --secondary-color: #7c3aed; /* 亮紫色 */
  --accent-color: #0ea5e9; /* 天藍色點綴 */

  /* 功能性色彩 */
  --success-color: #10b981; /* 成功 - 綠色 */
  --warning-color: #f59e0b; /* 警告 - 琥珀色 */
  --error-color: #ef4444; /* 錯誤 - 紅色 */

  /* 背景與表面色彩 */
  --bg-main-start: #111827; /* 主背景 - 深灰藍 */
  --bg-main-end: #0c0c1d; /* 主背景 - 近黑 */
  --surface-color: rgba(30, 41, 59, 0.6); /* 容器背景 - 半透明深藍 */
  --surface-border: rgba(129, 140, 153, 0.2); /* 容器邊框 */
  --surface-glow: rgba(79, 70, 229, 0.3); /* 容器光暈 */

  /* 文字色彩 */
  --text-primary: #f9fafb; /* 主要文字 - 亮白 */
  --text-secondary: #9ca3af; /* 次要文字 - 灰色 */
  --text-accent: var(--accent-color);

  /* 元件樣式 */
  --radius-md: 16px; /* 中等圓角 */
  --radius-lg: 24px; /* 大圓角 */
  --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.25); /* 輝光陰影 */
  --transition-fast: all 0.2s ease-out;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- 🚀 基礎與佈局 --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft JhengHei UI", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(
    145deg,
    var(--bg-main-start) 0%,
    var(--bg-main-end) 100%
  );
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem;
  padding-bottom: 4rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
    padding-bottom: 6rem;
  }

  .container {
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    margin: 0;
    min-height: 100vh;
  }

  .header {
    padding: 2rem 1rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .content {
    padding: 1.5rem 1rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem; /* 恢復正常底部空間 */
  }

  .step-indicator {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: visible;
    padding-bottom: 0.5rem;
  }

  .step-indicator::before {
    display: none;
  }

  .step {
    flex: 1;
    min-width: 0;
    flex-shrink: 1;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .step-text {
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
  }

  .option-grid {
    grid-template-columns: 1fr;
    margin-bottom: 2rem; /* 恢復正常底部間距 */
  }

  .button-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    min-width: unset;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
    border-radius: 0;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .history-item-details {
    grid-template-columns: 1fr;
  }

  .upload-area {
    padding: 2rem;
  }

  .photo-preview {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .preview-item img {
    height: 100px;
  }

  .preview-item .remove-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: 8rem;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .header p {
    font-size: 1rem;
  }

  .content {
    padding: 1rem;
    padding-bottom: 2rem; /* 恢復正常底部空間 */
    padding-top: 1.5rem;
  }

  .step-indicator {
    gap: 0.3rem;
    margin-bottom: 2rem;
  }

  .step {
    flex: 1;
    min-width: 0;
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .step-text {
    font-size: 0.7rem;
  }

  .info-box {
    padding: 1rem;
  }

  .info-title {
    font-size: 1rem;
  }

  .option-grid {
    margin-bottom: 2rem; /* 恢復正常底部間距 */
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .upload-area {
    padding: 1.5rem;
  }

  .upload-icon {
    font-size: 2.5rem;
  }

  .upload-text {
    font-size: 1rem;
  }

  .upload-hint {
    font-size: 0.8rem;
  }

  .photo-preview {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .preview-item img {
    height: 80px;
  }

  .preview-item .remove-btn {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
}

/* --- ✨ 主容器與玻璃擬態效果 --- */
.container {
  width: 100%;
  max-width: 800px;
  background: var(--surface-color);
  backdrop-filter: blur(30px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), var(--shadow-glow);
  overflow: hidden;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 🌌 頁首設計 --- */
.header {
  padding: 3rem 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--surface-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(
    90deg,
    #fbc4ab,
    /* 主色：柔和粉橙 */ #f59f87 30%,
    /* 暗色增加立體陰影 */ #ffd6c4 70%,
    /* 高光區域 */ #f28b6c 100% /* 收尾自然過渡 */
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* --- 🧩 內容區域 --- */
.content {
  padding: 2.5rem;
}

/* --- 🧭 步驟指示器 (進化版) --- */
.step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.step-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--surface-border);
  transform: translateY(-50%);
  z-index: -1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-smooth);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-color);
  border: 2px solid var(--surface-border);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-weight: 700;
  transition: var(--transition-smooth);
  position: relative;
}

.step-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.step.active .step-number,
.step.completed .step-number {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
  transform: scale(1.1);
}

.step.completed .step-number {
  background: var(--success-color);
  border-color: var(--success-color);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.step.active .step-text {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- 📃 表單區塊 --- */
.form-section {
  display: none;
  animation: slideIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.form-section.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

/* --- 💠 卡片選擇 (進化版) --- */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.option-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.option-card.selected {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-color: var(--accent-color);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 15px 40px rgba(79, 70, 229, 0.4);
}

.option-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.option-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.option-card.selected .option-title,
.option-card.selected .option-subtitle {
  color: white;
}

/* 下一個任務提示 */
.next-task-hint {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.next-task-hint i {
  font-size: 0.8rem;
}

.option-card.selected .next-task-hint {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
}

/* --- 🔒 任務鎖定和完成狀態 --- */
.option-card.locked {
  opacity: 0.5;
  filter: grayscale(0.7);
  cursor: not-allowed !important;
}

.option-card.locked:hover {
  transform: none;
  border-color: var(--surface-border);
  box-shadow: none;
}

.option-card.completed {
  opacity: 0.6;
  filter: saturate(0.5);
  cursor: not-allowed !important;
  position: relative;
}

.option-card.completed:hover {
  transform: none;
  border-color: var(--surface-border);
  box-shadow: none;
}

/* 待審核狀態 */
.option-card.pending {
  opacity: 0.85;
  cursor: not-allowed !important;
  position: relative;
  border: 2px solid rgba(240, 147, 251, 0.5);
  animation: pendingPulse 2s ease-in-out infinite;
}

.option-card.pending:hover {
  transform: none;
  border-color: rgba(240, 147, 251, 0.8);
}

@keyframes pendingPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 147, 251, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(240, 147, 251, 0);
  }
}

/* 待審核覆蓋層（大圖示樣式） */
.pending-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  z-index: 10;
  width: 80%;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(240, 147, 251, 0.6);
  box-shadow: 0 8px 24px rgba(240, 147, 251, 0.3);
}

.pending-overlay i {
  display: block;
  font-size: 2.5rem;
  color: #f093fb;
  margin-bottom: 0.75rem;
  animation: clockSpin 3s ease-in-out infinite;
}

@keyframes clockSpin {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(15deg);
  }
  75% {
    transform: rotate(-15deg);
  }
}

/* 已完成覆蓋層（大圖示樣式） */
.completed-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  z-index: 10;
  width: 80%;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.completed-overlay i {
  display: block;
  font-size: 2.5rem;
  color: #10b981;
  margin-bottom: 0.75rem;
  animation: checkBounce 2s ease-in-out infinite;
}

@keyframes checkBounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.lock-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  z-index: 10;
  width: 80%;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(251, 191, 36, 0.5);
}

.lock-hint i {
  display: block;
  font-size: 2.5rem;
  color: #fbbf24;
  margin-bottom: 0.75rem;
  animation: lockShake 2s ease-in-out infinite;
}

@keyframes lockShake {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10%,
  30% {
    transform: rotate(-5deg);
  }
  20%,
  40% {
    transform: rotate(5deg);
  }
}

.completed-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.completed-badge i {
  font-size: 1rem;
}

/* --- � 申請記錄模態框 --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--surface-border);
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.history-search {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.history-search input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1rem;
}

.history-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.history-content {
  min-height: 300px;
}

.history-placeholder {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.history-placeholder i {
  margin-bottom: 1rem;
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.history-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.history-item-status {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-approved {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-paid {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.history-item-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .history-item-details {
    grid-template-columns: 1fr;
  }

  .history-search {
    flex-direction: column;
  }
}

/* --- �🖼️ 檔案上傳區域 --- */
.upload-area {
  border: 2px dashed var(--surface-border);
  border-radius: var(--radius-md);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  background-color: rgba(0, 0, 0, 0.1);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(79, 70, 229, 0.1);
}

.upload-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.upload-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.upload-hint {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.preview-item img {
  width: 100%;
  height: auto; /* 改為自動高度，保持原始比例 */
  object-fit: contain; /* 改為 contain，完整顯示不裁切 */
  display: block;
  min-height: 120px; /* 設置最小高度避免太小 */
  max-height: 300px; /* 設置最大高度避免太大 */
}

.preview-item .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.95);
  backdrop-filter: blur(8px);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.preview-item .remove-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 5px 15px rgba(220, 38, 38, 0.6);
}

.photo-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.photo-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.8);
  backdrop-filter: blur(5px);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: var(--transition-fast);
}
.photo-remove:hover {
  background: var(--error-color);
  transform: scale(1.1);
}

/* --- 🔘 按鈕樣式 --- */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  box-shadow: 0 5px 20px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* --- 📢 通知與資訊框 --- */
.info-box {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid;
  background: rgba(0, 0, 0, 0.15);
}

.info-box.notice {
  border-color: var(--warning-color);
}
.info-box.record {
  border-color: var(--success-color);
}
.info-box.time {
  border-color: var(--accent-color);
}

.info-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-box.notice .info-title {
  color: var(--warning-color);
}
.info-box.record .info-title {
  color: var(--success-color);
}
.info-box.time .info-title {
  color: var(--accent-color);
}

.info-text,
.record-item {
  color: var(--text-secondary);
  line-height: 1.6;
}

.current-time {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.week-info-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.week-info-subtitle::before {
  content: "ℹ️";
  font-size: 1rem;
}

/* 已完成任務數字強調樣式 */
.completed-task-count {
  color: #ef4444 !important;
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
}

.application-notice {
  font-size: 1rem;
  font-weight: 700;
  color: var(--warning-color);
  margin-top: 0.5rem;
}

.record-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.record-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: -3px 0 0 0 var(--primary-color);
}

.record-item:last-child {
  margin-bottom: 0;
}

.status-tag {
  display: inline-flex; /* 讓 icon 與文字水平對齊 */
  align-items: center;
  gap: 5px; /* 縮小 icon 與文字間距 */
  padding: 4px 10px; /* 縮小內距 */
  border-radius: 16px; /* 稍微縮小圓角 */
  font-weight: 600;
  font-size: 0.8rem; /* 縮小字體 */
  border: 1px solid transparent;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05); /* 🌫️ 微陰影讓徽章浮起 */
  transition: all 0.25s ease; /* 💨 漸變過渡 */
  white-space: nowrap; /* 確保不換行 */
}

/* 🟡 審核中 */
.status-pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: #f59e0b;
}
.status-pending i {
  color: #f59e0b;
}

/* 🟦 已審核 */
.status-approved {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: #3b82f6;
}
.status-approved i {
  color: #3b82f6;
}

/* 🟢 已發放 */
.status-success {
  background-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: #22c55e;
}
.status-success i {
  color: #22c55e;
}

/* 🔴 拒絕 */
.status-rejected {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: #ef4444;
}
.status-rejected i {
  color: #ef4444;
}

/* ✨ 小特效：滑鼠懸停時微亮 */
.status-tag:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

/* --- 歷史紀錄表格 --- */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.history-table th,
.history-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--surface-border);
}
.history-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.history-table td {
  color: var(--text-primary);
}
.history-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- ✅ 成功頁面 --- */
.success-section {
  text-align: center;
  padding: 3rem 2rem;
}

.success-icon {
  font-size: 5rem;
  color: var(--success-color);
  line-height: 1;
  margin-bottom: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.success-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--success-color);
  margin-bottom: 1rem;
}

.success-text {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* --- ⚙️ 載入與錯誤 --- */
.loading,
.error-message {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
}
.loading {
  display: none;
}
.loading.show {
  display: block;
}
.error-message {
  display: none;
  background: rgba(239, 68, 68, 0.2);
  color: var(--error-color);
}
.error-message.show {
  display: block;
}

/* --- SweetAlert2 自訂樣式：讓對話框與按鈕與主題一致 --- */
/* � 彈窗主體：深邃星空玻璃感 */
.swal2-popup-custom {
  background: linear-gradient(
    145deg,
    rgba(124, 58, 237, 0.2),
    /* 優雅紫 */ rgba(55, 65, 81, 0.85),
    /* 深暖灰 */ rgba(31, 41, 55, 0.95) /* 深邃灰 */
  );
  backdrop-filter: blur(25px) saturate(140%);
  color: #f1f5f9;
  border: 1.5px solid rgba(156, 163, 175, 0.25);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 50px rgba(124, 58, 237, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 1.2rem 1.6rem;
  max-width: 560px;
  text-align: center;
}

/* 標題 */
.swal2-popup-custom .swal2-title {
  color: #f8fafc;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
}

/* 文字內容 */
.swal2-popup-custom .swal2-html-container {
  color: #e2e8f0;
  margin-top: 0.35rem;
  font-size: 1rem;
}

/* Input 欄位 */
.swal2-popup-custom .swal2-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(156, 163, 175, 0.4);
  padding: 10px 12px;
  border-radius: 12px;
  color: #f8fafc;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
}

/* 驗證訊息 */
.swal2-popup-custom .swal2-validation-message {
  color: #f87171;
  font-weight: 700;
}

/* 圖示 */
.swal2-popup-custom .swal2-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.15);
}
.swal2-popup-custom .swal2-icon.swal2-question {
  color: #a78bfa; /* 柔和紫 */
}
.swal2-popup-custom .swal2-icon.swal2-warning {
  color: #fbbf24; /* 溫暖金 */
  background: rgba(251, 191, 36, 0.15);
}

/* 按鈕：確認 */
.swal2-confirm-custom.btn-primary,
.swal2-confirm-custom.btn-success {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  min-width: 100px;
  max-width: 100%;
  transition: all 0.3s ease;
}
.swal2-confirm-custom.btn-primary:hover,
.swal2-confirm-custom.btn-success:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4);
}

/* 按鈕：取消 */
.swal2-cancel-custom.btn-secondary {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(55, 65, 81, 0.8);
  border: 1px solid rgba(156, 163, 175, 0.4);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  min-width: 80px;
  max-width: 100%;
  transition: all 0.3s ease;
}
.swal2-cancel-custom.btn-secondary:hover {
  background: rgba(55, 65, 81, 0.95);
  border-color: rgba(156, 163, 175, 0.5);
  transform: translateY(-1px);
}

/* 行動裝置與窄螢幕優化 */
@media (max-width: 480px) {
  .swal2-popup-custom {
    width: calc(100% - 2rem);
    margin: 0 1rem;
    padding: 1rem;
    border-radius: 12px;
  }
  .swal2-confirm-custom.btn-primary,
  .swal2-cancel-custom.btn-secondary {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
  }
  .swal2-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
}

/* 調整 SweetAlert2 按鈕容器，讓確定與取消按鈕有更明顯的間距 */
.swal2-actions {
  display: flex;
  gap: 1.2rem; /* 調整按鈕間距 */
  justify-content: center; /* 按鈕置中 */
  align-items: center;
  padding: 1rem 0 0.5rem 0; /* 調整上下內距 */
  width: 100%;
}

/* 如果要讓取消靠左、確定靠右（非常分開），可在呼叫時使用 reverseButtons 或下列類別微調 */

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--surface-border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- 成功頁面動畫 --- */
@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes successBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- 📱 響應式設計 --- */
@media (max-width: 768px) {
  body {
    padding: 1rem;
    padding-bottom: 120px; /* 為固定底部導航留出空間 */
  }
  .content {
    padding: 1.5rem;
    padding-bottom: 2rem; /* 確保內容不被底部導航遮擋 */
  }
  .header {
    padding: 2rem 1.5rem;
  }
  .header h1 {
    font-size: 2rem;
  }
  .step-indicator {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: visible;
  }

  .step {
    flex: 1;
    min-width: 0;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .step-text {
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .button-group {
    position: relative; /* 改為相對定位，不再固定在底部 */
    bottom: auto;
    left: auto;
    right: auto;
    padding: 1rem 0; /* 調整內邊距 */
    background: transparent; /* 移除背景 */
    backdrop-filter: none;
    border-top: none;
    z-index: auto;
    display: flex;
    gap: 1rem;
    margin-top: 2rem; /* 恢復上邊距 */
    box-shadow: none;
  }
  .btn {
    width: 100%;
    flex: 1;
  }
}

/* === 任務選擇器樣式 === */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.option-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(129, 140, 153, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.option-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  opacity: 0;
  transition: var(--transition-smooth);
}

.option-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

.option-card:hover::before {
  opacity: 1;
}

.option-card.selected {
  border-color: var(--accent-color);
  background: rgba(14, 165, 233, 0.15);
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
}

.option-card.task-deposit {
  border-left: 4px solid #3b82f6;
}

.option-card.task-consignment {
  border-left: 4px solid #8b5cf6;
}

.option-card.task-turnover {
  border-left: 4px solid #10b981;
}

.option-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.option-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.option-reward {
  font-size: 1.3rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.5rem;
}

.option-requirement {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 照片上傳區域樣式 */
.upload-area {
  background: rgba(30, 41, 59, 0.4);
  border: 2px dashed rgba(129, 140, 153, 0.3);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-top: 0.5rem;
}

.upload-area:hover {
  border-color: var(--accent-color);
  background: rgba(14, 165, 233, 0.1);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.upload-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.upload-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-item {
  position: relative;
  /* 移除 aspect-ratio: 1; 讓照片以原始比例顯示 */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(129, 140, 153, 0.2);
}

.photo-item img {
  width: 100%;
  height: auto; /* 改為自動高度，保持原始比例 */
  object-fit: contain; /* 改為 contain，完整顯示不裁切 */
  min-height: 120px; /* 設置最小高度 */
  max-height: 300px; /* 設置最大高度 */
}

.photo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 1rem;
}

.photo-remove:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* � 彈窗主體 */
.swal2-popup-custom {
  background: linear-gradient(
    145deg,
    rgba(124, 58, 237, 0.2),
    /* 優雅紫 */ rgba(55, 65, 81, 0.85),
    /* 深暖灰 */ rgba(31, 41, 55, 0.95) /* 深邃灰 */
  ) !important;
  backdrop-filter: blur(25px) saturate(140%);
  border: 1.5px solid rgba(156, 163, 175, 0.25) !important;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(124, 58, 237, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #f1f5f9 !important;
}

/* 標題 */
.swal2-title {
  color: #f8fafc !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 12px rgba(124, 58, 237, 0.4);
}

/* 文字內容 */
.swal2-html-container {
  color: #e2e8f0 !important;
}

/* 確認按鈕 */
.swal2-confirm-custom {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px 28px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.3px !important;
  color: #fff !important;
  transition: var(--transition-fast) !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25);
  min-width: 100px !important;
}
.swal2-confirm-custom:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4) !important;
}

/* 取消按鈕 */
.swal2-cancel-custom {
  background: rgba(55, 65, 81, 0.8) !important;
  border: 1px solid rgba(156, 163, 175, 0.4) !important;
  border-radius: 12px !important;
  padding: 14px 24px !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.2px !important;
  color: #e2e8f0 !important;
  transition: var(--transition-fast) !important;
  min-width: 80px !important;
}
.swal2-cancel-custom:hover {
  background: rgba(55, 65, 81, 0.95) !important;
  border-color: rgba(156, 163, 175, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* ===== 🎁 獎勵徽章樣式 ===== */
.reward-badge {
  padding: 0.25rem 0.7rem; /* 縮小內距 */
  border-radius: 16px; /* 稍微縮小圓角 */
  font-size: 0.75rem; /* 縮小字體 */
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px; /* 縮小間距 */
  border: 1px solid transparent;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
  white-space: nowrap; /* 確保不換行 */
}

/* 獎勵等級顏色 */
/* 💚 超低: 1-99元 */
.reward-tiny {
  background-color: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
  border-color: #9ca3af;
}

/* 💙 低: 168元 */
.reward-low {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: #3b82f6;
}

/* 💚 中: 288元 */
.reward-medium {
  background-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: #22c55e;
}

/* 🧡 高: 388元 */
.reward-high {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: #f59e0b;
}

/* 💜 特高: 688元 */
.reward-super {
  background-color: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: #a855f7;
}

/* 🔴 頂級: 1188元 */
.reward-premium {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.15),
    rgba(245, 158, 11, 0.15)
  );
  color: #f87171;
  border-color: #ef4444;
  font-weight: 800;
}

.reward-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

/* 發光圓點裝飾 */
.reward-badge.with-dot::before {
  content: "";
  width: 5px; /* 縮小圓點 */
  height: 5px; /* 縮小圓點 */
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
}

.reward-tiny.with-dot::before {
  background-color: #6b7280;
}

.reward-low.with-dot::before {
  background-color: #3b82f6;
  box-shadow: 0 0 4px #3b82f6;
}

.reward-medium.with-dot::before {
  background-color: #22c55e;
  box-shadow: 0 0 4px #22c55e;
}

.reward-high.with-dot::before {
  background-color: #f59e0b;
  box-shadow: 0 0 4px #f59e0b;
}

.reward-super.with-dot::before {
  background-color: #a855f7;
  box-shadow: 0 0 4px #a855f7;
}

.reward-premium.with-dot::before {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 0 6px #ef4444;
}

/* ===== 🎮 遊戲化元素樣式 ===== */

/* 任務公告板標題 */
.quest-board-header {
  text-align: center; /* 🎯 置中標題 */
  margin-bottom: 2rem; /* 📏 與下方區塊間距 */
  padding: 1.8rem 2rem; /* 🎁 內距更飽滿 */

  /* 🌈 核心漸層：薰衣粉 → 珍珠藍 → 霧白 */
  background: linear-gradient(
    135deg,
    rgba(255, 183, 255, 0.25),
    rgba(173, 216, 255, 0.28),
    rgba(255, 255, 255, 0.15)
  );

  /* 💧 液態玻璃效果 */
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);

  border-radius: 1.2rem; /* 🧊 柔和圓角 */
  border: 1.5px solid rgba(255, 255, 255, 0.25); /* ✨ 透明邊框 */
  box-shadow: 0 8px 30px rgba(200, 200, 255, 0.25); /* 🌙 柔光投影 */
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

/* 🪶 漂浮感 hover 效果 */
.quest-board-header:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 40px rgba(255, 200, 255, 0.35);
}

/* 🌫️ 流光掃描動畫 */
.quest-board-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: dreamyShine 5s infinite linear;
  pointer-events: none;
}

/* ✨ 微光閃動 */
.quest-board-header::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 200, 255, 0.08),
    transparent 70%
  );
  animation: auraPulse 6s ease-in-out infinite;
}

/* 🔁 流光動畫 */
@keyframes dreamyShine {
  0% {
    left: -150%;
  }
  50% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

/* 💫 呼吸式柔光脈動 */
@keyframes auraPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* 🌌 標題文字（星雲柔光漸層） */
.quest-board-header h3 {
  margin: 0.5rem 0 0.3rem 0;
  font-size: 1.6rem;
  font-weight: 700;

  /* 🎨 金紫藍漸層：更有對比、更有層次 */
  background: linear-gradient(
    90deg,
    #ffdeba,
    /* ✨ 柔金光（暖） */ #c7a4ff,
    /* 💜 薰紫中段 */ #8fd3ff /* 💙 冰藍收尾 */
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  /* 🌫️ 柔光陰影：讓字浮出來 */
  text-shadow: 0 2px 15px rgba(180, 140, 255, 0.4);
  letter-spacing: 0.6px;
  transition: text-shadow 0.4s ease, transform 0.3s ease;
}

/* 🪶 滑過時光暈閃動 */
.quest-board-header h3:hover {
  text-shadow: 0 0 22px rgba(255, 220, 200, 0.6);
  transform: translateY(-2px);
}

/* 💬 副標題（霧金銀混光） */
.quest-board-subtitle {
  font-size: 0.9rem;
  color: #f1e4ff; /* 🌙 霧紫銀光 */
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(255, 230, 200, 0.25);
  letter-spacing: 0.4px;
}

/* 任務類型說明 - 更遊戲化 */
.quest-types-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quest-type-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.quest-type-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(79, 70, 229, 0.3);
  transform: translateX(5px);
}

.quest-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quest-type-item strong {
  font-size: 1rem;
  flex-shrink: 0;
  min-width: 80px;
}

.quest-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* 遊戲化統計網格 */
.game-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* 任務選項卡片增強 */
.task-option,
.option-card {
  position: relative;
  overflow: hidden;
}

.task-option::before,
.option-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.task-option:hover::before,
.option-card:hover::before {
  transform: scaleX(1);
}

/* 任務難度徽章 */
.quest-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.difficulty-common {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  color: white;
}

.difficulty-rare {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.difficulty-epic {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  animation: epicGlow 2s ease-in-out infinite;
}

.difficulty-legendary {
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: white;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.7);
  animation: legendaryGlow 1.5s ease-in-out infinite;
}

@keyframes epicGlow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
  }
}

@keyframes legendaryGlow {
  0%,
  100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.7);
  }
  50% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 1), 0 0 35px rgba(220, 38, 38, 0.7);
  }
}

/* 任務星級 */
.quest-stars {
  font-size: 0.875rem;
  margin: 0.25rem 0 0.5rem 0;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.6));
}

/* 增強獎勵和需求顯示 */
.option-reward,
.option-requirement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.option-reward strong {
  color: #fbbf24;
  font-size: 1.1rem;
}

.option-requirement {
  color: var(--text-secondary);
}

/* 下一個任務提示增強 */
.next-task-hint {
  margin-top: 1rem;
  padding: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1),
    rgba(5, 150, 105, 0.1)
  );
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.next-task-hint i {
  animation: bounceRight 1.5s ease-in-out infinite;
}

@keyframes bounceRight {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

/* 任務完成動畫 */
@keyframes questComplete {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.quest-completed {
  animation: questComplete 0.5s ease;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .quest-board-header h3 {
    font-size: 1.25rem;
  }

  .quest-type-item {
    flex-wrap: wrap;
  }

  .quest-type-item strong {
    min-width: auto;
  }
}
