/* ============================================================
   goodefo cncca — 弹窗装饰样式
   ============================================================ */

/* ---- 检索记录悬浮弹窗 ---- */
.history-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(10, 10, 30, 0.97);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 20px;
  padding: 2rem;
  min-width: 360px;
  max-width: 90vw;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow:
    0 0 40px rgba(0, 212, 255, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.6);
}

.history-popup.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.history-popup-title {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 1rem;
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue);
  margin-bottom: 1.2rem;
  letter-spacing: 0.1em;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-popup-list {
  list-style: none;
}

.history-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.history-popup-item:hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--text-primary);
}

.history-popup-item .delete-history {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s;
}

.history-popup-item .delete-history:hover {
  color: var(--neon-pink);
}

.history-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.history-popup-close:hover {
  color: var(--neon-pink);
  background: rgba(255, 45, 149, 0.1);
}

/* ---- 遮罩层 ---- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---- 下拉联想 ---- */
.suggest-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 15, 40, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.suggest-dropdown.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.suggest-item {
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.suggest-item:hover,
.suggest-item.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--neon-blue);
}

/* ---- Toast 通知 ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(10, 10, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50px;
  padding: 0.7rem 1.8rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  z-index: 200;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
