/* 基础样式重置与设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 颜色变量 - 在这里修改颜色会影响整个页面 */
:root {
  --primary-color: #2c3e50;       /* 主要文字颜色 */
  --secondary-color: #3498db;     /* 次要文字颜色 */
  --accent-color: #e74c3c;        /* 强调色（用于冒号等） */
  --background-color: rgb(214 202 245);    /* 页面背景色 */
  --card-background: rgba(255, 255, 255, 0.9); /* 卡片背景 */
  --date-item-bg: #f8f9fa;        /* 日期项背景 */
  --text-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 文字阴影 */
}

/* 页面基础样式 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--background-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  padding: 20px;
  transition: all 300ms ease-in-out;
}

/* 主容器 */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* 卡片容器 */
.card {
  background-color: var(--card-background);
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 2rem;
  transition: all 300ms ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* 标题区域 */
.title-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

#main-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: var(--text-shadow);
  margin-bottom: 0.5rem;
}

#greeting {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--secondary-color);
  opacity: 0.8;
}

/* 时间显示区域 */
.time-section {
  text-align: center;
  margin-bottom: 2rem;
}

#time {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.time-digit {
  color: var(--primary-color);
  display: inline-block;
  transition: transform 0.3s ease;
}

.colon {
  color: var(--accent-color);
  animation: breathe 1.5s infinite;
}

#period {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: normal;
  color: var(--secondary-color);
  margin-left: 0.5rem;
}

/* 日期信息区域 */
.date-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .date-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.date-item {
  background-color: var(--date-item-bg);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 300ms ease-in-out;
}

.date-item:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background-color: rgba(255, 255, 255, 0.8);
}

.date-label {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
  color: #000000;
}

.date-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

@media (min-width: 768px) {
  .date-label {
    font-size: 1rem;
  }
  
  .date-value {
    font-size: 1.5rem;
  }
}

/* 位置信息 */
.location-info {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.7;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.location-info a {
  color: var(--secondary-color);
  text-decoration: none;
}

.location-info a:hover {
  text-decoration: underline;
}

/* 页脚 */
footer {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
  margin-top: 2rem;
  color: var(--primary-color);
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* 地图标记图标 */
.icon-map-marker {
  display: inline-block;
  width: 1em;
  height: 1em;
  position: relative;
  margin-right: 0.5rem;
  color: var(--accent-color);
}

.icon-map-marker::after {
  content: '';
  position: absolute;
  width: 0.5em;
  height: 0.5em;
  background-color: currentColor;
  border-radius: 50%;
  top: 0.2em;
  left: 0.25em;
}

.icon-map-marker::before {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  border: 0.1em solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
}

/* 动画效果 */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.time-digit.change {
  animation: pulse 0.3s ease;
}

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

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

