/* ========== 老黄历页面样式 ========== */

.calendar-page {
  min-height: 100vh;
  padding: 120px 0 80px;
  position: relative;
  z-index: 1;
}

/* ========== 页面头部 ========== */
.calendar-header {
  text-align: center;
  margin-bottom: 32px;
}

.calendar-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 48px;
  color: var(--secondary);
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(201, 164, 92, 0.3);
}

.calendar-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* ========== 日期选择器 ========== */
.date-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-nav-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.date-nav-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.date-nav-btn svg {
  width: 20px;
  height: 20px;
}

.date-display {
  background: var(--bg-card);
  border: 2px solid var(--secondary);
  border-radius: 12px;
  padding: 8px 20px;
}

.date-picker-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 20px;
  text-align: center;
  cursor: pointer;
}

.date-picker-input:focus {
  outline: none;
}

.today-btn {
  padding: 10px 20px;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.today-btn:hover {
  transform: scale(1.05);
}

/* ========== 主容器 ========== */
.calendar-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-bottom: 40px;
}

/* ========== 主要内容区 ========== */
.calendar-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 卡片通用样式 */
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 20px;
  color: var(--secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.title-icon {
  font-size: 24px;
}

/* 今日信息卡片 */
.today-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.today-date {
  text-align: center;
}

.lunar-year {
  display: block;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.lunar-month {
  display: block;
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 42px;
  color: var(--secondary);
  line-height: 1.2;
}

.today-solar {
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.solar-date {
  display: block;
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.weekday {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(201, 164, 92, 0.15);
  border-radius: 20px;
  font-size: 14px;
  color: var(--secondary);
}

.today-zodiac {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.zodiac-item {
  text-align: center;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 12px;
}

.zodiac-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.zodiac-name {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.zodiac-value {
  display: block;
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

/* 吉凶方位卡片 */
.directions-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.directions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.direction-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 12px;
  border-left: 3px solid transparent;
}

.direction-item.good {
  border-left-color: #4CAF50;
}

.direction-item.bad {
  border-left-color: #f44336;
}

.direction-label {
  font-size: 13px;
  color: var(--text-muted);
}

.direction-value {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

/* 宜忌事项卡片 */
.yiji-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.yiji-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.yi-section, .ji-section {
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
}

.section-icon.yi {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.section-icon.ji {
  background: linear-gradient(135deg, #f44336, #C62828);
}

.section-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.tag-yi {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.tag-ji {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ========== 侧边栏 ========== */
.calendar-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fortune-card,
.solar-term-card,
.shichen-card,
.bazi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

/* 今日吉凶 */
.fortune-level {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.level-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

.level-badge.good {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.level-badge.mid {
  background: linear-gradient(135deg, #FF9800, #F57C00);
}

.level-badge.bad {
  background: linear-gradient(135deg, #f44336, #C62828);
}

.level-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.fortune-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: justify;
}

/* 节气信息 */
.solar-term-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.current-term {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(201, 164, 92, 0.1), rgba(139, 41, 66, 0.1));
  border-radius: 10px;
}

.term-name {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 24px;
  color: var(--secondary);
}

.term-date {
  font-size: 13px;
  color: var(--text-muted);
}

.next-term {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.next-label {
  font-size: 12px;
  color: var(--text-muted);
}

.next-name {
  font-size: 18px;
  color: var(--text-primary);
}

.next-date {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 时辰吉凶 */
.shichen-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.shichen-item {
  display: grid;
  grid-template-columns: 50px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: 8px;
}

.shichen-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.shichen-time {
  font-size: 12px;
  color: var(--text-muted);
}

.shichen-fortune {
  text-align: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.shichen-fortune.good {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
}

.shichen-fortune.mid {
  background: rgba(255, 152, 0, 0.15);
  color: #FF9800;
}

.shichen-fortune.bad {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
}

/* 五行八字 */
.bazi-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bazi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-primary);
  border-radius: 8px;
}

.bazi-label {
  font-size: 14px;
  color: var(--text-muted);
}

.bazi-value {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
  font-family: 'Ma Shan Zheng', cursive;
}

/* ========== 十二生肖运势 ========== */
.zodiac-fortune-section {
  margin-top: 40px;
}

.zodiac-fortune-section .section-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 28px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 24px;
}

.zodiac-fortune-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.zodiac-fortune-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.zodiac-fortune-item:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.zodiac-fortune-item.today {
  border-color: var(--secondary);
  background: linear-gradient(135deg, rgba(201, 164, 92, 0.1), rgba(139, 41, 66, 0.05));
}

.zodiac-icon-wrapper {
  font-size: 40px;
  margin-bottom: 12px;
}

.zodiac-name-text {
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.zodiac-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.score-value {
  font-size: 28px;
  font-weight: bold;
}

.score-value.high {
  color: #4CAF50;
}

.score-value.mid {
  color: #FF9800;
}

.score-value.low {
  color: #f44336;
}

.score-label {
  font-size: 12px;
  color: var(--text-muted);
}

.zodiac-keyword {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 12px;
  background: var(--bg-primary);
  border-radius: 10px;
  display: inline-block;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .calendar-container {
    grid-template-columns: 1fr;
  }

  .calendar-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .zodiac-fortune-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .calendar-page {
    padding: 100px 0 60px;
  }

  .calendar-title {
    font-size: 36px;
  }

  .date-selector {
    flex-direction: column;
  }

  .calendar-sidebar {
    grid-template-columns: 1fr;
  }

  .zodiac-fortune-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .today-zodiac {
    grid-template-columns: 1fr;
  }

  .directions-grid {
    grid-template-columns: 1fr;
  }
}
