:root {
  --hlj-red: #d84a3a;
  --hlj-gold: #caa06b;
  --text-main: #2f2f2f;
  --text-muted: #8a8a8a;
  --panel-bg: #ffffff;
  --detail-bg: #f9f6f1;
  --border-soft: #ececec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "PingFang SC", "Microsoft Yahei", serif;
  background: linear-gradient(135deg, #fdfbfb 0%, #f7f4f0 100%);
  color: var(--text-main);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 32px auto 60px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px 0;
}

.brand-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--hlj-red);
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(216, 74, 58, 0.15);
}

.brand-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 2px;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
}

.filter-card {
  background: var(--panel-bg);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.date-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.date-chip {
  padding: 6px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: #f7f7f7;
  color: #5a5a5a;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.date-chip:hover {
  border-color: var(--hlj-gold);
  color: var(--hlj-gold);
  transform: translateY(-1px);
}

.date-chip.active {
  border-color: var(--hlj-red);
  color: #fff;
  background: linear-gradient(135deg, #d84a3a 0%, #c43d2e 100%);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(216, 74, 58, 0.25);
}

.nav-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--text-main);
  font-size: 26px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-arrow:hover {
  border-color: var(--hlj-gold);
  color: var(--hlj-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(202, 160, 107, 0.25);
}

.date-picker-btn {
  flex: 1;
  max-width: 220px;
  padding: 10px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--text-main);
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.date-picker-btn:hover {
  border-color: var(--hlj-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(202, 160, 107, 0.25);
}

.dropdown-icon {
  font-size: 12px;
  color: var(--text-muted);
}

.scene-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.scene-tab {
  padding: 10px 32px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: #f7f7f7;
  color: #5a5a5a;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.scene-tab:hover {
  border-color: var(--hlj-gold);
  color: var(--hlj-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(202, 160, 107, 0.2);
}

.scene-tab.active {
  border-color: var(--hlj-red);
  color: #fff;
  background: linear-gradient(135deg, #d84a3a 0%, #c43d2e 100%);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(216, 74, 58, 0.3);
}

.date-picker-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: flex-end;
}

.date-picker-modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}

.modal-btn.confirm {
  color: var(--hlj-red);
  font-weight: 600;
}

.picker-container {
  display: flex;
  height: 240px;
  overflow: hidden;
  position: relative;
}

.picker-container::before,
.picker-container::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
  z-index: 1;
}

.picker-container::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0));
}

.picker-container::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
}

