/* 重置body样式 */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 计时器容器样式 */
#timer-container {
  width: 100%;
  margin: 20px auto;
}

/* 数字倒计时显示区域 */
.timer-display {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  margin: 20px 0;
}

/* 时间数字容器 */
.time-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
  font-weight: bold;
  font-size: 6rem;
  color: #2d3748;
  line-height: 1;
}

/* 数字组（小时、分钟、秒） */
.digit-group {
  background: white;
  color: #000000;
  padding: 20px 30px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  margin: 0 5px;
  transition: all 0.3s ease;
  min-width: 2em;
  text-align: center;
  position: relative;
}

/* 数字组悬停效果 */
.digit-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 分隔符样式 */
.separator {
  color: #4a5568;
  margin: 0 15px;
  font-size: 5rem;
  font-weight: normal;
  text-shadow: none;
}

/* 小时部分样式 */
.time-section {
  display: flex;
  align-items: center;
}

/* 确保小时内的数字组和其他数字组样式一致 */
.time-section .digit-group {
  background: white;
  color: #000000;
  padding: 20px 30px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  margin: 0 5px;
  transition: all 0.3s ease;
  min-width: 2em;
  text-align: center;
  position: relative;
}

/* 小时内数字组的悬停效果 */
.time-section .digit-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 数字更新动画 */
@keyframes digitUpdate {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.digit-updating {
  animation: digitUpdate 0.3s ease-in-out;
}

/* 倒计时完成时的闪烁动画 */
@keyframes timerComplete {
  0% { opacity: 1; background: white; color: #000000; }
  50% { opacity: 0.7; background: #ef4444; color: white; }
  100% { opacity: 1; background: white; color: #000000; }
}

.timer-completed .digit-group {
  animation: timerComplete 1s infinite;
}

/* 全屏模式样式 */
#timer-container.fullscreen-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: #f8f9fa;
  overflow: hidden;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 全屏模式下的时间显示 */
#timer-container.fullscreen-mode .timer-display {
  transform: scale(1.8);
  margin: 0;
  padding: 0;
  /* 考虑到底部控制按钮的空间，稍微向上调整位置 */
  position: relative;
  top: -5vh;
}

/* 全屏模式下数字组的紧凑布局 */
#timer-container.fullscreen-mode .time-digits {
  gap: 5px;
}

#timer-container.fullscreen-mode .digit-group {
  margin: 0 2px;
  padding: 12px 16px;
  min-width: 1.8em;
}

#timer-container.fullscreen-mode .separator {
  margin: 0 6px;
}

/* 全屏模式下的控制按钮 */
#timer-container.fullscreen-mode .clock-controls {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1000;
}

/* 鼠标移动时显示控制按钮 */
#timer-container.fullscreen-mode.show-controls .clock-controls {
  opacity: 0.8;
}

/* 鼠标悬停在按钮上时完全显示 */
#timer-container.fullscreen-mode .clock-controls:hover {
  opacity: 1;
}

/* 全屏模式下的按钮样式 */
#timer-container.fullscreen-mode .clock-controls button {
  font-size: 0.9rem;
  padding: 0.7rem 1.2rem;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
  color: #2d3748;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#timer-container.fullscreen-mode .clock-controls button:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
  .time-digits {
    font-size: 4.5rem;
  }
  
  .digit-group {
    padding: 15px 25px;
  }
  
  /* 确保小时部分的数字组样式一致 */
  .time-section .digit-group {
    padding: 15px 25px;
  }
  
  .separator {
    font-size: 4rem;
    margin: 0 10px;
  }
  
  #timer-container.fullscreen-mode .timer-display {
    transform: scale(1.1);
    top: -3vh;
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
  .timer-display {
    padding: 20px 0;
  }
  
  .time-digits {
    font-size: 3rem;
  }
  
  .digit-group {
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 10px;
    min-width: 1.5em;
  }
  
  /* 确保小时部分的数字组样式一致 */
  .time-section .digit-group {
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 10px;
    min-width: 1.5em;
  }
  
  .separator {
    font-size: 2.5rem;
    margin: 0 8px;
  }
  
  #timer-container.fullscreen-mode .timer-display {
    transform: scale(1.05);
    top: -3vh;
  }
  
  .clock-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .clock-controls button {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
  }
}

/* 响应式设计 - 小手机 */
@media (max-width: 480px) {
  .time-digits {
    font-size: 2.5rem;
  }
  
  .digit-group {
    padding: 8px 12px;
    margin: 0 2px;
  }
  
  /* 确保小时部分的数字组样式一致 */
  .time-section .digit-group {
    padding: 8px 12px;
    margin: 0 2px;
  }
  
  .separator {
    font-size: 2rem;
    margin: 0 5px;
  }
  
  #timer-container.fullscreen-mode .timer-display {
    transform: scale(1);
    top: -2vh;
  }
  
  .clock-controls button {
    font-size: 0.7rem;
    padding: 0.5rem 0.8rem;
  }
}

/* 按钮样式增强 */
.clock-controls button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.clock-controls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.clock-controls button:active {
  transform: translateY(0);
}

/* 设备特定优化 */
@media (prefers-reduced-motion: reduce) {
  .digit-group {
    transition: none;
  }
  
  .digit-updating {
    animation: none;
  }
  
  .timer-completed .digit-group {
    animation: none;
    background: #ef4444;
    color: white;
  }
} 