/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ui-bg-1); }
::-webkit-scrollbar-thumb { background: var(--ui-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ui-muted); }

/* 侧边栏链接激活态 */
.nav-item {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  color: var(--ui-text, inherit);
}
.nav-item.active { background: var(--ui-accent-soft, rgba(255,255,255,0.15)); color: var(--ui-accent); }
.nav-item.active .nav-dot { opacity: 1; }
.nav-dot { opacity: 0; width: 4px; border-radius: 2px; background: var(--ui-good); }

/* 卡片悬浮 */
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--ui-shadow); }

/* 渐变文字 */
.grad-text {
  background: var(--ui-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 道具图标容器 */
.item-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ui-panel-2), var(--ui-line));
  flex-shrink: 0;
  overflow: hidden;
}
.item-icon img { width: 100%; height: 100%; object-fit: contain; }
.item-icon .no-img { font-size: 1.8rem; }

/* 稀有度颜色 */
.rarity-1 { color: var(--rare-common); }
.rarity-2 { color: var(--ui-good); }
.rarity-3 { color: var(--rare-precious); }
.rarity-4 { color: var(--ui-special); }
.rarity-5 { color: var(--ui-warn); }

/* 动画 */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
.fade-in { animation: fadeInUp .35s ease both; }

/* 植物卡片图片区 */
.plant-img-wrap {
  width: 80px; height: 80px;
  background: var(--ui-good-soft);
  border-radius: 12px;
  display: flex; align-items:center; justify-content:center;
  flex-shrink: 0; overflow:hidden;
}
.plant-img-wrap img { width:100%; height:100%; object-fit:contain; }

/* ══ 冻结导航项 ══ */
.frozen-nav {
  color: var(--ui-text) !important;
  cursor: not-allowed !important;
  opacity: 0.45;
}
.frozen-nav:hover {
  background: transparent !important;
}
.frozen-nav .frozen-name {
  text-decoration: line-through;
  text-decoration-color: var(--ui-muted);
  text-decoration-thickness: 1px;
}
.frozen-nav .frozen-emoji {
  filter: grayscale(1);
  opacity: 0.5;
}

/* ══ Toast 提示 ══ */
#toast-container {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}
.toast-msg {
  background: var(--ui-panel-2);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ui-line);
  color: var(--ui-text);
  padding: 0.65rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-1rem) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-1rem) scale(0.95); }
}

.update-fab {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 45;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--ui-text);
  background: var(--ui-panel-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(14px);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.update-fab:hover {
  transform: translateY(-2px);
  background: var(--ui-panel);
  box-shadow: var(--ui-shadow);
}
.update-fab-dot {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: var(--ui-danger);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: updatePulse 1.8s infinite;
}
@keyframes updatePulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@media (min-width: 1024px) {
  .update-fab { display: inline-flex; }
}

.update-entry summary {
  list-style: none;
}
.update-entry summary::-webkit-details-marker {
  display: none;
}
.update-entry[open] .update-chevron {
  transform: rotate(180deg);
}
.update-entry[open] {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: var(--ui-shadow);
}

:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
.catalog-page-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--ui-line);
  border-radius: 0.6rem;
  background: var(--ui-panel);
  color: var(--ui-text);
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 600;
}
.catalog-page-link:hover { background: var(--ui-panel-2); border-color: var(--ui-line-strong); }
.catalog-page-link.is-current {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--ui-on-accent);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


#updateModal .update-entry {
  background: var(--ui-panel);
  border-color: var(--ui-line);
}
#updateModal .sticky {
  background: var(--ui-panel);
  border-color: var(--ui-line);
}


.catalog-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  min-width: 2.1rem;
  padding: 0.35rem 0.7rem;
}
.catalog-page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  color: var(--ui-muted);
  user-select: none;
}
