/* 加载 / 提示 */
.loading-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  border: 2px solid rgba(232, 137, 155, 0.18);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(28, 24, 34, 0.2);
  z-index: 3000;
  font-size: 0.88rem;
  max-width: 90%;
  display: none;
  animation: toastIn 0.25s ease;
  font-weight: 500;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.offline-banner {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 500;
  display: none;
  box-shadow: none;
  position: relative;
  z-index: 20;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px 32px;
  color: var(--text-secondary);
}

.empty-state[hidden] {
  display: none !important;
}

.empty-state-text {
  margin: 0 0 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.empty-state-action {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(232, 137, 155, 0.35);
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.empty-state-action[hidden] {
  display: none !important;
}

.empty-state-action:hover {
  background: rgba(232, 137, 155, 0.22);
}

/* 回到顶部 */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 900;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.back-to-top[hidden] {
  display: none !important;
}
