/* work_panel.css — 主目錄底部工作進度面板 */

.work-panel {
  max-width: 1280px;
  margin: 40px auto 20px;
  padding: 0 20px;
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.wp-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  margin-bottom: 20px;
  padding-left: 8px;
}

.wp-title-emoji {
  font-size: 32px;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, .8));
}

.wp-section {
  margin-bottom: 24px;
}

.wp-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 12px;
}

.wp-section-label.active {
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-color: #fbbf24;
  color: #fff;
  box-shadow: 0 0 24px rgba(239, 68, 68, .6);
  animation: wp-label-glow 1.4s ease-in-out infinite;
}

.wp-section-label.queue {
  background: rgba(59, 130, 246, .25);
  border-color: #60a5fa;
  color: #dbeafe;
}

.wp-section-label.done {
  background: rgba(16, 185, 129, .25);
  border-color: #34d399;
  color: #d1fae5;
}

@keyframes wp-label-glow {
  0%, 100% { box-shadow: 0 0 16px rgba(239, 68, 68, .5); }
  50% { box-shadow: 0 0 36px rgba(239, 68, 68, .9), 0 0 60px rgba(251, 191, 36, .5); }
}

.wp-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: rgba(15, 23, 42, .85);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 8px;
  transition: transform .2s ease, background .2s ease;
}

.wp-card:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, .95);
}

.wp-card-icon {
  flex-shrink: 0;
  font-size: 36px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  border-radius: 12px;
}

.wp-card-body {
  flex: 1;
  min-width: 0;
}

.wp-card-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.wp-card-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  word-break: break-all;
}

.wp-card-timer {
  flex-shrink: 0;
  text-align: right;
  min-width: 110px;
}

.wp-timer-label {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.wp-timer-value {
  font-family: "SF Mono", "JetBrains Mono", Monaco, monospace;
  font-size: 22px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 1px;
}

.wp-card-link {
  font-size: 12px;
  color: #60a5fa;
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
  word-break: break-all;
}
.wp-card-link:hover { color: #93c5fd; }

/* ====== in_progress 閃爍 ====== */
.wp-card.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, .25), rgba(251, 191, 36, .15));
  border: 2px solid #fbbf24;
  animation: wp-card-blink 1.4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.wp-card.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, .15), transparent);
  animation: wp-card-shimmer 2.5s linear infinite;
  pointer-events: none;
}

@keyframes wp-card-blink {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, .7), 0 4px 20px rgba(0, 0, 0, .4);
    border-color: #fbbf24;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0), 0 4px 30px rgba(251, 191, 36, .6);
    border-color: #ef4444;
  }
}

@keyframes wp-card-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.wp-card.active .wp-card-icon {
  background: linear-gradient(135deg, #ef4444, #f97316);
  animation: wp-icon-spin 3s linear infinite;
  color: #fff;
}

@keyframes wp-icon-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.wp-card.active .wp-timer-value {
  color: #fff;
  text-shadow: 0 0 16px rgba(251, 191, 36, .9);
  animation: wp-timer-pulse 1s ease-in-out infinite;
}

@keyframes wp-timer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ====== queue / done ====== */
.wp-card.queue {
  background: rgba(30, 41, 59, .6);
  border-style: dashed;
  border-color: rgba(96, 165, 250, .4);
  opacity: .85;
}
.wp-card.queue .wp-card-icon {
  background: rgba(96, 165, 250, .15);
  color: #93c5fd;
}

.wp-card.done {
  background: rgba(6, 78, 59, .35);
  border-color: rgba(52, 211, 153, .4);
  opacity: .85;
}
.wp-card.done .wp-card-icon {
  background: rgba(52, 211, 153, .2);
  color: #6ee7b7;
}
.wp-card.done .wp-timer-value {
  color: #6ee7b7;
  font-size: 14px;
}

.wp-empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 12px 18px;
  font-style: italic;
}

.wp-updated {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin-top: 12px;
}

/* iPad / 手機 適配 */
@media (max-width: 768px) {
  .work-panel { padding: 0 12px; margin-top: 24px; }
  .wp-title { font-size: 20px; }
  .wp-card { padding: 12px 14px; flex-wrap: wrap; }
  .wp-card-icon { width: 44px; height: 44px; font-size: 28px; }
  .wp-card-title { font-size: 15px; }
  .wp-card-desc { font-size: 12px; }
  .wp-card-timer { min-width: 80px; }
  .wp-timer-value { font-size: 18px; }
}
