:root {
  /* Moda 設計系統 - 日間模式 */
  --md-primary-1: #6868ac;
  --md-primary-2: rgba(104, 104, 172, 0.89);
  --md-primary-3: #4e4e81;
  --md-primary-4: #a4a4cd;
  --md-primary-5: #dbdbeb;
  --md-secondary-1: #565e62;
  --md-secondary-2: #6E777C;
  --md-secondary-3: #7b868c;
  --md-secondary-4: rgba(115, 125, 130, 0.5);
  --md-neutral-1: #1a1a1a;
  --md-neutral-2: #3e4346;
  --md-neutral-3: #4d4d4d;
  --md-neutral-4: gray;
  --md-neutral-5: #b3b3b3;
  --md-neutral-6: #ccc;
  --md-neutral-7: #e5e5e5;
  --md-neutral-8: #edf0f1;
  --md-neutral-9: #f3f5f6;
  --md-neutral-10: #f4f6f7;
  --md-neutral-11: #c7dedf;
  --md-neutral-12: #a2c8c9;
  --md-neutral-15: #666;
  --md-white-1: #fff;
  --md-white-2: rgba(255, 255, 255, 0.5);
  --md-black-1: #000;

  /* Moda 現代配色系統 */
  --brand: #6968ac;
  --brand-strong: #03429c;
  --on-brand: #ffffff;
  --brand-flat: #d8e2ff;
  --brand-flat-strong: #afc6ff;
  --on-brand-flat: #001847;
  --accent: #705d00;
  --accent-strong: #554600;
  --on-accent: #ffffff;
  --accent-flat: #ffe25b;
  --accent-flat-strong: #e7c400;
  --on-accent-flat: #221b00;
  --positive: #286b2a;
  --positive-strong: #085314;
  --on-positive: #ffffff;
  --positive-flat: #acf5a3;
  --positive-flat-strong: #90d889;
  --on-positive-flat: #012104;
  --negative: #ba1b1b;
  --negative-strong: #930006;
  --on-negative: #ffffff;
  --negative-flat: #ffdad4;
  --negative-flat-strong: #ffb4a9;
  --on-negative-flat: #410001;
  --information: #006687;
  --information-strong: #004d67;
  --on-information: #ffffff;
  --information-flat: #bee8ff;
  --information-flat-strong: #6bd2ff;
  --on-information-flat: #001e2b;
  --warning: #a53d00;
  --warning-strong: #7d2c00;
  --on-warning: #ffffff;
  --warning-flat: #ffdbcb;
  --warning-flat-strong: #ffb593;
  --on-warning-flat: #360f00;
  --surface: #fdfbff;
  --surface-1: #F0F5F6;
  --surface-2: #EAF0F3;
  --surface-3: #E3EBF1;
  --surface-4: #E1E9F1;
  --surface-5: #DDE6EF;
  --on-surface: #191C1B;
  --surface-variant: #E2E2EC;
  --on-surface-variant: #44464E;
  --outline: #d0d1d3;
  --background: #FAFDF9;
  --on-background: #191C1B;

  /* 日間模式映射 */
  --primary-color-light: var(--brand);
  --primary-darker-light: var(--brand-strong);
  --secondary-color-light: var(--background);
  --accent-color-light: var(--accent-flat-strong);
  --accent-color-hover-light: var(--accent);
  --text-dark-light: var(--on-background);
  --text-light-light: var(--on-brand);
  --text-muted-light: var(--md-secondary-1);
  --card-bg-light: var(--surface);
  --input-border-light: var(--outline);
  --input-focus-border-light: var(--brand);
  --input-focus-shadow-light: rgba(105, 104, 172, .25);

  /* 夜間模式映射 */
  --primary-color-dark: var(--brand-flat);
  --primary-darker-dark: var(--brand-flat-strong);
  --secondary-color-dark: var(--md-neutral-1);
  --accent-color-dark: var(--accent-flat);
  --accent-color-hover-dark: var(--accent-flat-strong);
  --text-dark-dark: var(--md-white-1);
  --text-light-dark: var(--md-black-1);
  --text-muted-dark: var(--md-neutral-5);
  --card-bg-dark: var(--md-neutral-2);
  --input-border-dark: var(--md-neutral-3);
  --input-focus-border-dark: var(--accent-flat);
  --input-focus-shadow-dark: rgba(231, 196, 0, .25);

  --accent-red: var(--negative);

  --font-body: 'Noto Sans', 'Noto Sans TC', sans-serif;
  --font-heading: 'Noto Sans', 'Noto Sans TC', sans-serif;
  --border-radius-sm: .25rem;
  --border-radius-md: .5rem;
  --border-radius-lg: 1rem;
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);

  /* 初始主題變數 (會被 JS 切換) */
  --current-primary: var(--primary-color-light);
  --current-primary-darker: var(--primary-darker-light);
  --current-secondary: var(--secondary-color-light);
  --current-accent: var(--accent-color-light);
  --current-accent-hover: var(--accent-color-hover-light);
  --current-text-dark: var(--text-dark-light);
  --current-text-light: var(--text-light-light);
  --current-text-muted: var(--text-muted-light);
  --current-card-bg: var(--card-bg-light);
  --current-input-border: var(--input-border-light);
  --current-input-focus-border: var(--input-focus-border-light);
  --current-input-focus-shadow: var(--input-focus-shadow-light);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background-color: var(--current-secondary);
  color: var(--current-text-dark);
  line-height: 1.6;
  padding-top: 20px;
  padding-bottom: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes backgroundFlash {
  0% { background-color: var(--current-secondary); }
  30% { background-color: var(--current-accent); filter: brightness(1.2); } /* Brighter flash */
  70% { background-color: var(--current-accent); filter: brightness(1.2); }
  100% { background-color: var(--current-secondary); filter: brightness(1); }
}

