/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 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);
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* 页面元素动画 */
header, .glass-effect {
  animation: fadeIn 0.8s ease-out;
}

#time-display {
  animation: pulse 2s infinite;
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 900; /* 微软雅黑粗体 */
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  display: inline-block;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#date-display {
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
  font-weight: 900; /* 微软雅黑粗体 */
  color: rgba(255, 255, 255, 0.9);
  text-xl;
}

#time-display:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.weather-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .glass-effect {
    padding: 1.5rem;
  }
  
  #time-display {
    font-size: 2.5rem !important;
    padding: 0.8rem 1.5rem;
    min-width: 220px;
    border-width: 2px;
  }
  
  .weather-icon {
    font-size: 2rem;
  }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
  .glass-effect {
    background: rgba(30, 41, 59, 0.8);
  }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
  .glass-effect {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
}

/* 减少动画支持 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 太阳路径图增强 */
#sunPathChart {
  transition: all 0.3s ease;
}

/* 太阳轨迹上的太阳图标：柔和光晕（随呼吸轻微脉动） */
.sun-path-icon {
  filter: drop-shadow(0 0 5px rgba(255, 205, 90, 0.95))
          drop-shadow(0 0 12px rgba(255, 165, 45, 0.6));
}

.sun-path-icon::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 9999px;
  background: radial-gradient(circle,
    rgba(255, 214, 110, 0.5) 0%,
    rgba(255, 175, 55, 0.2) 45%,
    transparent 70%);
  pointer-events: none;
  animation: sunGlowBreath 3s ease-in-out infinite;
}

@keyframes sunGlowBreath {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}

/* 日历单元格交互效果 */
.calendar-grid > div:not(:first-child) {
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-grid > div:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮悬停效果 */
button {
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

button:active {
  transform: scale(0.95);
}

/* 玻璃效果增强 */
.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.glass-effect:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 文本选择样式 */
::selection {
  background: rgba(22, 93, 255, 0.3);
  color: white;
}

::-moz-selection {
  background: rgba(22, 93, 255, 0.3);
  color: white;
}

/* 焦点样式 */
button:focus,
input:focus {
  outline: 2px solid rgba(22, 93, 255, 0.5);
  outline-offset: 2px;
}

/* 加载骨架屏样式 */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
}