/* 全局样式重置（可选，提升兼容性） */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 导航栏样式 */
nav {
  display: flex;
  background-color: rgb(117, 84, 84);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 45px;
  width: 100%;
  border-radius: 0;
  align-items: center;
  padding: 5px;
  z-index: 1000;
  margin: 0;
  box-sizing: border-box;
}

nav>a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  width: 80px;
  font-size: large;
  font-weight: 200;
  color: antiquewhite;
  border-radius: 20px;
  text-decoration: none;
  margin-right: 5px;
}

nav>a:hover {
  background-color: #25dd6596;
}

/* 页面主体样式 */
body {
  display: flex;
  background-color: black;
  margin: 50px;
  justify-content: center;
  align-items: flex-start; /* 调整对齐方式，避免卡片顶部被截断 */
  padding: 20px;
  flex-wrap: wrap;
  min-height: 100vh; /* 确保页面占满屏幕高度 */
  padding-top: 120px; /* 给导航和提示文字预留空间 */
}

h1 {
  color: aqua;
  font-size: larger;
  position: fixed;
  left: 20px; /* 调整为固定间距，避免重叠 */
  top: 10px;
  text-decoration: none;
  z-index: 1001; /* 确保标题在导航栏上层 */
}

.text1 {
  text-decoration: none;
  font-size: 30px;
  font-weight: bolder;
  color: rgb(236, 9, 9);
  /* 文字阴影，提升背景图上的可读性 */
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.text2 {
  text-decoration: none;
  font-size: 30px;
  font-weight: 400;
}

/* 弹窗样式 */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

.modal-content {
  background: linear-gradient(135deg, #2c3e50, #4ca1af);
  padding: 40px 60px;
  border-radius: 20px;
  text-align: center;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  animation: scaleUp 0.5s forwards;
}

.modal-content.day {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  color: #e64a19;
}

.modal-content p {
  font-size: 24px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.modal-btn {
  padding: 12px 30px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn.day {
  background-color: #ff9800;
}

.modal-btn.day:hover {
  background-color: #f57c00;
}

.modal-btn:hover {
  background-color: #c0392b;
  transform: scale(1.05);
}

/* 弹窗动画 */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scaleUp {
  to {
    transform: scale(1);
  }
}

/* ========== 核心：通用卡片样========== */
.card {
  width: 300px;
  height: 200px;
  margin: 10px;
  padding: 10px;
  border-radius: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* 背景相关公共属性 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(0, 0, 0, 0.7);
  background-blend-mode: overlay;
  /* 过渡动画 */
  transition: all 0.3s ease;
}

/* 卡片hover效果 */
.card:hover {
  transform: scale(1.1);
  background-color: rgb(78, 86, 86);
}

/* 提示文字样式 */
.attention-text {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 30px;
  font-weight: bold;
  color: #00ffff;
  padding: 10px 0;
  background-color: rgba(0, 0, 0, 1);
  z-index: 999;
  margin-bottom: 20px;
}

/* 适配移动端 */
@media (max-width: 768px) {
  .attention-text {
    font-size: 18px;
    top: 50px;
  }
  .card {
    width: calc(100% - 20px); /* 移动端卡片占满宽度 */
  }
  nav>a {
    font-size: medium;
    width: 70px;
  }
  .text1 {
    font-size: 24px;
  }
}