.flash-background {
  animation: backgroundFlash 0.4s ease-in-out; /* Slightly longer duration */
}

body.dark {
  --current-primary: var(--primary-color-dark);
  --current-primary-darker: var(--primary-darker-dark);
  --current-secondary: var(--secondary-color-dark);
  --current-accent: var(--accent-color-dark);
  --current-accent-hover: var(--accent-color-hover-dark);
  --current-text-dark: var(--text-dark-dark);
  --current-text-light: var(--text-light-dark);
  --current-text-muted: var(--text-muted-dark);
  --current-card-bg: var(--card-bg-dark);
  --current-input-border: var(--input-border-dark);
  --current-input-focus-border: var(--input-focus-border-dark);
  --current-input-focus-shadow: var(--input-focus-shadow-dark);
}

.app-header {
  background: linear-gradient(135deg, var(--current-primary) 0%, var(--current-primary-darker) 100%);
  color: var(--current-text-light);
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(105, 104, 172, 0.3);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.app-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-icon {
  font-size: 2rem;
  vertical-align: middle;
}

.section-title {
  font-family: var(--font-heading);
  color: var(--current-primary-darker);
  font-size: 2rem;
  margin-bottom: 1.5rem !important;
  font-weight: 400;
  letter-spacing: 0.3px;
}
.section-title-sm {
  font-family: var(--font-heading);
  color: var(--current-primary-darker);
  font-size: 1.5rem;
  font-weight: 700; /* 加粗標題 */
}

.card {
  border-radius: 16px;
  border: 1px solid var(--current-input-border);
  background-color: var(--current-card-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-body {
  padding: 1.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--current-primary);
  font-size: 0.875rem;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--current-input-border);
  background-color: var(--current-card-bg);
  color: var(--current-text-dark);
  font-weight: 300;
  padding: 0.75rem 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus, .form-select:focus {
  border-color: var(--current-input-focus-border);
  box-shadow: 0 0 0 3px var(--current-input-focus-shadow);
  outline: none;
  background-color: var(--current-card-bg);
}

.btn {
  border-radius: var(--border-radius-sm);
  font-weight: bold;
  padding: .5rem 1rem;
  transition: transform .2s ease-out, box-shadow .2s ease-out, background-color .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0px);
  box-shadow: var(--shadow-sm);
}

.btn-draw {
  background: linear-gradient(135deg, var(--current-accent) 0%, var(--current-accent-hover) 100%);
  border-color: var(--current-accent);
  color: var(--on-accent);
  font-size: 1.35rem;
  font-weight: 500;
  padding: .85rem 2.2rem;
  box-shadow: 0 8px 24px rgba(231, 196, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.1);
  text-shadow: none;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.btn-draw:hover {
  background: linear-gradient(135deg, var(--current-accent-hover) 0%, var(--current-accent) 100%);
  border-color: var(--current-accent-hover);
  box-shadow: 0 12px 32px rgba(231, 196, 0, 0.4), 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px) scale(1.02);
}

.btn-clear-history {
  background: linear-gradient(135deg, var(--negative) 0%, var(--negative-strong) 100%);
  border-color: var(--negative);
  color: var(--on-negative);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-clear-history:hover {
  background: linear-gradient(135deg, var(--negative-strong) 0%, var(--negative) 100%);
  border-color: var(--negative-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(186, 27, 27, 0.3);
}

#participantCount, #repeatHelp, .small {
  font-size: 0.875em;
  color: var(--current-text-muted);
}

/* Winner Card Styling */
.winner-card {
  opacity: 0;
  transform: scale(0.8);
  animation: popIn 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.3) rotate(-20deg) translateY(50px); }
  70% { opacity: 1; transform: scale(1.1) rotate(5deg) translateY(-10px); }
  100% { opacity: 1; transform: scale(1) rotate(0deg) translateY(0px); }
}

