/* ===== Refined.css — 全局精致效果 ===== */

/* --- 页面进入动画 --- */
.fade-in-page {
  animation: fadeInUp 0.45s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Glassmorphism 顶栏 --- */
.glass-header {
  background: rgba(32, 33, 40, 0.85) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- 背景光晕 (body 上用) --- */
.ambient-bg {
  background: #202128;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(241, 196, 15, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(249, 115, 22, 0.03) 0%, transparent 60%);
}

/* --- 卡片深度 --- */
.card-depth {
  box-shadow:
    0 1px 3px rgba(0,0,0,0.3),
    0 1px 2px rgba(0,0,0,0.2);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card-depth:hover {
  box-shadow:
    0 10px 25px -5px rgba(0,0,0,0.4),
    0 8px 10px -6px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.card-glow {
  box-shadow:
    0 1px 2px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* --- 按钮微交互 --- */
.btn-press:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}
.gradient-btn-glow {
  position: relative;
  overflow: hidden;
}
.gradient-btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.gradient-btn-glow:hover::after {
  transform: translateX(100%);
}

/* --- 禁用按钮 --- */
button:disabled,
.btn-press:disabled,
.gradient-btn-glow:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- 表单聚焦 --- */
.input-refined {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.input-refined:focus {
  border-color: rgba(241, 196, 15, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.12) !important;
  background-color: rgba(55, 56, 70, 1) !important;
}

/* --- 表格 --- */
.table-refined th {
  background: rgba(45, 46, 58, 0.5);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(146, 148, 164, 1);
  padding: 0.75rem 0.75rem;
}
.table-refined td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid rgba(62, 64, 80, 0.35);
}
.table-refined tr:hover td {
  background: rgba(241, 196, 15, 0.03);
}

/* --- 骨架屏 shimmer --- */
.skeleton-pulse {
  background: linear-gradient(90deg,
    rgba(62, 64, 80, 0.3) 25%,
    rgba(68, 69, 86, 0.3) 50%,
    rgba(62, 64, 80, 0.3) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 空状态浮动 --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.empty-icon-float {
  animation: float 3s ease-in-out infinite;
}

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(241, 196, 15, 0.2);
  border-top-color: #f1c40f;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
.spinner-white {
  border-color: rgba(255,255,255,0.25);
  border-top-color: #ffffff;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- 脉冲点 --- */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f1c40f;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* --- 自定义滚动条 --- */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(68, 69, 86, 0.4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(146, 148, 164, 0.6);
}

/* --- 管理员侧边栏 --- */
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: rgba(146, 148, 164, 1);
  transition: all 0.15s ease;
}
.admin-sidebar-link:hover {
  background: rgba(62, 64, 80, 0.4);
  color: rgba(229, 231, 235, 1);
}
.admin-sidebar-link.active {
  background: rgba(241, 196, 15, 0.1);
  color: rgba(255, 228, 122, 1);
  border-left: 2px solid #f1c40f;
}

/* --- Toast --- */
.toast-refined {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  font-size: 0.875rem;
  color: #f3f4f6;
  border-left: 4px solid;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toast-refined.show {
  transform: translateX(0);
}
.toast-refined.success {
  background: rgba(52, 53, 65, 0.95);
  border-left-color: #10b981;
}
.toast-refined.error {
  background: rgba(52, 53, 65, 0.95);
  border-left-color: #ef4444;
}
.toast-refined.info {
  background: rgba(52, 53, 65, 0.95);
  border-left-color: #f1c40f;
}

/* --- 拖拽上传高亮 --- */
.upload-zone-dragover {
  border-color: rgba(241, 196, 15, 0.6) !important;
  background: rgba(241, 196, 15, 0.06) !important;
}

/* --- 交错网格 (JS配合) --- */
.stagger-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 模态框缩放 --- */
.modal-scale {
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  opacity: 0;
}
.modal-scale.open {
  transform: scale(1);
  opacity: 1;
}
