/* ============================================
   B613小行星 — 黄绿清新主题
   ============================================ */

html { scroll-behavior: smooth; }

:root {
  --bg-body: #e8e4c0;
  --bg-card: rgba(242, 240, 210, 0.58);
  --bg-card-hover: rgba(252, 250, 230, 0.82);
  --border-card: rgba(106, 138, 58, 0.18);
  --border-hover: rgba(106, 138, 58, 0.4);
  --text-dark: #3a4a28;
  --text-body: #5a6a3a;
  --text-muted: #8a9a6a;
  --gold: #a08830;
  --gold-light: #c4a848;
  --rose: #c88078;
  --olive: #6a8a3a;
}

/* ===== 全局背景：优先图片，回退黄绿渐变 ===== */
[data-md-color-scheme="default"] {
  --md-default-bg-color: transparent;
  --md-default-fg-color: #3a4a28;
  --md-default-fg-color--light: #5a6a3a;
  --md-default-fg-color--lighter: #8a9a6a;
  --md-primary-fg-color: transparent;
  --md-accent-fg-color: #8a7828;
}

body {
  background-color: #e8e4c0;
  background-image: url("/assets/bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* 画布纹理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ===== 导航栏 ===== */
.md-header {
  background: rgba(232, 228, 192, 0.65) !important;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(106, 138, 58, 0.12);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.3) !important;
  color: #3a4a28 !important;
}

.md-tabs {
  background: rgba(232, 228, 192, 0.5) !important;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(106, 138, 58, 0.06);
}

.md-header__title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.35rem;
  color: #4a5a2a !important;
  letter-spacing: 0.04em;
}

.md-tabs__link {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.95rem;
}

.md-tabs__link--active,
.md-tabs__link:hover { color: #7a6828 !important; }

/* ===== 内容区 ===== */
.md-main__inner { margin-top: 0; }
.md-content { background: transparent !important; }
.md-content__inner { padding-top: 0; }

.md-typeset {
  font-family: 'Noto Serif SC', 'STSong', serif;
  font-size: 1rem;
  line-height: 1.9;
  color: #4a5a32;
}

/* ============================================
   封面 Hero
   ============================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 60px 32px;
  box-sizing: border-box;
  background: linear-gradient(180deg,
    rgba(232, 228, 192, 0.3) 0%,
    rgba(220, 220, 180, 0.4) 35%,
    rgba(200, 205, 160, 0.55) 70%,
    rgba(180, 190, 140, 0.7) 100%
  );
}

.hero-stars-wrap { position: absolute; inset: 0; pointer-events: none; }

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 var(--glow, 6px) rgba(255, 255, 220, 0.7);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.8); }
  60% { opacity: 0.9; transform: scale(1.4); }
}

.shooting-star {
  position: absolute;
  width: 80px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(255,255,220,0), rgba(255,255,220,0.6));
  border-radius: 1px;
  animation: shoot linear infinite;
  opacity: 0;
}

@keyframes shoot {
  0%   { transform: translateX(0) translateY(0); opacity: 0; }
  2%   { opacity: 1; }
  8%   { opacity: 0; }
  100% { transform: translateX(-400px) translateY(300px); opacity: 0; }
}

.hero-moon {
  position: absolute;
  top: 5%;
  right: 8%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 40% 40%, #fefce0, #f8e870 30%, #e0c840 70%, #c09830 100%);
  border-radius: 50%;
  box-shadow: 0 0 100px rgba(240, 230, 80, 0.25), 0 0 200px rgba(240, 230, 80, 0.1), 0 0 300px rgba(220, 200, 60, 0.05);
  animation: moonGlow 3.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes moonGlow {
  0%, 100% { box-shadow: 0 0 100px rgba(240,230,80,0.25), 0 0 200px rgba(240,230,80,0.1); }
  50% { box-shadow: 0 0 140px rgba(240,230,80,0.35), 0 0 280px rgba(240,230,80,0.15), 0 0 400px rgba(220,200,60,0.08); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: heroFadeIn 1.2s ease-out both;
}

@keyframes heroFadeIn {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-pre-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  color: rgba(60, 80, 20, 0.65);
  letter-spacing: 0.24em;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 8rem;
  font-weight: 400;
  color: #2a3818;
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-shadow: 0 0 30px rgba(255,255,255,0.7), 0 0 80px rgba(255,255,240,0.4), 0 4px 8px rgba(0,0,0,0.08);
}

.hero-subtitle {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  color: rgba(60, 80, 20, 0.6);
  margin-top: 28px;
  letter-spacing: 0.12em;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(80, 100, 30, 0.5);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  animation: heroFadeIn 1.2s ease-out 0.8s both;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 1.5px solid rgba(120, 140, 60, 0.5);
  border-bottom: 1.5px solid rgba(120, 140, 60, 0.5);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(10px); }
}

/* ============================================
   内容区
   ============================================ */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px 56px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-family: 'Ma Shan Zheng', 'ZCOOL KuaiLe', cursive;
  font-size: 2.8rem;
  font-weight: 400;
  color: #4a5a28;
  margin: 0;
  letter-spacing: 0.08em;
}

