/* ===== 元初AI · 科技极简主题（仅认证页） ===== */
html.yc-auth {
  --background: #06080f;
  --foreground: #e7eefc;
  --card: rgba(255, 255, 255, 0.045);
  --card-foreground: #e7eefc;
  --popover: #0b1120;
  --primary: #22d3ee;
  --primary-foreground: #04121a;
  --secondary: rgba(255, 255, 255, 0.05);
  --muted: rgba(255, 255, 255, 0.05);
  --muted-foreground: #8b9bb4;
  --accent: rgba(34, 211, 238, 0.12);
  --border: rgba(148, 163, 184, 0.16);
  --input: rgba(148, 163, 184, 0.18);
  --ring: rgba(34, 211, 238, 0.55);
  --radius: 12px;
  background: #06080f !important;
}

html.yc-auth body {
  background: #06080f !important;
  color: #e7eefc !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景层：网格 + 光晕 ---------- */
.yc-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(55% 50% at 88% 92%, rgba(99, 102, 241, 0.18), transparent 62%),
    #06080f;
}
.yc-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 12%, transparent 76%);
}
.yc-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
}

/* 内容抬到背景之上 */
html.yc-auth body > *:not(.yc-bg) { position: relative; z-index: 1; }

/* ---------- 卡片 ---------- */
.yc-auth .yc-card {
  position: relative;
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 auto !important;
  padding: 40px 38px 34px !important;
  background: linear-gradient(180deg, rgba(23, 32, 48, 0.86), rgba(10, 15, 24, 0.9)) !important;
  border: 1px solid rgba(125, 211, 252, 0.18) !important;
  border-radius: 18px !important;
  box-shadow:
    0 30px 70px -20px rgba(0, 0, 0, 0.9),
    0 0 44px -14px rgba(34, 211, 238, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset !important;
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
  animation: yc-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* 顶部渐变细线 */
.yc-auth .yc-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.85), rgba(129, 140, 248, 0.7), transparent);
}

/* 卡片内顶部微光（置于内容之下，不遮挡交互） */
.yc-auth .yc-card > * { position: relative; z-index: 1; }
.yc-auth .yc-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  border-radius: 18px 18px 0 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(120% 100% at 50% -10%, rgba(34, 211, 238, 0.12), transparent 72%);
}

@keyframes yc-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ---------- 文字 ---------- */
.yc-auth h1 {
  color: #f2f7ff !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 0.15rem;
}
.yc-auth .yc-card p,
.yc-auth .text-muted-foreground {
  color: #8b9bb4 !important;
}
.yc-auth label {
  color: #a9b8cc !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}
.yc-auth a:not(.yc-card a) { color: #22d3ee !important; }
.yc-auth .yc-card a {
  color: #22d3ee !important;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}
.yc-auth .yc-card a:hover { opacity: 0.8; }

/* ---------- 输入框 ---------- */
.yc-auth input:not([type="checkbox"]):not([type="radio"]),
.yc-auth textarea,
.yc-auth select {
  height: 44px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 10px !important;
  color: #eaf2ff !important;
  font-size: 0.9375rem !important;
  padding: 0 14px !important;
  box-shadow: none !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.yc-auth input::placeholder { color: #64748b !important; }
.yc-auth input:not([type="checkbox"]):not([type="radio"]):hover {
  border-color: rgba(148, 163, 184, 0.34) !important;
}
.yc-auth input:not([type="checkbox"]):not([type="radio"]):focus,
.yc-auth textarea:focus,
.yc-auth select:focus {
  outline: none !important;
  background: rgba(255, 255, 255, 0.062) !important;
  border-color: rgba(34, 211, 238, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14) !important;
}
.yc-auth input[type="checkbox"] { accent-color: #22d3ee; }

/* ---------- 按钮 ---------- */
.yc-auth button {
  border-radius: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
/* 次级按钮（Passkey / OAuth 等） */
.yc-auth button:not([type="submit"]) {
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: #dbe6f7 !important;
}
.yc-auth button:not([type="submit"]):hover {
  background: rgba(255, 255, 255, 0.085) !important;
  border-color: rgba(34, 211, 238, 0.5) !important;
}
/* 主按钮 */
.yc-auth button[type="submit"],
.yc-auth form > button,
.yc-auth .yc-card > div > button:not([type="button"]) {
  height: 44px !important;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 42%, #6366f1 100%) !important;
  border: none !important;
  color: #04121a !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 26px -10px rgba(34, 211, 238, 0.65) !important;
}
.yc-auth button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -10px rgba(34, 211, 238, 0.85) !important;
}
.yc-auth button[type="submit"]:active { transform: translateY(0) scale(0.995); }
.yc-auth button[disabled] { opacity: 0.55 !important; }

/* ---------- 分隔线 / 其它 ---------- */
.yc-auth hr,
.yc-auth [class*="border-t"] { border-color: rgba(148, 163, 184, 0.14) !important; }
.yc-auth [class*="bg-background"] { background-color: #06080f !important; }

/* 左上角 logo 区域轻微发光 */
.yc-auth [class*="absolute"][class*="top-4"] img,
.yc-auth [class*="absolute"][class*="top-8"] img {
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.35));
}

/* 滚动条 */
html.yc-auth ::-webkit-scrollbar { width: 8px; height: 8px; }
html.yc-auth ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 8px;
}
html.yc-auth ::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 640px) {
  .yc-auth .yc-card {
    max-width: 100% !important;
    padding: 30px 22px 26px !important;
    border-radius: 16px !important;
  }
}
