/* ============================================================
   v6.0.0 — 登录页面样式
   玻璃态 + 深色主题，Tailwind 未覆盖部分 + 自定义工具类
   ============================================================ */

/* ===================== 基础样式 ===================== */
body {
  background-color: #0f172a;
  color: #e2e8f0;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ===================== 渐变背景 ===================== */
.gradient-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* ===================== 玻璃态效果 ===================== */
.glass-effect {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================== 动画效果 ===================== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.float-animation { animation: float 6s ease-in-out infinite; }

/* ===================== 发光效果 ===================== */
.glow-effect { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }

/* ===================== 输入框聚焦效果 ===================== */
.input-focus:focus { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3); }

/* ===================== 弹窗动画 ===================== */
.modal-enter {
  animation: modalFadeIn 0.3s ease forwards;
  opacity: 0;
  transform: translateY(-20px);
}
@keyframes modalFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== 通知红点 ===================== */
.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

/* ===================== Toast 动画（保留旧版兼容） ===================== */
.custom-alert {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  max-width: 24rem;
  animation: slideInRight 0.3s ease forwards;
}

.custom-alert.fade-out {
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===================== 触摸友好 ===================== */
.touch-friendly {
  min-height: 44px;
  min-width: 44px;
}

/* ===================== 自定义开关 ===================== */
.toggle-switch {
  width: 2.25rem;
  height: 1.25rem;
  background-color: #475569;
  border-radius: 9999px;
  position: relative;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  background-color: #fff;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease;
}

input[type="checkbox"]:checked + .toggle-switch {
  background-color: #4f46e5;
}

input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(100%);
  border-color: #fff;
}

/* ===================== 恢复码显示 ===================== */
.recovery-code-display {
  user-select: all;
  -webkit-user-select: all;
  cursor: copy;
}

/* ===================== 侧边栏激活样式 ===================== */
.sidebar-item-active {
  background-color: #4f46e5;
  color: #ffffff;
  border-left-width: 4px;
  border-left-color: #818cf8;
  border-left-style: solid;
}

/* ===================== 卡片过渡动画 ===================== */
.card-transition {
  transition: all 0.3s ease-in-out;
}

.card-transition:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* ===================== 滚动条美化 ===================== */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: #334155;
  border-radius: 2px;
}

/* ===================== 内容可见性 ===================== */
.content-auto { content-visibility: auto; }