/* Animation for winner name text */
@keyframes winnerNameFlash {
  0%, 100% { text-shadow: 1px 1px 0px var(--current-primary-darker), 2px 2px 0px var(--current-primary-darker), 3px 3px 3px rgba(0,0,0,0.3); opacity: 1; }
  50% { text-shadow: 0 0 10px var(--current-accent), 0 0 20px var(--current-accent), 1px 1px 0px var(--current-primary-darker); opacity: 0.8; transform: scale(1.05); }
}

.highlight-winner .card-body {
  background: linear-gradient(135deg, var(--current-accent) 0%, var(--current-primary) 50%, var(--current-primary-darker) 100%);
  border: 3px solid var(--current-card-bg);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(105, 104, 172, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  animation: pulseWinnerBorder 1.5s infinite, subtleTilt 10s infinite alternate ease-in-out;
  position: relative;
  overflow: hidden;
  text-align: center;
  backdrop-filter: blur(10px);
}

.highlight-winner .card-body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFFFFF' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 0;
}

@keyframes pulseWinnerBorder {
  0% { border-color: var(--current-text-light); box-shadow: 0 12px 24px rgba(0,0,0,0.3), 0 0 5px var(--current-text-light), 0 0 10px var(--current-text-light), 0 0 15px var(--current-accent), 0 0 20px var(--current-accent); }
  50% { border-color: var(--current-accent); box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 10px var(--current-text-light), 0 0 15px var(--current-accent), 0 0 20px var(--current-primary), 0 0 25px var(--current-primary); }
  100% { border-color: var(--current-text-light); box-shadow: 0 12px 24px rgba(0,0,0,0.3), 0 0 5px var(--current-text-light), 0 0 10px var(--current-text-light), 0 0 15px var(--current-accent), 0 0 20px var(--current-accent); }
}

@keyframes subtleTilt {
  0% { transform: rotate(-1deg) scale(1); }
  100% { transform: rotate(1deg) scale(1); }
}

