/* 精致简约日历容器 - 修改版 */
.elegant-calendar {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

/* 表格整体样式 */
.elegant-calendar table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
}

/* 表头样式 - 精致简约 */
.elegant-calendar th {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  color: #475569;
  font-weight: 500;
  font-size: 14px;
  padding: 14px 0;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  letter-spacing: 0.3px;
}

/* 给表头添加微妙的底部装饰 */
.elegant-calendar th:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

/* 单元格样式 */
.elegant-calendar td {
  height: 48px;
  text-align: center;
  vertical-align: middle;
  border: none;
  position: relative;
  transition: background-color 0.2s ease;
}

/* 单元格之间的分隔效果 */
.elegant-calendar tr:not(:last-child) td {
  border-bottom: 1px solid #f1f5f9;
}

/* 日期链接样式 */
.elegant-calendar td a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #334155;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

/* 日期悬停效果 - 圆形背景 */
.elegant-calendar td:not(:empty):hover a {
  color: #1e293b;
}

.elegant-calendar td:not(:empty):hover:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border-radius: 50%;
  z-index: 0;
}

/* 空单元格 */
.elegant-calendar td:empty {
  background: transparent;
}

/* 周末样式 */
.elegant-calendar th:nth-child(6),
.elegant-calendar th:nth-child(7),
.elegant-calendar td:nth-child(6) a,
.elegant-calendar td:nth-child(7) a {
  color: #94a3b8;
}

/* 今天日期样式 - 优雅的圆形设计 */
.elegant-calendar .bg_red_thin {
  background: transparent !important;
}

.elegant-calendar .bg_red_thin:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50%;
  z-index: 0;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.elegant-calendar .bg_red_thin a {
  color: white !important;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* 添加这个新的规则 - 当前日期悬停时的文字颜色改为黑色 */
.elegant-calendar .bg_red_thin:hover a {
  color: #1e293b !important; /* 黑色 */
}

/* 同时修改当前日期悬停时的背景为灰色 */
.elegant-calendar .bg_red_thin:hover:before {
  background: #f1f5f9 !important; /* 灰色背景 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 调整阴影 */
}

/* 特殊日期样式 - 改为红色圆圈圈住（无背景色） */
.elegant-calendar .bg_bisque {
  background: transparent !important;
}

.elegant-calendar .bg_bisque:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border: 2px solid #ef4444; /* 红色边框，形成圆圈效果 */
  border-radius: 50%;
  z-index: 0;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.elegant-calendar .bg_bisque a {
  color: #ef4444 !important; /* 保持数字为红色 */
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* 特殊日期悬停效果 */
.elegant-calendar .bg_bisque:hover:before {
  border-color: #dc2626; /* 悬停时边框颜色变深 */
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.3);
  transform: translate(-50%, -50%) scale(1.05);
}

/* 当既有特殊日期又有悬停效果时的样式处理 */
.elegant-calendar .bg_bisque:hover a {
  color: #dc2626 !important;
}

/* 当前月份之外的日期 */
.elegant-calendar td:empty {
  background: transparent;
}

/* 修改焦点样式 - 去掉蓝色框 */
.elegant-calendar td a:focus {
  outline: none;
  border-radius: 50%;
}

/* 微妙的圆角效果 */
.elegant-calendar table:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
}

/* 平滑过渡效果 */
.elegant-calendar td,
.elegant-calendar th,
.elegant-calendar a,
.elegant-calendar .bg_bisque:before {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 日期选择时的微妙反馈 */
.elegant-calendar td:active:not(:empty):before {
  transform: translate(-50%, -50%) scale(0.95);
}

/* 特殊日期激活时的效果 */
.elegant-calendar .bg_bisque:active:before {
  transform: translate(-50%, -50%) scale(0.95);
  border-color: #b91c1c;
}

/* 日历导航样式 - 新添加 */
.calendar-navigation {
  width: 100%;
  border-top: 1px solid #f0f0f0;
  background: #f8fafc;
}

.calendar-navigation tr {
  display: flex;
  justify-content: space-between;
}

.calendar-navigation td {
  flex: 1;
  text-align: center;
  padding: 0;
}

.calendar-navigation a {
  display: block;
  padding: 14px 16px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

/* 导航链接悬停效果 */
.calendar-navigation a:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* 为今日老黄历按钮添加特殊样式 */
.calendar-navigation td:nth-child(2) a {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  font-weight: 600;
}

.calendar-navigation td:nth-child(2) a:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* 给导航链接添加微妙的左右边框分隔线 */
.calendar-navigation td:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

/* 导航链接激活效果 */
.calendar-navigation a:active {
  transform: scale(0.98);
}

/* 响应式调整 */
@media (max-width: 480px) {
  .elegant-calendar {
    max-width: 100%;
    border-radius: 10px;
  }
  
  .elegant-calendar th {
    padding: 12px 0;
    font-size: 13px;
  }
  
  .elegant-calendar td {
    height: 44px;
  }
  
  .elegant-calendar td a {
    font-size: 14px;
  }
  
  .elegant-calendar .bg_red_thin:before,
  .elegant-calendar .bg_bisque:before,
  .elegant-calendar td:not(:empty):hover:before {
    width: 34px;
    height: 34px;
  }
  
  /* 移动端导航调整 */
  .calendar-navigation a {
    padding: 12px 8px;
    font-size: 13px;
  }
}