.section-header .divider {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8a9a4a, transparent);
  margin: 24px auto 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

@media (max-width: 1100px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.reveal-card {
  opacity: 0;
  transform: translateY(36px);
  transition: all 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform, opacity;
}

.reveal-card.revealed { opacity: 1; transform: translateY(0); }

.prince-card {
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-radius: 30px;
  border: 1px solid var(--border-card);
  padding: 48px 32px 40px;
  text-align: center;
  text-decoration: none;
  color: #3a4a28;
  display: block;
  transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  position: relative;
  overflow: hidden;
  will-change: transform;
  box-shadow: 0 4px 28px rgba(80,100,30,0.05), inset 0 1px 0 rgba(255,255,255,0.35);
}

.prince-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 18px 50px rgba(80, 100, 30, 0.12), 0 0 35px rgba(160, 180, 60, 0.06);
}

.prince-card:hover::before { opacity: 1; }
.prince-card:active { transform: scale(0.97); }

.prince-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(210, 240, 100, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.prince-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #8a9a4a, transparent);
  border-radius: 1.5px;
  transition: width 0.4s ease;
}

.prince-card:hover::after { width: 70%; }

.prince-card .card-icon {
  font-size: 44px;
  margin-bottom: 24px;
  display: inline-block;
  color: rgba(140, 160, 40, 0.65);
  text-shadow: 0 0 24px rgba(160, 180, 60, 0.3);
  transition: all 0.4s ease;
}

.prince-card:hover .card-icon {
  text-shadow: 0 0 36px rgba(160, 180, 60, 0.5);
  transform: scale(1.08);
}

.prince-card .card-title {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 12px;
  color: #4a5a28;
}

.prince-card .card-desc {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.95rem;
  color: #8a9a6a;
  line-height: 1.6;
}

.prince-card .card-badge {
  display: inline-block;
  background: rgba(140, 160, 40, 0.12);
  color: rgba(120, 140, 40, 0.7);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.82rem;
  padding: 5px 18px;
  border-radius: 12px;
  margin-top: 18px;
  letter-spacing: 0.05em;
}

/* ============================================
   结尾
   ============================================ */
.end-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 700px;
  margin: 36px auto 60px;
  padding: 0 32px;
}

.end-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 160, 40, 0.4), transparent);
}

.end-text {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 1.5rem;
  color: rgba(120, 140, 60, 0.5);
  white-space: nowrap;
  letter-spacing: 0.14em;
}

/* ============================================
   子页面
   ============================================ */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 32px;
}

.page-panel {
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-radius: 26px;
  border: 1px solid var(--border-card);
  padding: 46px 40px;
  margin-bottom: 28px;
  animation: panelIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  will-change: transform, opacity;
  box-shadow: 0 4px 28px rgba(80,100,30,0.05), inset 0 1px 0 rgba(255,255,255,0.35);
}

.page-panel:nth-child(2) { animation-delay: 0.1s; }
.page-panel:nth-child(3) { animation-delay: 0.2s; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-panel h2 {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #4a5a28;
}

.page-panel h2 i {
  font-size: 30px;
  color: rgba(140, 160, 40, 0.65);
  text-shadow: 0 0 18px rgba(160, 180, 60, 0.25);
}

.page-panel p {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  color: #5a6a3a;
  line-height: 2;
  margin: 0;
}

/* 列表 */
.page-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(180, 200, 80, 0.06);
  border-radius: 16px;
  border: 1px solid rgba(140, 160, 40, 0.12);
  text-decoration: none;
  color: #5a6a3a;
  font-family: 'Noto Serif SC', serif;
  font-size: 0.98rem;
  transition: all 0.3s ease;
}

