/* ==========================================================================
   福委會趣味競賽 - 新聞電視風格專屬樣式 (Newsroom Theme & RWD)
   ========================================================================== */

:root {
  --news-red: #dc2626;
  --news-red-light: #fee2e2;
  --news-dark: #0f172a;
  --news-blue: #1e3a8a;
  --news-gold: #f59e0b;
  --news-gold-light: #fef3c7;
  --news-green: #059669;
  --news-green-light: #d1fae5;
  --news-bg: #f8fafc;
  --card-bg: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--news-bg);
  color: #1e293b;
  overflow-x: hidden;
}

/* 跑馬燈平滑滾動 */
.news-ticker-container {
  display: flex;
  overflow: hidden;
  user-select: none;
}
.news-ticker-content {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
  animation: ticker-slide 28s linear infinite;
}
.news-ticker-container:hover .news-ticker-content {
  animation-play-state: paused;
}
@keyframes ticker-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* LIVE 呼吸紅點 */
.live-dot {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ef4444;
  border-radius: 50%;
}
.live-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  animation: pulse-ring 1.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* 新聞標題底線裝飾 */
.news-heading-deco {
  position: relative;
  display: inline-block;
}
.news-heading-deco::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #f59e0b 60%, transparent 100%);
  border-radius: 2px;
}

/* 報紙質感微立體卡片 */
.news-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}
.news-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

/* 加分發光徽章 */
.bonus-tag-active {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1.5px solid #10b981;
  color: #065f46;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  animation: bonus-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes bonus-pop {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* 減秒大數字跳動 */
.time-saved-glow {
  text-shadow: 0 2px 10px rgba(220, 38, 38, 0.2);
}

/* 模態視窗通用動畫 */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}
.modal-sheet {
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 手機底部抽屜模式 (Mobile friendly) */
@media (max-width: 768px) {
  .mobile-sheet-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(0);
    animation: mobile-slide-up 0.28s ease-out;
  }
  @keyframes mobile-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* 自訂滾動條 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
