/* 
* Digital Clock 样式文件 (原Black Screen Clock)
* 风格与Analog Clock保持一致
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  overflow-x: hidden;
}


/* 时钟容器样式 - 改为白底黑字 */
#clock-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
  /* border: 2px solid #f0f0f0; 添加浅灰色边框增强视觉效果 */
  /* 移除阴影效果 */
}

/* 页面通用容器 */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 时钟特定容器 */
.clock-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 控制按钮区域样式 */
.clock-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 2rem;
}

/* 控制按钮基础样式 - 恢复经典样式 */
.control-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  background-color: rgba(99, 102, 241, 0.1); /* 恢复蓝色透明背景 */
  color: #6366f1; /* 恢复蓝色文字 */
  border: 1px solid rgba(99, 102, 241, 0.2); /* 蓝色边框 */
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  white-space: nowrap;
  backdrop-filter: blur(5px);
}

/* 颜色控制相关样式 */
.color-control {
  display: flex;
  align-items: center;
}

/* 字体大小控制相关样式 */
.size-control, .font-control {
  display: flex;
  align-items: center;
}

/* 控制按钮悬停效果 - 恢复经典样式 */
.control-button:hover, .control-button:focus {
  background-color: rgba(99, 102, 241, 0.2); /* 悬停时蓝色背景加深 */
  outline: none;
}

/* 设置面板样式 */
.settings-panel {
  position: fixed;
  width: 250px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  z-index: 500;
  transition: all 0.2s ease;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  padding: 12px;
}

/* 设置面板显示状态 */
.settings-panel.active {
  opacity: 1;
  visibility: visible;
}

/* 设置组样式 */
.setting-group {
  margin-bottom: 8px;
  padding: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
}

.setting-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* 设置组标题样式 */
.setting-group-title {
  flex: 1;
  text-align: left;
  margin-right: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

/* 设置按钮样式 */
.setting-button {
  padding: 6px 12px;
  background-color: #f8f9fa;
  border: 2px solid #eaeaea;
  border-radius: 6px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.setting-button:hover {
  background-color: #f0f0f0;
  border-color: #6366f1;
  color: #6366f1;
}

.setting-button.active {
  background-color: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* 滑动开关样式 */
.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  background-color: #e5e7eb;
  border-radius: 13px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 10px;
  border: 2px solid transparent;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 1px;
  top: 50%;
  transform: translateY(-50%);
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toggle-slider:hover {
  background-color: #d1d5db;
}

.toggle-input:checked + .toggle-label .toggle-slider {
  background-color: #6366f1;
  border-color: #6366f1;
}

.toggle-input:checked + .toggle-label .toggle-slider:hover {
  background-color: #5856eb;
}

.toggle-input:checked + .toggle-label .toggle-slider:before {
  transform: translateX(22px) translateY(-50%);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.toggle-text {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  min-width: 28px;
  text-align: left;
  transition: color 0.3s ease;
}

.toggle-input:checked + .toggle-label .toggle-text {
  color: #6366f1;
}

/* 增加焦点状态的可访问性 */
.toggle-input:focus + .toggle-label .toggle-slider {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* 颜色选择器样式 */
.color-picker {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 2px solid #eaeaea;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-picker:hover {
  border-color: #6366f1;
}

/* 字体大小按钮样式 */
.size-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.size-btn {
  width: 32px;
  height: 32px;
  border: 2px solid #eaeaea;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.size-btn:hover {
  background: #f0f0f0;
  border-color: #6366f1;
  color: #6366f1;
}

/* 字体选择器样式 */
.font-selector {
  width: 120px;
  height: 30px;
  padding: 0 10px;
  border: 2px solid #eaeaea;
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.font-selector:hover, .font-selector:focus {
  border-color: #6366f1;
  outline: none;
}

/* 时钟显示样式 */
.time {
  font-family: 'Arial', sans-serif;
  font-size: clamp(3rem, 16vw, 12rem);
  font-weight: 600; /* 改为加粗 */
  color: #000000; /* 改为黑色文字 */
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.1); /* 调整阴影为黑色 */
  transition: all 0.3s ease;
  width: 100%;
  padding: 40px 20px;
}

.date {
  font-size: 1.5rem;
  color: #999999;
  margin-top: 10px;
}

/* 设置面板样式 */
.settings {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.settings-icon {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  color: #ffffff;
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.settings-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(15deg);
}

.settings-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  display: none;
  margin-top: 10px;
  min-width: 250px;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-dropdown.show {
  display: block;
}



input[type="color"] {
  width: 40px;
  height: 30px;
  padding: 0;
  border: 2px solid #eaeaea;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="color"]:hover {
  border-color: #6366f1;
}

select {
  width: 120px;
  height: 30px;
  padding: 0 10px;
  border: 2px solid #eaeaea;
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

select:hover, select:focus {
  border-color: #6366f1;
  outline: none;
}

.size-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.size-buttons button {
  width: 32px;
  height: 32px;
  border: 2px solid #eaeaea;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.size-buttons button:hover {
  background: #f0f0f0;
  border-color: #6366f1;
  color: #6366f1;
}

/* 新的控制区域样式 */
.clock-controls {
  margin-top: 30px;
  transition: all 0.3s ease;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.control-button {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border: none;
  padding: 10px 20px;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.control-button:hover {
  background: rgba(99, 102, 241, 0.2);
}

.control-button.active {
  background: #6366f1;
  color: #fff;
}

/* 全屏模式下的时钟容器样式 */
#clock-container.fullscreen-mode {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  margin: 0;
  max-width: none;
  /* 移除固定背景色，由JS控制 */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* 全屏模式下的设置面板样式 - 现在由JS动态定位 */
#clock-container.fullscreen-mode .settings-panel {
  z-index: 10000;
}

/* 全屏模式下的控制按钮样式 */
#clock-container.fullscreen-mode .control-buttons-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10001;
}

#clock-container.fullscreen-mode .control-button {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

#clock-container.fullscreen-mode .control-button:hover {
  opacity: 1;
}

.fullscreen-mode .time {
  font-size: clamp(4rem, 20vw, 16rem);
}

.fullscreen-mode .clock-controls {
  position: absolute;
  bottom: 5vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-mode:hover .clock-controls {
  opacity: 1;
}

/* FAQ样式 */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.faq-question {
  padding: 18px 20px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-question:hover {
  background-color: #f9fafb;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-answer.show {
  padding: 0 20px 20px;
  max-height: 500px;
}

/* 响应式样式调整 */
@media (max-width: 640px) {
  #clock-container {
    padding: 20px;
  }
  
  .time {
    font-size: clamp(2.5rem, 14vw, 8rem);
  }
  
  .settings-dropdown {
    min-width: 220px;
    right: -10px;
  }
}

/* 页脚链接样式 */
footer a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #6366f1;
}

/* 滚动到顶部按钮 */
#scroll-top-btn {
  background: #6366f1;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 30px;
  right: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

#scroll-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}
