@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 默认/浅色主题 (Light Mode) 基础样式 */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 玻璃拟态卡片 - 浅色模式 */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 玻璃拟态输入框 - 浅色模式 */
.glass-input {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #0f172a;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.glass-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

/* --- 深色主题 (Dark Mode) 覆写规则 --- */
html.dark body {
  background-color: #0b0f17;
  color: #f1f5f9;
}

html.dark .glass-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

html.dark .glass-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* 自定义滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Toast 消息动画 */
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px) 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(-20px) scale(0.95);
  }
}

.toast-enter {
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
  animation: toastOut 0.2s ease-in forwards;
}

/* 原生日历/时间选择器 (datetime-local) 小图标深浅主题适配 */
::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

html.dark ::-webkit-calendar-picker-indicator {
  filter: invert(0.9) hue-rotate(180deg);
}
