/* 网站导航页面（/nav/）专属样式
 * 页面结构见 source/nav/index.md，交互见 /js/butterfly/nav-page.js
 * 复刻自 qiqi.ee（Nuxt 版 /nav）：时钟 + 农历 + 搜索 + 快捷方式
 */

.nav-page {
  position: relative;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 背景透明，露出全站背景图（与线上 blog.qiqii.cn/nav 一致） */
  background: none;
}

/* 飘落的花瓣/余烬 */
.nav-petals {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.nav-petal {
  position: absolute;
  bottom: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50% 0 50% 50%;
  background-color: rgba(255, 150, 130, 0.75);
  animation: nav-petal-rise 12s linear infinite;
  opacity: 0;
}
.nav-petal.petal-1  { left: 37%; animation-duration: 10.3s; animation-delay: -1.7s; width: 9px;  height: 9px; }
.nav-petal.petal-2  { left: 74%; animation-duration: 11.6s; animation-delay: -3.4s; width: 12px; height: 12px; }
.nav-petal.petal-3  { left: 11%; animation-duration: 12.9s; animation-delay: -5.1s; width: 6px;  height: 6px; }
.nav-petal.petal-4  { left: 48%; animation-duration: 14.2s; animation-delay: -6.8s; width: 9px;  height: 9px; }
.nav-petal.petal-5  { left: 85%; animation-duration: 15.5s; animation-delay: -8.5s; width: 12px; height: 12px; }
.nav-petal.petal-6  { left: 22%; animation-duration: 16.8s; animation-delay: -10.2s; width: 6px;  height: 6px; }
.nav-petal.petal-7  { left: 59%; animation-duration: 18.1s; animation-delay: -11.9s; width: 9px;  height: 9px; }
.nav-petal.petal-8  { left: 96%; animation-duration: 19.4s; animation-delay: -13.6s; width: 12px; height: 12px; }
.nav-petal.petal-9  { left: 33%; animation-duration: 20.7s; animation-delay: -15.3s; width: 6px;  height: 6px; }
.nav-petal.petal-10 { left: 70%; animation-duration: 22s;   animation-delay: -17s;   width: 9px;  height: 9px; }

.nav-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8vh 20px 24px;
  color: #ffffff;
}

/* 中央：时钟 + 日期 + 搜索 */
.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-clock {
  font-size: 76px;
  font-weight: 700;
  letter-spacing: 4px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.nav-lunar-date {
  margin-top: 10px;
  font-size: 19px;
  letter-spacing: 3px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.nav-solar-date {
  margin-top: 6px;
  font-size: 16px;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* 搜索框（毛玻璃） */
.nav-search-box {
  margin-top: 34px;
  width: min(520px, 86vw);
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 6px 0 14px;
  border-radius: 23px;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.nav-search-box .nav-engine {
  padding: 3px 10px;
  margin-right: 8px;
  border-radius: 12px;
  font-size: 13px;
  background-color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.nav-search-box .nav-engine:hover {
  background-color: rgba(255, 255, 255, 0.35);
}
.nav-search-box input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
}
.nav-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}
.nav-search-box .nav-search-btn {
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}
.nav-search-box .nav-search-btn:hover {
  background-color: #eb7a4e;
}

/* 底部：快捷方式 */
.nav-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-shortcuts {
  display: flex;
}
.nav-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 18px;
  cursor: pointer;
  color: #ffffff;
  text-decoration: none;
}
.nav-shortcut .icon {
  width: 52px;
  height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 20px;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.nav-shortcut .icon:hover {
  transform: translateY(-4px);
  background-color: #eb7a4e;
}
.nav-shortcut .name {
  margin-top: 8px;
  font-size: 13px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

/* 更多：站内导航面板（毛玻璃） */
.nav-more-panel {
  margin-top: 22px;
  padding: 16px 22px;
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(640px, 90vw);
  border-radius: 15px;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-more-panel.show {
  display: flex;
  animation: nav-panel-fade 0.3s ease;
}
.nav-more-item {
  display: flex;
  align-items: center;
  margin: 8px 14px;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
}
.nav-more-item i {
  margin-right: 6px;
  width: 16px;
  text-align: center;
}
.nav-more-item:hover {
  color: #ffb4a0;
}

/* 花瓣上升动画 */
@keyframes nav-petal-rise {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-105vh) translateX(40px) rotate(320deg);
    opacity: 0;
  }
}

/* 展开面板过渡 */
@keyframes nav-panel-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 移动端 */
@media (max-width: 768px) {
  .nav-page .nav-content {
    padding-top: 5vh;
  }
  .nav-clock {
    font-size: 54px;
  }
  .nav-lunar-date {
    font-size: 16px;
  }
  .nav-solar-date {
    font-size: 14px;
  }
  .nav-shortcut {
    margin: 0 10px;
  }
  .nav-shortcut .icon {
    width: 46px;
    height: 46px;
    font-size: 17px;
  }
  .nav-shortcut .name {
    font-size: 12px;
  }
}
