/* =============================================================================
   快問快答遊戲 - 高保真度 UI 樣式
   ============================================================================= */

/* 基礎樣式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 統一h3基礎樣式，防止瀏覽器默認樣式造成不一致 */
h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 16px 0;
}

body, html {
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  overflow-x: hidden;
}

#root {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================================================
   共享 UI 組件
   ============================================================================= */

/* 卡片組件 */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* 按鈕組件 */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 140px;
  outline: none;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  box-shadow: 0 4px 16px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  box-shadow: 0 4px 16px rgba(160, 174, 192, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  box-shadow: 0 4px 16px rgba(245, 101, 101, 0.4);
}

/* 計時器組件 */
.timer {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 16px 0;
}

/* 參與者介面的計時器樣式 */
.player-interface .timer {
  background: rgba(102, 126, 234, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.player-interface .timer-number {
  color: #2d3748;
  text-shadow: none;
  font-weight: 800; /* 增加字重讓數字更清楚 */
}

.player-interface .timer.urgent {
  background: rgba(245, 101, 101, 0.15);
  border-color: rgba(245, 101, 101, 0.3);
}

.player-interface .timer.urgent .timer-number {
  color: #e53e3e;
  text-shadow: none;
  font-weight: 800;
}

.player-interface .timer-label {
  color: #4a5568;
  text-shadow: none;
  font-weight: 600; /* 增加字重讓標籤更清楚 */
}

/* 參與者介面計時器進度條 */
.player-interface .timer-bar {
  background: rgba(102, 126, 234, 0.2);
}

.player-interface .timer.urgent .timer-bar {
  background: rgba(245, 101, 101, 0.2);
}

.timer.urgent {
  background: rgba(245, 101, 101, 0.2);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.timer-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.timer-number {
  font-size: 32px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.timer.urgent .timer-number {
  color: #ff6b6b;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.timer-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.timer-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.timer-progress {
  height: 100%;
  background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
  transition: width 0.5s ease;
}

.timer.urgent .timer-progress {
  background: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);
}

/* =============================================================================
   房間選擇器
   ============================================================================= */

.room-selector {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.selector-content {
  text-align: center;
  max-width: 800px;
  width: 100%;
}

.homepage-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.homepage-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.selector-content h1 {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.selector-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
}

.selector-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.create-room, .join-room {
  text-align: center;
}

.create-room h3, .join-room h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #2d3748;
}

.create-room p, .join-room p {
  color: #718096;
  margin-bottom: 20px;
}

.room-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.room-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* =============================================================================
   載入畫面
   ============================================================================= */

.loading {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.loading::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  animation: backgroundMove 20s linear infinite;
}

.loading-content {
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 48px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(31, 38, 135, 0.3);
  max-width: 480px;
  width: 90vw;
}

.loading-animation {
  margin-bottom: 32px;
}

.quiz-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
  animation: logoFloat 3s ease-in-out infinite;
}

.loading-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.3s;
}

.dot:nth-child(3) {
  animation-delay: 0.6s;
}

.loading-title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.loading-title-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: logoFloat 3s ease-in-out infinite;
}

.loading-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.loading-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
  font-weight: 500;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.step.active {
  background: rgba(72, 187, 120, 0.2);
  border-color: rgba(72, 187, 120, 0.4);
  animation: stepGlow 2s ease-in-out infinite;
}

.step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.step.active .step-icon {
  background: #48bb78;
  color: white;
  animation: iconBounce 1s ease-in-out infinite;
}

.step-text {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

.step.active .step-text {
  opacity: 1;
  font-weight: 600;
}

/* Loading 動畫效果 */
@keyframes backgroundMove {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes stepGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(72, 187, 120, 0.4); }
  50% { box-shadow: 0 0 20px rgba(72, 187, 120, 0.3); }
}

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

/* 錯誤畫面 */
.error-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.error-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 500px;
  margin: 0 1rem;
}

