/* ============================================================
   FCL 共享组件样式
   配合 Tailwind Play CDN（preflight 已关闭）使用。
   默认深色（与 plume 的 html.dark 一致），并提供浅色覆盖。
   ============================================================ */

/* ---------- 全局图标对齐 ---------- */
i[class*="fa-"],
i[class^="fa-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

/* fieldset 默认带边框，反馈页表单去掉 */
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }

/* ---------- 玻璃拟态卡片 ---------- */
.glass {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.glass-card {
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
}

/* ---------- 背景光晕 ---------- */
.glow-bg {
  position: fixed;
  top: -20%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(52, 94, 239, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 按钮 ---------- */
.btn-primary {
  background: #345eef;
  color: #fff;
  transition: all 0.2s;
}
.btn-primary:hover { background: #274bbd; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-success { background: #22C55E; color: #fff; transition: all 0.2s; }
.btn-success:hover { background: #16A34A; }
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  transition: all 0.2s;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

/* ---------- 表单 ---------- */
.form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  color: #EEE;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: all 0.2s;
}
.form-input:focus {
  border-color: rgba(52, 94, 239, 0.5);
  box-shadow: 0 0 0 3px rgba(52, 94, 239, 0.1);
  background: rgba(255, 255, 255, 0.06);
}
.form-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.form-input[disabled] { opacity: 0.5; cursor: not-allowed; }
.input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  font-size: 0.875rem;
}
.form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #EEE;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  cursor: pointer;
}
.form-select option { background: #1a1a1a; color: #EEE; }

/* ---------- 头像 ---------- */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}
.avatar:hover { border-color: #345eef; }
.avatar-large { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #345eef; }
.avatar-medium { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.1); }
.admin-icon { width: 20px; height: 20px; display: inline-block; margin-left: 4px; vertical-align: middle; }
.admin-icon-large { width: 30px; height: 30px; display: inline-block; vertical-align: middle; margin-left: 8px; border-radius: 50%; background: rgba(52, 94, 239, 0.1); padding: 4px; }

/* ---------- 徽章 ---------- */
.badge-role { font-size: 0.7rem; padding: 0.125rem 0.5rem; border-radius: 9999px; background: rgba(52, 94, 239, 0.15); color: #345eef; }
.badge-role.admin { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.badge-role.tester { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-fcl { background: rgba(52, 94, 239, 0.15); color: #345eef; }
.badge-microsoft { background: rgba(0, 120, 212, 0.15); color: #0078D4; }
.badge-active { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.badge-frozen { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

/* ---------- 用户下拉菜单 ---------- */
.user-menu { position: relative; cursor: pointer; }
.user-trigger { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 2rem; transition: all 0.2s; }
.user-trigger:hover { background: rgba(255, 255, 255, 0.05); }
.user-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  background: #1a1a1a; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem; min-width: 220px;
  opacity: 0; visibility: hidden; transition: all 0.2s; z-index: 100;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; }
.user-dropdown-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: all 0.2s; }
.user-dropdown-item:hover { background: rgba(52, 94, 239, 0.1); color: #345eef; }
.user-dropdown-header { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.user-name-wrapper { display: inline-flex; align-items: center; gap: 4px; }
.user-name { font-size: 0.875rem; font-weight: 500; }

/* ---------- 信息行 / 侧边导航 ---------- */
.info-row { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.info-label { color: rgba(255, 255, 255, 0.4); font-size: 0.875rem; }
.info-value { color: #fff; font-weight: 500; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 0.75rem; color: rgba(255, 255, 255, 0.6); transition: all 0.2s; cursor: pointer; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-item.active { background: rgba(52, 94, 239, 0.1); color: #345eef; border-left: 2px solid #345eef; }

/* ---------- Toast 提示 ---------- */
.toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.875rem 1.25rem; border-radius: 0.75rem; font-size: 0.8125rem; font-weight: 500;
  backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.08);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards; max-width: 360px;
}
.toast-success { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.toast-error { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.toast-info { background: rgba(52, 94, 239, 0.15); color: #345eef; }
.toast-warning { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(40px); } }

/* ---------- 加载 / 进度 ---------- */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; vertical-align: middle; }
.spinner-lg { width: 48px; height: 48px; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: #345eef; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; justify-content: center; align-items: center; min-height: 400px; flex-direction: column; }

/* 压缩遮罩 */
.compress-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
  display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 10000;
}
.compress-overlay p { color: #fff; margin-top: 1rem; font-size: 0.875rem; }
.compress-overlay .size-info { color: rgba(255, 255, 255, 0.4); font-size: 0.75rem; margin-top: 0.5rem; }

/* ---------- 维护页 ---------- */
.status-pulse { display: inline-block; width: 10px; height: 10px; background: #F59E0B; border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.maintenance-card { background: rgba(20, 20, 20, 0.5); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 1rem; padding: 1.5rem; transition: all 0.3s ease; }
.maintenance-card:hover { border-color: rgba(52, 94, 239, 0.2); transform: translateY(-2px); }
.progress-track { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, #345eef, #F59E0B); width: 42%; animation: progressPulse 2s ease-in-out infinite; }
@keyframes progressPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.cute-cat { font-size: 4rem; line-height: 1; display: inline-block; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0px) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* ---------- 验证码 ---------- */
.captcha-wrapper { display: flex; align-items: center; gap: 0.75rem; }
.captcha-wrapper .form-input { flex: 1; }
.captcha-canvas { border-radius: 0.5rem; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.08); transition: border-color 0.2s; height: 44px; min-width: 120px; }
.captcha-canvas:hover { border-color: rgba(52, 94, 239, 0.3); }
.captcha-refresh { font-size: 1.1rem; color: rgba(255, 255, 255, 0.3); cursor: pointer; transition: all 0.2s; padding: 0 0.25rem; }
.captcha-refresh:hover { color: rgba(255, 255, 255, 0.7); transform: rotate(90deg); }

/* 存储状态卡片 */
.storage-card { background: rgba(20, 20, 20, 0.5); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 1rem; padding: 1.5rem; min-width: 280px; max-width: 340px; }
.storage-card .progress-track { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 9999px; overflow: hidden; margin: 0.75rem 0; }
.storage-card .progress-fill { height: 100%; border-radius: 9999px; transition: width 0.6s ease; }
.storage-message { font-size: 0.75rem; line-height: 1.5; margin-top: 0.5rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem; background: rgba(255, 255, 255, 0.03); }

/* ============================================================
   主题品牌色统一为 plume 蓝 (#345eef)
   plume 默认使用 turquoise（青绿），此处覆盖为蓝色，
   使导航、链接、激活态等主题色与站点蓝色一致。
   ============================================================ */
html[data-theme="light"] {
  --vp-c-brand-1: #345eef !important;
  --vp-c-brand-2: #274bbd !important;
  --vp-c-brand-3: #1d4ed8 !important;
  --vp-c-brand-soft: rgba(52, 94, 239, 0.12) !important;
}
html[data-theme="dark"] {
  --vp-c-brand-1: #5b82f2 !important;
  --vp-c-brand-2: #345eef !important;
  --vp-c-brand-3: #274bbd !important;
  --vp-c-brand-soft: rgba(52, 94, 239, 0.16) !important;
}

/* ============================================================
   浅色模式覆盖（plume 通过 html[data-theme="light"] 标记）
   ============================================================ */
html[data-theme="light"] body { background-color: #F0F2F5; color: #1A1A1A; }
html[data-theme="light"] .glass,
html[data-theme="light"] .glass-card { background: rgba(255, 255, 255, 0.95); border-color: rgba(0, 0, 0, 0.1); color: #1A1A1A; }
html[data-theme="light"] .text-white,
html[data-theme="light"] .text-white\/80,
html[data-theme="light"] .text-white\/70,
html[data-theme="light"] .text-white\/60,
html[data-theme="light"] .text-white\/50 { color: #1A1A1A !important; }
html[data-theme="light"] .text-white\/40 { color: #666 !important; }
html[data-theme="light"] .text-white\/30 { color: #888 !important; }
html[data-theme="light"] .text-white\/20 { color: #aaa !important; }
html[data-theme="light"] .form-input,
html[data-theme="light"] .form-select { background: #fff; border-color: #D1D5DB; color: #1A1A1A; }
html[data-theme="light"] .form-input:focus { border-color: #345eef; box-shadow: 0 0 0 3px rgba(52, 94, 239, 0.1); }
html[data-theme="light"] .form-input::placeholder { color: #9CA3AF; }
html[data-theme="light"] .btn-secondary { background: #F3F4F6; color: #374151; border-color: #D1D5DB; }
html[data-theme="light"] .user-dropdown { background: #fff; border-color: rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .user-dropdown a { color: #4B5563; }
html[data-theme="light"] .user-dropdown a:hover { background: rgba(52, 94, 239, 0.1); color: #345eef; }
html[data-theme="light"] .nav-item { color: #4B5563; }
html[data-theme="light"] .nav-item:hover { background: rgba(0, 0, 0, 0.05); color: #1A1A1A; }
html[data-theme="light"] .info-row { border-bottom-color: rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .info-label { color: #6B7280; }
html[data-theme="light"] .info-value { color: #1A1A1A; }
html[data-theme="light"] .badge-fcl { background: rgba(52, 94, 239, 0.1); color: #345eef; }
html[data-theme="light"] .badge-active { background: rgba(34, 197, 94, 0.1); color: #16A34A; }
html[data-theme="light"] .maintenance-card,
html[data-theme="light"] .storage-card { background: rgba(255, 255, 255, 0.95); border-color: rgba(0, 0, 0, 0.1); }

/* ---------- 组件级文字颜色兜底（防止 scoped :global 失效） ---------- */
html[data-theme="light"] .muted,
html[data-theme="light"] .text-white\/40,
html[data-theme="light"] .home-sections .muted { color: #666 !important; }
html[data-theme="light"] .text-white\/30,
html[data-theme="light"] .center-sub { color: #888 !important; }
html[data-theme="light"] .section-title,
html[data-theme="light"] .section-title-inline,
html[data-theme="light"] .center-title,
html[data-theme="light"] .feat-title,
html[data-theme="light"] .legal-tag,
html[data-theme="light"] .font-bold,
html[data-theme="light"] .summary,
html[data-theme="light"] .hero-title,
html[data-theme="light"] .hero-subtitle { color: #1A1A1A !important; }
html[data-theme="light"] .summary { color: #4B5563 !important; }
html[data-theme="light"] .legal-link { background: #F3F4F6; color: #4B5563 !important; }
html[data-theme="light"] .legal-link:hover { background: rgba(52, 94, 239, 0.1); color: #345eef !important; }
html[data-theme="light"] .btn-secondary { background: #F3F4F6; color: #374151 !important; border-color: #D1D5DB; }
html[data-theme="light"] .btn-secondary:hover { background: #E5E7EB; color: #1A1A1A !important; }
html[data-theme="light"] .platform .feat-title,
html[data-theme="light"] .platform .muted { color: #1A1A1A !important; }
html[data-theme="light"] .notice-row p { color: #4B5563 !important; }
html[data-theme="light"] .home-sections .pill.btn-primary { color: #fff !important; }

/* ============================================================
   自定义组件浅色模式文字 / 图标兜底
   覆盖各 scoped 组件中硬编码的 rgba(255,255,255,x) 浅色，
   以及白底不可见的元素（输入框图标 / 验证码刷新 / 加载圈等）。
   注意：.btn-primary、.signin 等带彩色背景的元素保持白字，不在此覆盖；
   .size-info 仅出现在深色压缩遮罩内，也保持浅色，不在此覆盖。
   ============================================================ */
/* 输入框内图标、验证码刷新图标、加载圈：白底需可见 */
html[data-theme="light"] .input-icon { color: #9CA3AF !important; }
html[data-theme="light"] .captcha-refresh { color: #9CA3AF !important; }
html[data-theme="light"] .captcha-refresh:hover { color: #4B5563 !important; }
html[data-theme="light"] .spinner { border-color: rgba(0,0,0,0.15) !important; border-top-color: #345eef !important; }
html[data-theme="light"] .spinner-lg { border-color: rgba(0,0,0,0.12) !important; border-top-color: #345eef !important; }

/* UserMenu 头像下拉 */
html[data-theme="light"] .caret { color: #9CA3AF !important; }
html[data-theme="light"] .dropdown-email { color: #6B7280 !important; }
html[data-theme="light"] .meta-row { color: #1A1A1A !important; }
html[data-theme="light"] .user-dropdown-item { color: #4B5563 !important; }
html[data-theme="light"] .user-dropdown-item:hover { background: rgba(52, 94, 239, 0.1); color: #345eef !important; }

/* 登录 / 注册 */
html[data-theme="light"] .card-sub { color: #6B7280 !important; }
html[data-theme="light"] .label { color: #6B7280 !important; }
html[data-theme="light"] .bottom-tip { color: #888 !important; }
html[data-theme="light"] .welcome-desc { color: #6B7280 !important; }
html[data-theme="light"] .welcome-tags { color: #888 !important; }
html[data-theme="light"] .storage-head { color: #4B5563 !important; }
html[data-theme="light"] .storage-row { color: #6B7280 !important; }
html[data-theme="light"] .storage-message { color: #6B7280 !important; }
html[data-theme="light"] .storage-shard { color: #9CA3AF !important; }
html[data-theme="light"] .divider span { color: #888 !important; }
/* Microsoft 登录按钮：浅底深字 */
html[data-theme="light"] .btn-ms { background: #F3F4F6; border-color: #D1D5DB; color: #374151 !important; }
html[data-theme="light"] .btn-ms:hover { background: #E5E7EB; }

/* 控制台 Dashboard */
html[data-theme="light"] .loading-text p { color: #4B5563 !important; }
html[data-theme="light"] .loading-joke { color: #6B7280 !important; }
html[data-theme="light"] .dash-sub { color: #888 !important; }
html[data-theme="light"] .ov-label { color: #6B7280 !important; }
html[data-theme="light"] .ov-value { color: #374151 !important; }
html[data-theme="light"] .italic { color: #6B7280 !important; }
html[data-theme="light"] .hint { color: #888 !important; }
html[data-theme="light"] .danger-item p { color: #6B7280 !important; }

/* 反馈页 */
html[data-theme="light"] .subtitle { color: #6B7280 !important; }
html[data-theme="light"] .other-channels { color: #4B5563 !important; }
html[data-theme="light"] .oc-icon { color: #9CA3AF !important; }

/* 首页平台图标：白底不可见 */
html[data-theme="light"] .plat-icon { color: #4B5563 !important; }

/* ============================================================
   首页 / 自定义 page 布局全宽覆盖
   ============================================================ */
.fcl-home .vp-doc { max-width: none; padding: 0; }
.fcl-home .vp-page { padding: 0; }
/* 自定义页面默认移除 plume 文档容器的最大宽度限制 */
.fcl-page .vp-doc { max-width: none; }