.page-item:hover {
  background: rgba(180, 200, 80, 0.12);
  border-color: rgba(140, 160, 40, 0.28);
  transform: translateX(6px);
  color: #3a4a28;
}

.page-item i {
  font-size: 22px;
  color: rgba(140, 160, 40, 0.5);
  width: 30px;
  text-align: center;
}

.page-item .item-tag {
  margin-left: auto;
  font-size: 0.82rem;
  color: rgba(130, 150, 50, 0.35);
}

/* ============================================
   日历
   ============================================ */
.calendar-glass {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px;
}

.calendar-glass .cal-container {
  background: var(--bg-card);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-radius: 26px;
  border: 1px solid var(--border-card);
  padding: 40px 34px;
  animation: panelIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  box-shadow: 0 4px 28px rgba(80,100,30,0.05), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ============================================
   背景切换
   ============================================ */
.bg-switcher {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 100;
  opacity: 0.65;
  transition: opacity 0.3s;
}

.bg-switcher:hover { opacity: 1; }

.bg-switcher-btn {
  background: rgba(232, 228, 192, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(106, 138, 58, 0.2);
  color: rgba(100, 130, 40, 0.7);
  padding: 9px 20px;
  border-radius: 24px;
  cursor: pointer;
  font-family: 'Noto Serif SC', serif;
  font-size: 0.88rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bg-switcher-btn:hover {
  border-color: rgba(106, 138, 58, 0.4);
  color: #5a7a2a;
}

.bg-options-panel {
  position: absolute;
  top: 50px;
  right: 0;
  background: rgba(238, 234, 200, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(106, 138, 58, 0.18);
  border-radius: 16px;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 210px;
}

.bg-options-panel.open { display: flex; }

.bg-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #5a6a3a;
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  text-align: left;
}

.bg-option:hover { background: rgba(140, 160, 40, 0.08); }
.bg-option.active { background: rgba(140, 160, 40, 0.16); color: #4a5a28; }

.bg-option-swatch {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(106, 138, 58, 0.3);
  flex-shrink: 0;
}

/* ============================================
   页脚 & 其他
   ============================================ */
.md-footer {
  background: rgba(232, 228, 192, 0.7) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(106, 138, 58, 0.1);
  color: #5a6a3a !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140, 160, 40, 0.15); border-radius: 4px; }

.md-search__form {
  background: rgba(200, 210, 150, 0.15) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(140, 160, 40, 0.2) !important;
}

/* ============================================
   更新日志（纯 div + checkbox，无浏览器 default）
   ============================================ */
.cl-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  border: 1px solid rgba(180,200,80,0.12);
  box-shadow: 0 2px 16px rgba(80,100,30,0.04), inset 0 1px 0 rgba(255,255,255,0.3);
}

.cl-toggle { display: none; }

.cl-toggle + .cl-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; cursor: pointer; border-radius: 18px;
  font-family: 'Noto Serif SC', serif; font-size: 0.9rem; font-weight: 500;
  color: #5a6a3a; transition: all .25s ease;
}

.cl-toggle + .cl-header:hover { color: #3a4a28; background: rgba(180,200,80,0.04); }

.cl-toggle ~ .cl-body { display: none; }

.cl-toggle:checked ~ .cl-body {
  display: block;
  border-top: 1px solid rgba(180,200,80,0.08);
  padding: 8px 20px 16px;
}

.cl-toggle:checked + .cl-header { border-radius: 18px 18px 6px 6px; }

.cl-item {
  display: flex; gap: 16px; padding: 8px 0;
  border-bottom: 1px solid rgba(180,200,80,0.06);
  align-items: baseline;
}

.cl-item:last-child { border-bottom: none; }

.cl-date {
  font-family: 'Noto Serif SC', serif; font-size: 0.82rem; font-weight: 500;
  color: #9a9a6a; white-space: nowrap; flex-shrink: 0;
}

.cl-desc {
  font-family: 'Noto Serif SC', serif; font-size: 0.9rem; font-weight: 400;
  color: #4a5a28; line-height: 1.5;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
  .hero-title { font-size: 3.2rem; }
  .section-header h2 { font-size: 2.2rem; }
  .page-panel h2 { font-size: 1.6rem; }
}