.error-content h2 {
  margin-bottom: 1rem;
  color: #d63031;
  font-size: 2rem;
}

.error-content p {
  color: #2d3436;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* 用戶名輸入畫面 */
.username-input-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.username-input-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 400px;
  margin: 0 1rem;
}

.username-input-content h2 {
  margin-bottom: 1rem;
  color: #333;
  font-size: 2rem;
}

.username-input-content p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.username-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.username-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.username-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.username-input-content form {
  display: flex;
  flex-direction: column;
}

.username-input-content .btn {
  margin-top: 0;
}

/* =============================================================================
   主持人介面
   ============================================================================= */

/* 全屏主持人介面 */
.host-interface-fullscreen {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 頂部資訊欄 */
.host-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(32px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.title-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.host-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.host-info-bar {
  display: flex;
  gap: 24px;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.info-icon {
  font-size: 16px;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.info-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.info-value {
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 全屏主持人介面新增樣式 */
/* 主題目區域 */
.main-question-area {
  position: absolute;
  top: 500px; /* 從面板下方開始，留足夠空間 */
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 60px; /* 左右各留60px，增加寬度 */
}

.question-display {
  width: 100%;
  max-width: 1600px; /* 大幅增加最大寬度 */
  text-align: center;
  color: white;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.question-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.question-timer {
  transform: scale(1.2);
}

.main-question-text {
  font-size: 5.5rem; /* 再次增大到5.5rem */
  font-weight: 700;
  color: white;
  text-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
  margin-bottom: 60px; /* 減少下邊距為圖片留空間 */
  line-height: 1.0; /* 更緊湊 */
  text-align: center;
}

/* 題目圖片容器 */
.question-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
  padding: 0 20px;
}

.question-image {
  max-width: 100%;
  max-height: 400px; /* 限制最大高度 */
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  object-fit: contain; /* 保持圖片比例 */
}

.question-image:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.question-options-display {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 32px;
  max-width: 1400px; /* 大幅增加選項區域寬度 */
  margin: 0 auto;
  width: 100%;
}

.option-display {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 40px; /* 增大內邊距 */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  transition: all 0.3s ease;
  min-height: 100px; /* 增大最小高度 */
  width: 100%;
  box-sizing: border-box;
}

.option-display.correct {
  background: rgba(72, 187, 120, 0.3);
  border-color: rgba(72, 187, 120, 0.6);
  box-shadow: 0 0 30px rgba(72, 187, 120, 0.4);
}

.option-display .option-letter {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.option-display.correct .option-letter {
  background: #48bb78;
  border-color: #48bb78;
  color: white;
}

.option-display .option-text {
  font-weight: 600;
  font-size: 1.8rem; /* 增大選項文字 */
  color: white;
  text-align: left;
  line-height: 1.3;
}

.no-question-display {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.waiting-content {
  text-align: center;
  color: white;
}

.waiting-content h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.waiting-content p {
  font-size: 1.5rem;
  font-weight: 500;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 浮動控制面板 */
.floating-panels {
  position: fixed;
  top: 100px; /* 保持在上方 */
  left: 60px;
  right: 60px;
  height: 480px; /* 固定高度，只需要一列 */
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr; /* 4欄等寬 */
  gap: 20px;
  pointer-events: none;
  z-index: 50;
}

.control-panel-float {
  grid-column: 1; /* 第1欄 */
  max-height: 460px;
  overflow-y: auto;
  pointer-events: auto;
}

.stats-panel-float {
  grid-column: 2; /* 第2欄 */
  max-height: 460px;
  overflow-y: auto;
  pointer-events: auto;
}

.live-rankings-panel-float {
  grid-column: 3; /* 第3欄 */
  max-height: 460px;
  overflow-y: auto;
  pointer-events: auto;
}

.rankings-panel-float {
  grid-column: 4; /* 第4欄 */
  max-height: 460px;
  overflow-y: auto;
  pointer-events: auto;
}

.floating-panels .card {
  background: transparent; /* 完全透明背景 */
  backdrop-filter: none;
  border: 2px solid rgba(255, 255, 255, 0.6); /* 增強框線 */
  box-shadow: none;
  color: white; /* 確保文字是白色 */
}

/* 透明面板額外樣式 */
.floating-panels .card h3,
.floating-panels .card h4 {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 1.3rem; /* 統一所有透明面板的h3字體大小 */
}

.floating-panels .card .btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.floating-panels .card .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 移除舊的遊戲狀態樣式，現在統一在info-bar中顯示 */

.host-layout {
  display: grid;
  grid-template-columns: minmax(500px, 2fr) minmax(320px, 1fr) minmax(380px, 1fr);
  gap: 24px;
  width: 100%;
  align-items: start;
  /* 計算可用高度：100vh - header - padding */
  height: calc(100vh - 120px);
}

.host-left-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.host-middle-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.host-middle-panel::-webkit-scrollbar {
  width: 6px;
}

.host-middle-panel::-webkit-scrollbar-track {
  background: transparent;
}

.host-middle-panel::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 3px;
}

.host-middle-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

.host-right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.host-right-panel::-webkit-scrollbar {
  width: 6px;
}

.host-right-panel::-webkit-scrollbar-track {
  background: transparent;
}

.host-right-panel::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 3px;
}

.host-right-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

.control-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #2d3748;
}

.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.current-question h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #2d3748;
}

.question-content .question-text {
  font-size: 2.4rem; /* 增大參與者介面題目字體 */
  font-weight: 700; /* 增加字重 */
  margin-bottom: 32px; /* 增加下邊距為圖片留空間 */
  color: #2d3748;
  line-height: 1.3; /* 稍微緊湊一些 */
}

.question-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.question-options .option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
  min-height: 60px;
}

.question-options .option.correct {
  background: rgba(72, 187, 120, 0.1);
  border-color: #48bb78;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
  color: #4a5568;
  flex-shrink: 0;
}

.question-options .option.correct .option-letter {
  background: #48bb78;
  border-color: #48bb78;
  color: white;
}

.option-text {
  font-weight: 500;
  font-size: 16px;
  color: #4a5568;
  line-height: 1.4;
}

.live-stats h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.answer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.answer-distribution {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  transition: all 0.3s ease;
}

.option-label {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.option-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.option-progress {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
  transition: width 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.option-count {
  font-weight: 600;
  color: white;
  min-width: 24px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 即時答案統計的占位符樣式 */
.no-question-stats {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-placeholder {
  text-align: center;
  color: white;
}

.placeholder-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.placeholder-text {
  font-size: 14px;
  color: white;
  font-weight: 500;
  max-width: 200px;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 答案統計中正確答案的樣式 */
.option-stat.correct-option {
  background: rgba(72, 187, 120, 0.1);
  border: 2px solid #48bb78;
  border-radius: 8px;
  padding: 12px;
  margin: 4px 0;
}

.option-stat.correct-option .option-progress {
  background: linear-gradient(90deg, #68d391 0%, #48bb78 100%);
  box-shadow: 0 2px 6px rgba(72, 187, 120, 0.4);
}

.correct-indicator {
  color: #68d391;
  font-weight: 700;
  font-size: 16px;
  margin-left: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stats-summary {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border-left: 4px solid rgba(255, 255, 255, 0.6);
}

.summary-text {
  font-size: 14px;
  font-weight: 600;
  color: white;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.rankings h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #2d3748;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ranking-item:hover {
  background: rgba(255, 255, 255, 0.7);
}

.ranking-item .rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #2d3748;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  background: transparent; /* 無底色 */
  text-align: center;
}

.player-info {
  flex: 1;
}

.player-name {
  font-weight: 600;
  font-size: 16px;
  color: #2d3748;
  display: block;
  margin-bottom: 4px;
}

.player-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.player-stats span {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  color: #4a5568;
  font-weight: 500;
}

/* 強化最終排名列表內的數據可見性 */
.ranking-item .player-stats {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.ranking-item .player-stats .score,
.ranking-item .player-stats .answers {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  color: #2d3748;
  font-weight: 600;
}

/* 移除詳細答題記錄相關樣式 */

/* 即時排行榜樣式 */
.live-time-rankings {
  max-height: 400px;
  overflow-y: auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  margin-top: 12px;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.ranking-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ranking-row:last-child {
  border-bottom: none;
}

.ranking-row.correct {
  background: rgba(72, 187, 120, 0.1);
  border-left: 3px solid #48bb78;
}

.ranking-row .rank {
  font-weight: 700;
  color: white;
  min-width: 24px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ranking-row .name {
  flex: 1;
  font-weight: 600;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ranking-row .time {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-family: monospace;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ranking-row .flag {
  font-size: 16px;
}

.ranking-row .flag.correct {
  color: #68d391;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ranking-row .flag.pending {
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.empty {
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 狀態的位符樣式 */
.game-status-placeholder {
  text-align: center;
  padding: 32px 16px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: white;
}

.status-icon {
  font-size: 48px;
  margin-bottom: 8px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.status-text {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.status-detail {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.9;
  max-width: 280px;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   玩家介面
   ============================================================================= */

.player-interface {
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
}

.player-header {
  margin-bottom: 32px;
  padding: 0 8px;
}

.player-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin: 0;
  text-align: center;
}

.player-info-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  background: transparent;
  border-radius: 16px;
  padding: 16px 24px;
  backdrop-filter: blur(20px);
}

/* 參與者介面使用相同的info-item樣式 */

.player-content {
  max-width: 800px;
  margin: 0 auto;
}

.waiting-room, .game-starting, .question-card, .game-finished {
  max-width: 700px; /* 增大題目卡片最大寬度 */
  margin: 0 auto;
}

.question-card {
  padding: 32px; /* 增加題目卡片內邊距 */
}

.waiting-content, .starting-content, .finished-content {
  text-align: center;
}

.waiting-content h2, .starting-content h2, .finished-content h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 參與者介面遊戲結束畫面文字顏色修復 */
.player-interface .finished-content h2 {
  color: #2d3748;
  text-shadow: none;
}

.waiting-content p, .starting-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.player-item .player-name {
  font-weight: 600;
  color: #2d3748;
}

.host-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.question-number {
  font-weight: 600;
  color: #718096;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 20px;
}

.question-text {
  font-size: 2.4rem; /* 增大字體從1.8rem到2.4rem */
  font-weight: 700; /* 增加字重 */
  margin-bottom: 32px; /* 增加下邊距為圖片留更多空間 */
  color: #2d3748;
  text-align: center;
  line-height: 1.3; /* 稍微緊湊一些 */
}

/* 參與者介面的題目圖片樣式 */
.player-interface .question-image-container {
  margin-bottom: 40px; /* 增加圖片下方間距 */
  padding: 0 16px; /* 增加左右內邊距 */
}

.player-interface .question-image {
  max-height: 350px; /* 增加圖片最大高度 */
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
  object-fit: contain; /* 保持圖片比例 */
  transition: all 0.3s ease;
}

.player-interface .question-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.3);
  border-color: #667eea;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.options-grid .option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 3px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
  min-height: 120px;
  text-align: center;
}

.options-grid .option:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-2px);
}

.options-grid .option.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.options-grid .option.correct {
  border-color: #48bb78;
  background: rgba(72, 187, 120, 0.1);
}

.options-grid .option.wrong {
  border-color: #f56565;
  background: rgba(245, 101, 101, 0.1);
}

.options-grid .option-letter {
  width: 48px;
  height: 48px;
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #4a5568;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.options-grid .option:hover .option-letter,
.options-grid .option.selected .option-letter {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* 已提交答案後停用 hover 效果與游標互動，避免誤導可修改 */
.options-grid.answered .option {
  pointer-events: none;
}

.options-grid.answered .option:hover {
  border-color: #e2e8f0;
  background: rgba(255, 255, 255, 0.8);
  transform: none;
}

.options-grid.answered .option:hover .option-letter {
  background: #f7fafc;
  border-color: #e2e8f0;
  color: #4a5568;
}

.options-grid .option.correct .option-letter {
  background: #48bb78;
  border-color: #48bb78;
  color: white;
}

.options-grid .option.wrong .option-letter {
  background: #f56565;
  border-color: #f56565;
  color: white;
}

.options-grid .option-text {
  font-weight: 500;
  font-size: 16px;
  color: #4a5568;
  line-height: 1.4;
}

.answer-actions {
  text-align: center;
}

.submit-answer {
  min-width: 200px;
  padding: 16px 32px;
  font-size: 16px;
}

.answer-submitted {
  text-align: center;
  padding: 24px;
  background: rgba(72, 187, 120, 0.1);
  border-radius: 12px;
  border: 2px solid #48bb78;
}

.submitted-message {
  font-size: 1.2rem;
  font-weight: 600;
  color: #38a169;
}

.answer-result {
  text-align: center;
  padding: 24px;
  border-radius: 12px;
  margin-top: 24px;
}

.result-message {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.result-message.correct {
  color: #38a169;
}

.result-message.wrong {
  color: #e53e3e;
}

.result-details {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
}

.result-details span {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.final-score {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.score-info, .rank-info {
  text-align: center;
  padding: 24px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 12px;
}

.final-score .score-number, .final-score .rank-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 8px;
}

/* 參與者介面遊戲結束數字顏色修復 */
.player-interface .final-score .score-number, 
.player-interface .final-score .rank-number {
  color: #2d3748;
}

.score-label, .rank-label {
  font-size: 1rem;
  color: #718096;
}

/* 參與者介面遊戲結束標籤顏色修復 */
.player-interface .score-label, 
.player-interface .rank-label {
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.game-stats .stat-item {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

.game-stats .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 參與者介面遊戲統計數字顏色修復 */
.player-interface .game-stats .stat-number {
  color: #2d3748;
  text-shadow: none;
}

.game-stats .stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 參與者介面遊戲統計標籤顏色修復 */
.player-interface .game-stats .stat-label {
  color: #718096;
  text-shadow: none;
}

/* =============================================================================
   響應式設計
   ============================================================================= */

@media (max-width: 1400px) {
  .host-layout {
    grid-template-columns: minmax(450px, 2fr) minmax(300px, 1fr) minmax(350px, 1fr);
  }
}

@media (max-width: 1200px) {
  .host-layout {
    grid-template-columns: minmax(400px, 1fr) minmax(300px, 1fr);
    height: auto;
  }
  
  .host-middle-panel {
    order: -1;
    max-height: 60vh;
  }
  
  .host-right-panel {
    grid-column: 1 / -1;
    margin-top: 12px;
    max-height: 50vh;
  }
}

@media (max-width: 1024px) {
  .host-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .host-middle-panel,
  .host-right-panel {
    order: -1;
    max-height: 50vh;
  }
}

@media (max-width: 1024px) {
  .host-info-bar, .player-info-bar {
    gap: 20px;
  }
  
  .info-item {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .host-interface, .player-interface {
    padding: 16px;
  }
  
  .host-title, .player-title {
    font-size: 2rem;
  }
  
  .host-info-bar, .player-info-bar {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 12px 16px;
  }
  
  .info-item {
    min-width: 80px;
  }
  
  .control-buttons {
    justify-content: center;
  }
  
  /* Loading 響應式 */
  .loading-content {
    padding: 32px 24px;
    width: 95vw;
  }
  
  .loading-title-icon {
    width: 40px;
    height: 40px;
  }
  
  .loading-title {
    font-size: 2rem;
  }
  
  .loading-logo {
    width: 48px;
    height: 48px;
  }
  
  .title-logo {
    width: 32px;
    height: 32px;
  }
}
  
  .options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .question-options {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .final-score, .game-stats {
    grid-template-columns: 1fr;
  }
  
  .result-details {
    flex-direction: column;
    align-items: center;
  }
  
  .homepage-logo {
    width: 40px;
    height: 40px;
  }
  
  .selector-content h1 {
    font-size: 2rem;
  }
  
  .selector-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .question-text {
    font-size: 1.8rem; /* 手機版也增大字體 */
  }
  
  .player-interface .question-image {
    max-height: 250px; /* 手機版圖片適中大小 */
  }
  
  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .question-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .options-grid .option {
    min-height: 100px;
    padding: 16px;
  }
  
  .options-grid .option-letter {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .score-number, .rank-number {
    font-size: 2rem;
  }
  
  /* Homepage 小螢幕優化 */
  .homepage-logo {
    width: 32px;
    height: 32px;
  }
  
  /* Loading 小螢幕優化 */
  .loading-content {
    padding: 24px 16px;
  }
  
  .loading-logo {
    width: 40px;
    height: 40px;
  }
  
  .loading-title-container {
    gap: 12px;
  }
  
  .loading-title-icon {
    width: 32px;
    height: 32px;
  }
  
  .loading-title {
    font-size: 1.8rem;
  }
  
  .title-logo {
    width: 28px;
    height: 28px;
  }
  
  .loading-steps {
    gap: 12px;
  }
  
  .step {
    padding: 10px 16px;
  }
  
  /* 全屏主持人介面響應式 */
  .host-top-bar {
    height: 60px;
    padding: 0 16px;
  }
  
  .main-question-area {
    top: 55%; /* 手機版稍微調整位置 */
    padding: 20px;
  }
  
  .main-question-text {
    font-size: 3.2rem; /* 手機版相對大一些 */
    margin-bottom: 50px;
  }
  
  .question-options-display {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  .option-display {
    padding: 20px;
    min-height: 60px;
  }
  
  .option-display .option-text {
    font-size: 1.2rem;
  }
  
  .floating-panels {
    top: 70px;
    left: 10px;
    right: 10px;
    height: auto;
    grid-template-columns: 1fr; /* 手機版改為單欄 */
    gap: 12px;
  }
  
  .control-panel-float {
    grid-column: auto; /* 重置grid-column */
    max-height: 20vh;
  }
  
  .stats-panel-float {
    grid-column: auto; /* 重置grid-column */
    max-height: 20vh;
  }
  
  .live-rankings-panel-float {
    grid-column: auto; /* 重置grid-column */
    max-height: 20vh;
  }
  
  .rankings-panel-float {
    grid-column: auto; /* 重置grid-column */
    max-height: 20vh;
  }
  
  .waiting-content h1 {
    font-size: 3rem;
  }
  
  .waiting-content p {
    font-size: 1.2rem;
  }
}

/* =============================================================================
   動畫效果
   ============================================================================= */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.card, .btn, .option {
  animation: slideIn 0.3s ease;
}

.quiz-app {
  animation: fadeIn 0.5s ease;
}

/* 移除使用者操作相關樣式，改為在header中直接顯示主持人資訊 */

/* =============================================================================
   自定義滾動條
   ============================================================================= */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* =============================================================================
   舊版聊天樣式 (向後相容)
   ============================================================================= */

.chat {
  padding-top: 40px;
}

.message {
  margin-bottom: 10px;
}

.message .user {
  font-weight: bold;
  text-align: right;
}

.message .remove {
  position: absolute;
  width: 22px;
  height: 20px;
  left: -60px;
  display: none;
  padding: 0;
  line-height: 18px;
  border: none;
}

.send-message {
  padding: 0;
}

.my-input-text::placeholder {
  color: #ccc;
}