@font-face {
  font-family: 'dtm';
  src: url('../data/font/dtm.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}
:root {
  --primary: #4CAF50;
  --primary-dark: #3d8b40;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f5f5f5;
}

/* 全局 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'dtm', "Microsoft YaHei", Arial, sans-serif; background: var(--bg-light); }

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 20px;
}
main {
  flex: 1; /* 主体区域占满剩余空间 */
}
/* 背景 */
.bg-container {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
}
.bg-container img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.5; filter: blur(5px) brightness(0.6);
}
/* 整个头部区域 */
.site-header {
  text-align: center;
  padding: 20px 10px;
  background: rgba(0,0,0,0.6); /* 半透明背景，融合感更强 */
  border-bottom: 2px solid var(--primary);
}

/* logo */
.site-logo {
  width: 80px;
  height: auto;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
}

/* 主标题 */
.site-title {
  font-size: 2rem;
  margin: 0;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  position: relative;
  display: inline-block;
}

/* 副标题（MC风格） */
.mc-subtitle {
  position: absolute;
  bottom: -15px;
  right: -30px;
  transform: rotate(-30deg);
  font-size: 0.9rem;
  font-weight: bold;
  color: #FFD700;
  animation: mc-blink 1.2s infinite ease-in-out;
  white-space: nowrap;
}

/* 导航条 */
.navbar {
  margin-top: 15px;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center; /* 居中 */
  gap: 30px;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 0;
  transition: color 0.3s, border-bottom 0.3s;
}

.nav-links a:hover {
  color: #FFD700; /* 和副标题呼应 */
}

.nav-links a.active {
  border-bottom: 2px solid var(--primary);
}


/* 主体 */
.main-content {
  max-width: 1200px; /* 适当加宽容器，容纳更多卡片 */
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

/* 信息显示 */
.season-info {
  max-width: 400px;  /* 不要太宽 */
  margin: 10px auto;
}

/* 卡片容器 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; /* 卡片间距 */
  margin: 20px auto;
}

/* 卡片 */
.card {
  background: rgba(255, 255, 255, 1);
  backdrop-filter: 6px;
  padding: 20px;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  max-width: 800px;
  text-align: center;
  line-height: 1.6;
  transition: 0.3s;
}
.card:hover {
  transform: scale(1.05) translateY(-2px);
}
.card-img { 
  width: 100%; height: 150px; 
  object-fit: cover; border-radius: 5px; 
  margin-bottom: 15px; 
}
.card-title { font-size: 1.3rem; color: var(--text-dark); margin-bottom: 10px; }
.card-text { font-size: 0.95rem; color: var(--text-light); margin-bottom: 15px; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary);
  color: white; font-weight: bold;
  border-radius: 5px; text-decoration: none;
  transition: 0.3s;
}
.btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 动画 */
.slide-element {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s ease forwards;
  animation-delay: calc(var(--i, 1) * 0.15s);
  transition: 0.3s;
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* 大图（响应式优化） */
.hero-img {
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 20px auto;
  border-radius: 8px;
  display: block;
}

/* 提示/通知 */
.alert {
  max-width: 700px;
  margin: 20px auto;
  text-align: center;
  line-height: 1.6;
}
.alert-light { color: var(--text-dark); background: rgba(255,255,255,0.6); padding: 10px; border-radius: 6px; }
.alert-dark { color: white; background: rgba(0,0,0,0.7); padding: 10px; border-radius: 6px; }

.footer {
  margin-top: auto;
  background: rgba(0,0,0,0.7);   /* 半透明黑，和 header 背景一致 */
  text-align: center;            /* 居中对齐，视觉平衡 */
  padding: 15px 20px;
  color: #eee;                   /* 淡色文字 */
  font-size: 0.9rem;
  border-top: 2px solid var(--primary); /* 呼应导航条的主题色 */
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.3s;
}

.footer a:hover {
  color: #FFD700; /* 和副标题呼应 */
}

.footer p {
  margin: 5px 0;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-content { padding: 10px; }
  .card-container { grid-template-columns: 1fr; }
  .hero-img { max-width: 100%; margin: 10px auto; }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .card-container { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1201px) {
  .card-container { grid-template-columns: repeat(3, 1fr); }
}

.mc-subtitle {
  position: absolute;
  bottom: 0px;  /* 在主标题右下角 */
  right: -80px;
  transform: rotate(-30deg);
  font-weight: bold;
  color: #ffff00;
  animation: mc-blink 0.8s infinite ease-in-out;
  white-space: nowrap; /* 不换行 */
}

@keyframes mc-blink {
  0%, 100% {
    transform: rotate(-30deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotate(-30deg) scale(1.2);
    opacity: 0.9;
  }
}

/* 时间与年龄显示 */
#date-info {
  margin-top: 8px;
  white-space: pre-line; /* 支持 \n 或 innerHTML 换行 */
  color: #222;
  font-weight: 500;
}

/* 主体文字区域统一框架 */
.text-box {
  background: rgba(255, 255, 255, 0.75); /* 半透明白色 */
  backdrop-filter: blur(6px);            /* 毛玻璃效果（现代浏览器支持） */
  padding: 20px;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  max-width: 800px;
  text-align: center;
  line-height: 1.6;
  transition: 0.3s;
}
.text-box:hover {
  transform: scale(1.05) translateY(-2px);
}
.text-box h1, 
.text-box h2, 
.text-box h3 {
  color: #222;  /* 深色标题 */
}
.text-box p {
  color: #333;  /* 比正文更深的灰色，保证对比度 */
}