.highlight-winner .card-title {
  font-family: var(--font-heading);
  color: #FFFFFF;
  font-size: 2.3rem;
  font-weight: bold;
  text-shadow: 1px 1px 0px var(--current-primary-darker),
               2px 2px 0px var(--current-primary-darker),
               3px 3px 3px rgba(0,0,0,0.3);
  letter-spacing: 1px;
  -webkit-text-stroke: 0.5px var(--current-primary-darker);
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
  animation: winnerNameFlash 0.8s 1s ease-in-out; /* 延遲1秒執行，配合卡片入場 */
}
.highlight-winner .card-text {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}


/* History Card Styling */
.history-card {
  background-color: var(--current-card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
  border: 1px solid var(--current-input-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.history-card .card-title {
  color: var(--current-primary);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.history-card .card-subtitle {
  font-size: 0.875rem;
  color: var(--current-text-muted);
  font-weight: 300;
}

/* Pagination */
.pagination .page-item .page-link {
  color: var(--current-primary);
  background-color: var(--current-card-bg);
  border-color: var(--current-input-border);
  border-radius: 8px;
  margin: 0 .25rem;
  font-weight: 400;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--current-primary) 0%, var(--current-primary-darker) 100%);
  border-color: var(--current-primary);
  color: var(--current-text-light);
  box-shadow: 0 2px 8px rgba(105, 104, 172, 0.3);
}
.pagination .page-item.disabled .page-link {
  color: var(--current-text-muted);
  background-color: transparent;
}

/* Remaining List */
.remaining-section .card-body {
  background-color: var(--current-secondary);
  transition: background-color 0.3s ease;
}
.fadeInList li {
  opacity: 0;
  animation: fadeInItem 0.4s ease-in-out forwards;
  background-color: var(--current-card-bg);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--current-input-border);
  color: var(--current-text-dark);
  font-weight: 300;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInItem {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Overlay styles */
.overlay {
  display: none !important;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.overlay.show {
  display: flex !important;
}
.blur-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
}
.countdown-number {
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--text-light-light); /* 倒數數字固定為白色 */
  animation: countdownZoom 1s ease-in-out;
  position: relative;
  z-index: 2;
  text-shadow: 0 0 15px rgba(0,0,0,0.5);
}
@keyframes countdownZoom {
  0%   { opacity: 0; transform: scale(0.5); }
  50%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(0.5); }
}
.overlay.fade-out {
  animation: overlayFade 0.8s forwards;
}
@keyframes overlayFade {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.app-footer {
  background-color: var(--current-secondary);
  color: var(--current-text-muted);
  border-top: 1px solid var(--current-input-border);
  transition: background-color 0.3s ease, color 0.3s ease, border-top-color 0.3s ease;
}

/* RWD adjustments */
@media (max-width: 767.98px) {
  .app-header h1 { font-size: 2rem; }
  .section-title { font-size: 1.75rem; }
  .highlight-winner .card-title { font-size: 1.8rem; }
  .countdown-number { font-size: 6rem; }
  .col-lg-4, .col-lg-8, .col-md-6, .col-md-5, .col-md-7 { margin-bottom: 1rem; }
}

@media (max-width: 575.98px) {
  body { padding-top: 10px; padding-bottom: 10px; }
  .app-header h1 { font-size: 1.6rem; }
  .header-icon { font-size: 1.4rem; }
  .section-title { font-size: 1.5rem; }
  .highlight-winner .card-title { font-size: 1.5rem; }
  .btn-draw { font-size: 1rem; padding: .5rem 1.5rem; }
  .winner-card { animation: none; opacity: 1; transform: none; }
  .highlight-winner .card-body { padding: 1.5rem; animation: pulseWinnerBorder 1.5s infinite; }
  .countdown-number { font-size: 4rem; }
}

/* Theme toggle button */
.theme-toggle-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--current-primary) 0%, var(--current-primary-darker) 100%);
  color: var(--current-text-light);
  border: 2px solid var(--current-card-bg);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(105, 104, 172, 0.3), 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}