.picker-column {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.picker-column::-webkit-scrollbar {
  display: none;
}

.picker-scroll {
  padding: 80px 0;
}

.picker-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  scroll-snap-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.picker-item.selected {
  color: var(--text-main);
  font-weight: 600;
  font-size: 18px;
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.calendar-panel {
  background: var(--panel-bg);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  touch-action: pan-y;
  user-select: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.calendar-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: #2c2c2c;
  letter-spacing: 2px;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 13px;
  color: #a2a2a2;
}

.weekday-row .weekend {
  color: var(--hlj-red);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-cell {
  min-height: 85px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.day-cell:hover:not(.selected):not(.empty) {
  border-color: var(--hlj-gold);
  box-shadow: 0 8px 24px rgba(202, 160, 107, 0.25);
  transform: translateY(-4px);
}

.day-cell.selected {
  background: linear-gradient(135deg, #d84a3a 0%, #c43d2e 100%);
  color: #fff;
  transform: scale(1.05);
  border-color: var(--hlj-red);
  box-shadow: 0 12px 28px rgba(216, 74, 58, 0.35);
  z-index: 1;
}

.day-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.day-cell .solar {
  font-size: 20px;
  font-weight: 700;
  color: #3a3a3a;
  position: relative;
  z-index: 2;
}

.day-cell .lunar {
  font-size: 13px;
  color: #9a9a9a;
  margin-top: 6px;
  position: relative;
  z-index: 2;
}

.day-cell .lunar.festival {
  color: var(--hlj-red);
  font-weight: 600;
}

.day-cell.selected .solar,
.day-cell.selected .lunar {
  color: #fff;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.badge.good {
  background: #ffe6e1;
  color: var(--hlj-red);
}

.badge.mid {
  background: #fff3d6;
  color: #d97706;
}

.badge.bad {
  background: #f1f5f9;
  color: #64748b;
}

.day-cell.selected .badge {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.day-cell.good-outline {
  border-color: rgba(216, 74, 58, 0.25);
}

.calendar-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  min-height: 18px;
}

.detail-panel {
  background: linear-gradient(135deg, #faf8f5 0%, #f9f6f1 100%);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid #efe7db;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 24px;
}

.detail-top {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-date-tag {
  display: inline-block;
  align-self: center;
  background: var(--hlj-gold);
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 2px;
}

.detail-main-date {
  font-size: 38px;
  font-weight: 700;
  color: var(--hlj-red);
  letter-spacing: 2px;
}

.detail-lunar {
  font-size: 17px;
  color: var(--hlj-red);
  letter-spacing: 3px;
}

.status-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  text-align: center;
}

.status-item span {
  font-size: 11px;
  color: #666;
}

.status-pill {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 auto 8px;
  color: #fff;
  background: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.status-pill:hover {
  transform: scale(1.05);
}

.status-pill.good {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.status-pill.mid {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.status-pill.bad {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.status-pill.unknown {
  background: #e5e7eb;
  color: #6b7280;
}

.divider {
  height: 1px;
  background: #f1f1f1;
}

.yi-ji {
  display: grid;
  gap: 12px;
}

.yi-row,
.ji-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #666;
}

.tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
}

.tag-yi {
  background: #e6f7ee;
  color: #16a34a;
}

.tag-ji {
  background: #fdecec;
  color: #dc2626;
}

.hot-card {
  background: linear-gradient(135deg, #2c2c2c 0%, #1f1f1f 100%);
  color: #fff;
  padding: 20px 24px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hot-label {
  font-size: 13px;
  color: #c7c7c7;
  letter-spacing: 1px;
}

.hot-value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 6px;
}

.share-btn {
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.share-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 0 12px;
    margin: 16px auto 24px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .brand-title {
    font-size: 24px;
  }

  .brand-subtitle {
    font-size: 12px;
    margin-top: 4px;
  }

  .breadcrumb {
    font-size: 11px;
  }

  .filter-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .date-selector {
    gap: 8px;
  }

  .mobile-only {
    display: flex;
  }

  .desktop-only {
    display: none;
  }

  .nav-arrow {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .date-picker-btn {
    font-size: 14px;
    padding: 6px 12px;
    display: flex;
  }

  .scene-tabs {
    gap: 6px;
  }

  .scene-tab {
    padding: 6px 20px;
    font-size: 13px;
  }

  .calendar-panel,
  .detail-panel {
    padding: 14px;
  }

  .calendar-title {
    font-size: 22px;
  }

  .weekday-row {
    font-size: 12px;
  }

  .calendar-grid {
    gap: 6px;
  }

  .day-cell {
    min-height: 56px;
  }

  .day-cell .solar {
    font-size: 16px;
  }

  .day-cell .lunar {
    font-size: 11px;
    margin-top: 2px;
  }

  .day-cell .lunar.festival {
    font-size: 10px;
  }

  .badge {
    width: 16px;
    height: 16px;
    font-size: 9px;
    top: 2px;
    right: 2px;
  }

  .detail-panel {
    gap: 14px;
    position: static;
  }

  .detail-top {
    gap: 8px;
  }

  .detail-date-tag {
    font-size: 11px;
    padding: 5px 12px;
  }

  .detail-main-date {
    font-size: 26px;
  }

  .detail-lunar {
    font-size: 14px;
  }

  .status-card {
    padding: 14px;
    gap: 12px;
  }

  .status-grid {
    gap: 10px;
  }

  .status-item span {
    font-size: 11px;
  }

  .status-pill {
    width: 46px;
    height: 46px;
    font-size: 16px;
    margin-bottom: 6px;
  }

  .yi-row,
  .ji-row {
    font-size: 12px;
    gap: 8px;
  }

  .tag {
    font-size: 11px;
    padding: 2px 6px;
  }

  .hot-card {
    padding: 12px 14px;
  }

  .hot-label {
    font-size: 11px;
  }

  .hot-value {
    font-size: 16px;
  }

  .share-btn {
    padding: 5px 12px;
    font-size: 11px;
  }

  .calendar-hint {
    font-size: 11px;
  }
}
