* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  display: flex;
  margin: 0;
  background: #0e0e11;
  color: #f5f5f5;

  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 10px;
}

#game {
  width: 420px;
  max-width: 90%;
  padding: 24px;
  background: #15151c;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ===== 顯示文章 ===== */
.text {
  font-family: monospace;
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 16px;
  word-break: break-word;
}

.text .done {
  color: #6c6c70;
}

.text .current {
  color: #f5f5f5;
  font-weight: bold;
  text-decoration: underline;
}

.text .pending {
  color: #888;
}

/* ===== 狀態區 ===== */
.status {
  text-align: center;
  margin-bottom: 16px;
}

.morse-indicator {
  font-size: 32px;
  letter-spacing: 6px;
  min-height: 40px;
  margin-bottom: 6px;
}

.current {
  font-size: 16px;
  opacity: 0.85;
}

/* ===== 倒數計時 ===== */
#timer {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #ffc107;
}

/* ===== 進度條 ===== */
.progress {
  margin: 16px 0;
}

.progress label {
  font-size: 12px;
  opacity: 0.6;
}

.bar {
  position: relative;
  height: 6px;
  background: #2a2a36;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff9800, #ffc107);
  transition: width 0.05s linear;
}

/* ===== 回饋動畫 ===== */
.flash {
  animation: flash 0.15s ease-out;
}

@keyframes flash {
  0%   { background: #2a2a36; }
  50%  { background: #ff9800; }
  100% { background: #2a2a36; }
}

/* ===== 結果顯示 ===== */
.result {
  margin-top: 20px;
  text-align: center;
  font-size: 22px;
}

/* ===== 摩斯碼提示 ===== */
#morse-help {
  font-family: monospace;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 20px;
  color: #ccc;
  background: #1c1c26;
  padding: 12px;
  border-radius: 8px;
  max-width: 420px;
}

/* ===== 小螢幕調整 ===== */
@media screen and (max-width: 480px){
  #game { padding: 16px; }
  .morse-indicator { font-size: 28px; letter-spacing: 4px; }
  .text { font-size: 16px; }
  .current { font-size: 14px; }
  #timer { font-size: 14px; }
  .result { font-size: 20px; }
}

.box{
  display: flex;
  flex-direction: column;
}