.theme-toggle-button:hover {
  background: linear-gradient(135deg, var(--current-primary-darker) 0%, var(--current-primary) 100%);
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 12px 32px rgba(105, 104, 172, 0.4), 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 載入動畫與互動提示 - moda 黑白黃主題 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 26, 26, 0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 215, 0, 0.3);
  border-top: 4px solid #FFD700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.loading-text {
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 30px;
  text-align: center;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.loading-text.pulse {
  animation: textPulse 2s infinite;
}

.tap-hint {
  color: #1a1a1a;
  font-size: 14px;
  text-align: center;
  animation: breathe 3s infinite;
  cursor: pointer;
  padding: 12px 24px;
  border: 2px solid #FFD700;
  border-radius: 25px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.tap-hint:hover {
  background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
  border-color: #FFA500;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* 藝術化的點擊效果 - 黃色主題 */
.tap-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, transparent 70%);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* 動畫定義 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes textPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.6; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* 暗色模式適配 - 保持 moda 黃色主題 */
body.dark .loading-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(13, 17, 23, 0.98) 100%);
}

body.dark .loading-spinner {
  border-color: rgba(255, 215, 0, 0.4);
  border-top-color: #FFD700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

body.dark .tap-hint {
  color: #000000;
  border-color: #FFD700;
  background: linear-gradient(135deg, #FFD700 0%, #FFED4E 100%);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

body.dark .tap-hint:hover {
  background: linear-gradient(135deg, #FFED4E 0%, #FFD700 100%);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7);
}

/* === 卡片動畫增強效果 === */

/* 金色光暈脈動動畫 */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 12px 30px rgba(255,215,0,0.7), inset 0 4px 15px rgba(255,255,255,0.4), 0 0 20px rgba(255,215,0,0.3);
    filter: brightness(1);
  }
  100% {
    box-shadow: 0 15px 35px rgba(255,215,0,0.9), inset 0 6px 20px rgba(255,255,255,0.5), 0 0 30px rgba(255,215,0,0.5);
    filter: brightness(1.1);
  }
}

/* 文字發光動畫 */
@keyframes text-glow {
  0%, 100% {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7), 0 0 12px rgba(255,215,0,0.5);
  }
  50% {
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.8), 0 0 30px rgba(255,215,0,0.3);
  }
}

/* 卡片震動效果 */
@keyframes card-vibrate {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px) rotate(0.5deg); }
  75% { transform: translateX(1px) rotate(-0.5deg); }
}

/* 背景閃爍效果 */
@keyframes background-flash {
  0% { background-color: transparent; }
  50% { background-color: rgba(255, 215, 0, 0.1); }
  100% { background-color: transparent; }
}

/* 爆炸波紋效果 */
@keyframes explosion-ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* 彩虹漸變動畫 */
@keyframes rainbow-shift {
  0% { filter: hue-rotate(0deg); }
  25% { filter: hue-rotate(90deg); }
  50% { filter: hue-rotate(180deg); }
  75% { filter: hue-rotate(270deg); }
  100% { filter: hue-rotate(360deg); }
}

/* 超級震撼模式 */
@keyframes mega-impact {
  0% { 
    transform: scale(1) rotate(0deg);
    filter: brightness(1) contrast(1);
  }
  10% { 
    transform: scale(1.1) rotate(2deg);
    filter: brightness(1.5) contrast(1.3);
  }
  20% { 
    transform: scale(0.95) rotate(-1deg);
    filter: brightness(0.8) contrast(1.1);
  }
  30% { 
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.2) contrast(1.2);
  }
  100% { 
    transform: scale(1) rotate(0deg);
    filter: brightness(1) contrast(1);
  }
}
