/* ============================================================
   Moon-API · 二次元月亮主题（手绘 SVG 资产 + 圆体字 + 粉紫夜空）
   ============================================================ */

/* ---------- 字体（由换肤代理托管在 /__moon/fonts/） ---------- */
@font-face{font-family:'M PLUS Rounded 1c';font-style:normal;font-weight:400;font-display:swap;src:url('/__moon/fonts/w7.woff2') format('woff2');}
@font-face{font-family:'M PLUS Rounded 1c';font-style:normal;font-weight:700;font-display:swap;src:url('/__moon/fonts/w8.woff2') format('woff2');}
@font-face{font-family:'M PLUS Rounded 1c';font-style:normal;font-weight:800;font-display:swap;src:url('/__moon/fonts/w9.woff2') format('woff2');}
@font-face{font-family:'Zen Maru Gothic';font-style:normal;font-weight:500;font-display:swap;src:url('/__moon/fonts/w1.woff2') format('woff2');}
@font-face{font-family:'Zen Maru Gothic';font-style:normal;font-weight:700;font-display:swap;src:url('/__moon/fonts/w2.woff2') format('woff2');}
@font-face{font-family:'Zen Maru Gothic';font-style:normal;font-weight:900;font-display:swap;src:url('/__moon/fonts/w3.woff2') format('woff2');}

:root,
html, html.dark, body, .dark {
  --radius: 1.05rem;

  --background: 258 58% 9%;
  --foreground: 280 60% 96%;
  --card: 258 42% 14%;
  --card-foreground: 280 60% 96%;
  --popover: 258 44% 13%;
  --popover-foreground: 280 60% 96%;
  --primary: 268 92% 78%;
  --primary-foreground: 258 60% 12%;
  --secondary: 268 30% 22%;
  --secondary-foreground: 280 55% 94%;
  --muted: 268 26% 20%;
  --muted-foreground: 272 26% 74%;
  --accent: 320 70% 30%;
  --accent-foreground: 320 100% 94%;
  --destructive: 348 90% 66%;
  --destructive-foreground: 0 0% 100%;
  --border: 272 40% 32%;
  --input: 272 36% 26%;
  --ring: 320 100% 82%;

  --sidebar: 258 50% 11%;
  --sidebar-foreground: 280 55% 94%;
  --sidebar-primary: 268 92% 78%;
  --sidebar-primary-foreground: 258 60% 12%;
  --sidebar-accent: 272 40% 22%;
  --sidebar-accent-foreground: 280 60% 96%;
  --sidebar-border: 272 40% 28%;
  --sidebar-ring: 320 100% 82%;

  --chart-1: 320 100% 84%;
  --chart-2: 268 92% 78%;
  --chart-3: 190 92% 76%;
  --chart-4: 42 100% 78%;
  --chart-5: 348 90% 72%;

  /* 主题私有色 */
  --moon-pink: #ffa8d5;
  --moon-rose: #ff7cc0;
  --moon-violet: #b79cff;
  --moon-cyan: #8fe9ff;
  --moon-gold: #ffd79a;
  --moon-cream: #fff5ec;
  --moon-ink: #0a0718;
  --moon-glass: rgba(30, 17, 58, .62);
  --moon-glass-2: rgba(38, 22, 72, .74);
  --moon-line: rgba(255, 222, 248, .22);
  --moon-glow: 0 0 24px rgba(255, 168, 213, .38), 0 8px 30px rgba(120, 80, 200, .28);
  --font-round: 'Zen Maru Gothic', 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html, body { font-family: var(--font-round) !important; }

body {
  background-color: var(--moon-ink) !important;
  background-image:
    radial-gradient(1200px 700px at 82% -6%, rgba(255, 178, 225, .22), transparent 62%),
    radial-gradient(900px 620px at 6% 12%, rgba(143, 233, 255, .12), transparent 60%),
    radial-gradient(1000px 900px at 50% 118%, rgba(183, 156, 255, .24), transparent 64%),
    linear-gradient(180deg, #0a0718 0%, #0d0a22 38%, #150f31 72%, #0b0819 100%) !important;
  background-attachment: fixed !important;
  color: hsl(var(--foreground));
  overflow-x: hidden;
}

/* 星空画布（JS 注入） */
#moon-sky {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
#root { position: relative; z-index: 1; }

::selection { background: rgba(255, 124, 192, .38); color: #fff; }

/* ---------- 标题与正文 ---------- */
h1, h2, h3, h4 { font-family: var(--font-round) !important; letter-spacing: .02em; }
h1 { text-shadow: 0 6px 30px rgba(183, 156, 255, .35); }

/* 渐变标题 */
.moon-h1 {
  background: linear-gradient(100deg, #fff 4%, #ffd9f2 34%, #b79cff 68%, #8fe9ff 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* ---------- 链接 / 强调 ---------- */
a { color: hsl(var(--primary)); transition: color .18s ease, text-shadow .18s ease; }
a:hover { color: #ffd9f2; text-shadow: 0 0 14px rgba(255, 168, 213, .55); }

/* ---------- 按钮 ---------- */
[data-slot="button"], button, .btn {
  font-family: var(--font-round) !important;
  border-radius: 999px !important;
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .2s ease, filter .2s ease, background .2s ease !important;
}
[data-slot="button"]:hover, button:hover { transform: translateY(-1.5px); }
[data-slot="button"]:active, button:active { transform: translateY(0) scale(.985); }

/* 主按钮（原 primary 底色） */
[data-slot="button"].bg-primary,
button.bg-primary,
a.bg-primary {
  background-image: linear-gradient(120deg, #ff9fd4 0%, #b794ff 52%, #8fe0ff 100%) !important;
  color: #1a0f2e !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 10px 26px rgba(180, 130, 255, .42), inset 0 1px 0 rgba(255,255,255,.6) !important;
}
[data-slot="button"].bg-primary:hover,
button.bg-primary:hover {
  box-shadow: 0 14px 34px rgba(255, 150, 210, .52), inset 0 1px 0 rgba(255,255,255,.7) !important;
  filter: saturate(1.08) brightness(1.04);
}

/* 次按钮 */
[data-slot="button"].border,
button.border,
[data-slot="button"][class*="outline"] {
  border-color: var(--moon-line) !important;
  background: rgba(255,255,255,.05) !important;
  backdrop-filter: blur(10px);
  color: #f2e8ff !important;
}
[data-slot="button"].border:hover,
button.border:hover {
  background: rgba(255,255,255,.1) !important;
  border-color: rgba(255, 190, 235, .5) !important;
  box-shadow: 0 8px 24px rgba(255, 168, 213, .22) !important;
}

/* 幽灵/文本按钮 */
[data-slot="button"][class*="ghost"]:hover,
button[class*="ghost"]:hover { background: rgba(255,255,255,.08) !important; }

/* ---------- 卡片 / 面板 ---------- */
[class*="rounded-lg"][class*="border"],
[class*="rounded-xl"][class*="border"],
[class*="rounded-2xl"][class*="border"] {
  border-color: rgba(255, 214, 245, .16) !important;
}
.card, [data-slot="card"] {
  background: var(--moon-glass) !important;
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 214, 245, .18) !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 18px 44px rgba(8, 4, 22, .55), inset 0 1px 0 rgba(255,255,255,.08) !important;
}
.card:hover, [data-slot="card"]:hover { box-shadow: 0 22px 52px rgba(80, 40, 140, .5), inset 0 1px 0 rgba(255,255,255,.1) !important; }

/* 表格 */
table { border-color: rgba(255,214,245,.14) !important; }
thead tr, th { background: rgba(255,255,255,.04) !important; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(255, 168, 213, .09) !important; }
td, th { border-color: rgba(255,214,245,.12) !important; }

/* ---------- 输入控件 ---------- */
input, textarea, select,
[data-slot="input"], [data-slot="textarea"], [data-slot="select-trigger"] {
  font-family: var(--font-round) !important;
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255, 205, 240, .24) !important;
  border-radius: .9rem !important;
  color: #fbf3ff !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: rgba(226, 205, 245, .55) !important; }
input:focus, textarea:focus, select:focus,
[data-slot="input"]:focus, [data-slot="textarea"]:focus {
  outline: none !important;
  border-color: rgba(255, 168, 213, .75) !important;
  box-shadow: 0 0 0 3.5px rgba(255, 168, 213, .16), 0 0 24px rgba(183,156,255,.3) !important;
  background: rgba(255,255,255,.09) !important;
}

/* 下拉/弹层 */
[data-slot="popover-content"], [data-slot="dropdown-menu-content"], [role="dialog"], [data-slot="dialog-content"] {
  background: var(--moon-glass-2) !important;
  backdrop-filter: blur(20px) saturate(1.2) !important;
  border: 1px solid rgba(255, 214, 245, .2) !important;
  border-radius: 1.15rem !important;
  box-shadow: 0 26px 70px rgba(6, 2, 16, .68) !important;
}
[data-slot="dropdown-menu-item"]:hover, [role="menuitem"]:hover { background: rgba(255, 168, 213, .14) !important; }

/* 徽标 */
[data-slot="badge"], .badge { border-radius: 999px !important; border-color: rgba(255,214,245,.26) !important; }

/* 进度条 */
[role="progressbar"] > div { background-image: linear-gradient(90deg, #ff9fd4, #b794ff, #8fe0ff) !important; }

/* ---------- 顶栏 ---------- */
header {
  background: linear-gradient(180deg, rgba(12, 8, 28, .82), rgba(12, 8, 28, .45)) !important;
  backdrop-filter: blur(18px) saturate(1.2) !important;
  border-bottom: 1px solid rgba(255, 214, 245, .12) !important;
}
header a:hover { text-shadow: 0 0 16px rgba(255, 168, 213, .7); }

/* 顶栏里登录按钮：改成发光胶囊 + 图标点 */
header a[href*="sign-in"], header a[href*="login"] {
  position: relative; padding-left: 1.9rem !important;
}
header a[href*="sign-in"]::before, header a[href*="login"]::before {
  content: ""; position: absolute; left: .85rem; top: 50%; width: .5rem; height: .5rem;
  margin-top: -.25rem; border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #fff, #ffb3dd 55%, #b794ff);
  box-shadow: 0 0 12px rgba(255, 168, 213, .9);
  animation: moonPulse 2.6s ease-in-out infinite;
}
@keyframes moonPulse { 0%,100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.18); } }

/* 侧边栏 */
aside, [data-slot="sidebar"] {
  background: linear-gradient(180deg, rgba(16, 10, 34, .92), rgba(22, 14, 46, .88)) !important;
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255, 214, 245, .12) !important;
}
aside a[data-active="true"], aside [aria-current="page"] {
  background: linear-gradient(100deg, rgba(255,168,213,.22), rgba(183,156,255,.18)) !important;
  border-radius: .85rem !important;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 245, .22);
}

/* ---------- 首页 hero 装饰 ---------- */
.moon-hero-deco {
  position: absolute; right: -1.5rem; top: 2rem; width: 260px; max-width: 26vw;
  pointer-events: none; z-index: 0;
}
.moon-hero-deco .hd-card {
  position: absolute; width: 116px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(4, 0, 14, .6), 0 0 0 1px rgba(255, 226, 250, .12);
  opacity: .9;
}
.moon-hero-deco .hd-card:nth-child(1) { right: 96px; top: 26px; transform: rotate(-13deg); }
.moon-hero-deco .hd-card:nth-child(2) { right: 14px; top: 0; transform: rotate(9deg); }
.moon-hero-deco .hd-orb {
  position: absolute; right: -18px; top: -46px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff 0%, #fff3fc 42%, #ffd2ef 72%, rgba(240,180,230,0) 78%);
  filter: blur(.4px); opacity: .5;
}
.moon-hero-deco {
  position: absolute; right: -1.5rem; top: 2rem; width: 260px; max-width: 26vw;
  pointer-events: none; z-index: 0;
}
.moon-hero-deco .hd-card {
  position: absolute; width: 116px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(4, 0, 14, .6), 0 0 0 1px rgba(255, 226, 250, .12);
  opacity: .9;
}
.moon-hero-deco .hd-card:nth-child(1) { right: 96px; top: 26px; transform: rotate(-13deg); }
.moon-hero-deco .hd-card:nth-child(2) { right: 14px; top: 0; transform: rotate(9deg); }
.moon-hero-deco .hd-orb {
  position: absolute; right: -18px; top: -46px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff 0%, #fff3fc 42%, #ffd2ef 72%, rgba(240,180,230,0) 78%);
  filter: blur(.4px); opacity: .5;
}
.moon-tarot-fan .mt-card {
  position: absolute; width: 146px; border-radius: 13px; overflow: hidden;
  box-shadow: 0 26px 60px rgba(4, 0, 14, .68), 0 0 0 1px rgba(255, 226, 250, .12);
  transition: transform .55s cubic-bezier(.2,.8,.3,1), filter .55s ease;
  filter: saturate(1.05) brightness(.96);
}

.moon-tarot-fan .mt-card img { display: block; width: 100%; height: auto; }
.moon-tarot-fan .mt-card:nth-child(1) { left: 6%; top: 92px; transform: rotate(-17deg); }
.moon-tarot-fan .mt-card:nth-child(2) { left: 33%; top: 46px; transform: rotate(-2deg); z-index: 2; }
.moon-tarot-fan .mt-card:nth-child(3) { left: 60%; top: 92px; transform: rotate(15deg); }
.moon-tarot-fan .mt-card:nth-child(2):hover { transform: rotate(-2deg) translateY(-14px) scale(1.04); filter: brightness(1.06) saturate(1.1); }
.moon-tarot-fan .mt-card:nth-child(1):hover { transform: rotate(-17deg) translateY(-10px) scale(1.02); }
.moon-tarot-fan .mt-card:nth-child(3):hover { transform: rotate(15deg) translateY(-10px) scale(1.02); }
@media (max-width: 1280px) { .moon-tarot-fan { opacity: .45; } }
@media (max-width: 980px)  { .moon-tarot-fan { display: none; } }
.moon-tarot-fan {
  position: fixed; left: 4vw; top: 50%; transform: translateY(-50%);
  width: 460px; height: 600px; pointer-events: none; z-index: 2; opacity: .6;
}
.moon-orb::after {
  content: ""; position: absolute; inset: -18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,230,250,.28), transparent 62%);
  filter: blur(18px);
}

/* ---------- 全局动态背景：云海·月升（视频） ---------- */
html { background-color: #07050f !important; }
:root body, html body { background: transparent !important; background-image: none !important; }
.moon-bg { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 0 !important; overflow: hidden !important; background: #07050f; pointer-events: none; }
.moon-bg video { pointer-events: none; }
.moon-bg video {
  position: absolute !important; left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; object-position: center 42% !important;
  filter: saturate(1.06) brightness(.9);
}
.moon-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 700px at 78% 6%, rgba(255, 178, 226, .20), transparent 62%),
    radial-gradient(900px 640px at 8% 18%, rgba(143, 233, 255, .10), transparent 64%),
    linear-gradient(180deg, rgba(8, 5, 22, .46) 0%, rgba(10, 6, 26, .30) 44%, rgba(11, 7, 28, .70) 100%);
}
body { background-image: none !important; }

/* ---------- 登录/注册页整体背景 ---------- */
body.moon-auth {
  background-image: none !important;
  background-color: #07050f !important;
}
body.moon-auth::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(700px 500px at 18% 84%, rgba(255, 140, 200, .16), transparent 66%),
    linear-gradient(180deg, rgba(6,4,16,.28), rgba(6,4,16,.62));
}
body.moon-auth #root { position: relative; z-index: 2; }

/* 认证卡片玻璃化 + 金边 */
body.moon-auth form, body.moon-auth .moon-auth-card {
  position: relative;
  background: linear-gradient(180deg, rgba(34, 20, 62, .78), rgba(22, 13, 44, .86)) !important;
  backdrop-filter: blur(22px) saturate(1.25);
  border: 1px solid rgba(255, 226, 250, .22) !important;
  border-radius: 1.5rem !important;
  box-shadow: 0 32px 90px rgba(4, 0, 14, .75), inset 0 1px 0 rgba(255,255,255,.14), 0 0 0 1px rgba(255, 215, 154, .12) !important;
  padding: 1.6rem 1.4rem 1.4rem !important;
}
body.moon-auth form::after {
  content: ""; position: absolute; inset: 6px; border-radius: 1.2rem; pointer-events: none;
  border: 1px solid rgba(255, 215, 154, .18);
  background-image: linear-gradient(135deg, rgba(255,215,154,.35), transparent 18%, transparent 82%, rgba(255,215,154,.3));
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}

/* 认证页标题加小月亮 */
body.moon-auth h2::before {
  content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .5rem;
  vertical-align: -.12em;
  background: url('/__moon/moon-icon.svg') center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 190, 235, .8));
}

/* 认证页底部「切换登录/注册」重排到卡片右上 */
body.moon-auth .moon-auth-switch {
  position: absolute; right: 1.15rem; top: -2.35rem;
  font-size: .82rem; padding: .35rem .85rem; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,214,245,.24);
  backdrop-filter: blur(10px);
}

/* 认证页里的吉祥物 */
.moon-mascot {
  position: fixed; right: 4vw; bottom: 3vh; width: 132px; z-index: 3;
  pointer-events: none; filter: drop-shadow(0 18px 40px rgba(120, 70, 200, .5));
  animation: moonFloat 6.5s ease-in-out infinite;
}
@keyframes moonFloat { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
@media (max-width: 900px) { .moon-mascot { display: none; } }

/* 落地页整幅分隔装饰：月亮腰带 */
.moon-divider {
  position: relative; height: 1px; margin: 2.6rem 0;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 240, .38), rgba(183,156,255,.5), rgba(255, 200, 240, .38), transparent);
}
.moon-divider::after {
  content: "☾  ✦  ☽"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 0 .9rem; background: #0b0819; color: #ffd9f2; letter-spacing: .5rem; font-size: .8rem;
  text-shadow: 0 0 12px rgba(255, 168, 213, .8);
}

/* ---------- 首页按钮重排（JS 把 hero CTA 挪到底部动作条） ---------- */
.moon-action-bar {
  display: flex; flex-wrap: wrap; gap: .85rem; align-items: center;
  margin: 1.6rem 0 .4rem; padding: 0;
}
.moon-action-bar > a, .moon-action-bar > button { min-width: 172px; justify-content: center; }

/* 悬浮登录坞（首页右下角） */
.moon-dock {
  position: fixed; right: 1.6rem; bottom: 1.8rem; z-index: 60;
  display: flex; gap: .6rem; align-items: center;
  padding: .55rem .6rem; border-radius: 999px;
  background: rgba(22, 13, 44, .68); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 214, 245, .22);
  box-shadow: 0 18px 50px rgba(6, 2, 16, .6);
}
.moon-dock a {
  padding: .5rem 1.05rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  color: #1a0f2e !important; text-decoration: none;
  background-image: linear-gradient(120deg, #ff9fd4, #b794ff 60%, #8fe0ff);
  box-shadow: 0 8px 22px rgba(180, 130, 255, .4);
}
.moon-dock a.moon-dock-ghost {
  background: transparent !important; color: #f4e9ff !important;
  border: 1px solid rgba(255,214,245,.3);
}
@media (max-width: 720px) { .moon-dock { right: .8rem; bottom: .9rem; } }

/* ---------- 星星 / 月相装饰 ---------- */
.moon-stars-corner {
  position: fixed; pointer-events: none; z-index: 1; opacity: .8;
  width: 220px; height: 220px;
}
.moon-stars-corner.tl { left: -40px; top: 40px; }
.moon-stars-corner.br { right: -50px; bottom: 30px; transform: rotate(180deg); }

/* 月相条（页脚） */
.moon-phases {
  display: flex; gap: .5rem; align-items: center; justify-content: center;
  opacity: .75; filter: drop-shadow(0 0 8px rgba(255, 200, 240, .35));
}
.moon-phases span {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #fff, #ffd9f2 62%, #c9a6e6);
  box-shadow: inset -4px -3px 0 rgba(60, 30, 90, .55);
}
.moon-phases span:nth-child(2) { box-shadow: inset -6px -2px 0 rgba(60, 30, 90, .7); }
.moon-phases span:nth-child(3) { box-shadow: inset -9px -1px 0 rgba(60, 30, 90, .82); }
.moon-phases span:nth-child(4) { box-shadow: inset -13px 0 0 rgba(60, 30, 90, .92); }

/* 控制台页面右上角小卡 */
.moon-corner-card {
  position: fixed; right: 1.4rem; top: 5.2rem; width: 96px; z-index: 1;
  pointer-events: none; opacity: .5; filter: drop-shadow(0 12px 30px rgba(120, 70, 200, .45));
  transform: rotate(9deg);
}
@media (max-width: 1180px) { .moon-corner-card { display: none; } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,168,213,.55), rgba(183,156,255,.55));
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(255,168,213,.8), rgba(183,156,255,.8)); background-clip: padding-box; }

/* ---------- 动效 ---------- */
@keyframes moonFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
main > * { animation: moonFadeUp .5s cubic-bezier(.2,.8,.3,1) both; }
main > *:nth-child(2) { animation-delay: .05s; }
main > *:nth-child(3) { animation-delay: .1s; }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 兼容：把残留的品牌色压回主题 ---------- */
.bg-blue-500, .bg-indigo-500, .bg-purple-500 { background-image: linear-gradient(120deg, #ff9fd4, #b794ff) !important; }
.text-blue-500, .text-indigo-500 { color: #b794ff !important; }

/* 表单提交按钮 = 主行动按钮 */
body.moon-auth button[type="submit"], body.moon-auth form button:not([type="button"]):last-of-type {
  width: 100% !important; margin-top: .35rem;
  background-image: linear-gradient(120deg, #ff9fd4 0%, #b794ff 55%, #8fe0ff 100%) !important;
  color: #1a0f2e !important; font-weight: 800 !important; border: none !important;
  box-shadow: 0 12px 30px rgba(180, 130, 255, .45), inset 0 1px 0 rgba(255,255,255,.65) !important;
  letter-spacing: .06em;
}
body.moon-auth button[type="submit"]:hover { box-shadow: 0 16px 38px rgba(255, 150, 210, .5), inset 0 1px 0 rgba(255,255,255,.75) !important; }

/* 认证页背后的月光 */
.moon-auth-glow {
  position: fixed; right: -14vw; top: -18vh; width: 62vw; height: 62vw; max-width: 900px; max-height: 900px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 42% 40%, rgba(255,236,252,.30), rgba(210,170,255,.14) 45%, rgba(140,100,220,0) 70%);
  filter: blur(28px);
}

/* 视频背景下的文字可读性 */
.moon-hero h1, .moon-hero-title, main h1, h1, h2 { text-shadow: 0 6px 26px rgba(7, 4, 20, .72), 0 1px 0 rgba(255, 255, 255, .06); }
.moon-auth h1, .moon-auth h2 { text-shadow: 0 4px 22px rgba(7, 4, 20, .85); }
@media (prefers-reduced-motion: reduce) { .moon-bg video { display: none; } .moon-bg { background: #07050f url('/__moon/bg-poster.jpg') center/cover no-repeat; } }

/* 内容层压过背景视频 */
body > #root, body > .moon-tarot-fan, body > .moon-dock, body > .moon-auth-glow,
body > canvas#moon-stars, body > .moon-action-bar { position: relative; z-index: 2; }
body > .moon-bg { z-index: 0 !important; }
.moon-tarot-fan { z-index: 2; }

.moon-hero-deco { right: auto !important; left: 6vw !important; bottom: 8vh !important; top: auto !important; transform: none !important; opacity: .55 !important; }
.moon-hero-deco .hd-card { width: 96px !important; }
@media (max-width: 1180px) { .moon-hero-deco { display: none !important; } }

/* 首屏装饰卡在视频背景上显得杂乱 -> 首页隐藏，仅认证页保留塔罗 */
.moon-hero-deco { display: none !important; }


/* v11: 文字可读性 + 塔罗收敛 */
.moon-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 90% at 8% 42%, rgba(10,7,26,.82) 0%, rgba(10,7,26,.55) 42%, rgba(10,7,26,0) 72%),
    linear-gradient(90deg, rgba(8,6,22,.72) 0%, rgba(8,6,22,.28) 46%, rgba(8,6,22,0) 68%);
}
.moon-hero > * { position: relative; z-index: 1; }
.moon-tarot-fan { opacity: .9; }
.moon-tarot-fan .mt-card { width: 132px; height: 204px; }
.moon-tarot-fan .mt-card:nth-child(1) { left: 26px; top: 78px; transform: rotate(-16deg); }
.moon-tarot-fan .mt-card:nth-child(2) { left: 96px; top: 34px; transform: rotate(-2deg); }
.moon-tarot-fan .mt-card:nth-child(3) { left: 168px; top: 82px; transform: rotate(13deg); }
body.moon-auth .moon-tarot-fan { opacity: .78; }


/* v12: 应用内页可读性 —— 玻璃面板提到不透明、视频压暗 */
:root {
  --card: 258 42% 10% !important;
  --popover: 258 44% 9% !important;
  --muted: 258 30% 16% !important;
  --secondary: 258 32% 18% !important;
  --accent: 268 46% 22% !important;
  --border: 262 38% 26% !important;
  --input: 262 34% 24% !important;
}
body:not(.moon-auth) .moon-bg { display: none !important; }

[data-slot="card"], .moon-glass, aside, main .rounded-xl, .rounded-2xl {
  backdrop-filter: blur(16px) saturate(1.15);
}
[data-slot="card"], .rounded-xl.border, .rounded-2xl.border {
  background-color: rgba(17,12,38,.82) !important;
  border-color: rgba(150,120,255,.22) !important;
}
aside { background-color: rgba(12,8,30,.9) !important; }
header, .moon-topbar { background-color: rgba(10,7,26,.78) !important; backdrop-filter: blur(18px); }
table { background-color: rgba(14,10,32,.7) !important; }


/* v13: 视频只做登录/注册背景；铺满=以长边为基准裁切 */
body.moon-auth { overflow-x: hidden; }
body.moon-auth .moon-bg { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 0 !important; }
body.moon-auth .moon-bg video {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; object-position: 50% 46% !important;
  transform: scale(1.02); filter: saturate(1.05) brightness(.86);
}
body.moon-auth .moon-bg::after {
  background:
    radial-gradient(90% 70% at 50% 42%, rgba(8,5,20,.05) 0%, rgba(8,5,20,.42) 58%, rgba(8,5,20,.78) 100%),
    linear-gradient(180deg, rgba(8,5,20,.5) 0%, rgba(8,5,20,.2) 30%, rgba(8,5,20,.55) 100%);
}
/* 认证页：塔罗挪到右下、缩小，避免压住品牌与表单 */
body.moon-auth .moon-tarot-fan {
  left: auto !important; right: 3vw !important; top: auto !important; bottom: 4vh !important;
  transform: none !important; opacity: .62 !important; z-index: 1 !important;
}
body.moon-auth .moon-tarot-fan .mt-card { width: 104px; height: 162px; }
body.moon-auth .moon-tarot-fan .mt-card:nth-child(1) { left: 0; top: 40px; transform: rotate(-14deg); }
body.moon-auth .moon-tarot-fan .mt-card:nth-child(2) { left: 54px; top: 12px; transform: rotate(-1deg); }
body.moon-auth .moon-tarot-fan .mt-card:nth-child(3) { left: 108px; top: 44px; transform: rotate(12deg); }
/* 表单居中、玻璃卡更实 */
body.moon-auth .container { min-height: 100vh; align-items: center; padding-top: 0 !important; }
body.moon-auth form { background: rgba(13,9,30,.86) !important; border: 1px solid rgba(160,130,255,.3) !important;
  border-radius: 22px !important; padding: 26px 26px 22px !important; backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(4,2,14,.6), 0 0 0 1px rgba(255,255,255,.04) inset; }
body.moon-auth h1, body.moon-auth h2 { text-shadow: 0 4px 24px rgba(0,0,0,.6); }


/* v15: 塔罗扇形固定在右下（认证页），不参与文档流 */
body.moon-auth .moon-tarot-fan {
  position: fixed !important;
  left: auto !important; top: auto !important;
  right: 3vw !important; bottom: 4vh !important;
  width: 300px !important; height: 360px !important;
  transform: none !important; opacity: .58 !important; z-index: 1 !important;
  pointer-events: none;
}
body.moon-auth .moon-tarot-fan .mt-card { width: 104px !important; height: 162px !important; }
body.moon-auth .moon-tarot-fan .mt-card:nth-child(1) { left: 6px !important; top: 96px !important; transform: rotate(-15deg) !important; }
body.moon-auth .moon-tarot-fan .mt-card:nth-child(2) { left: 62px !important; top: 62px !important; transform: rotate(-2deg) !important; }
body.moon-auth .moon-tarot-fan .mt-card:nth-child(3) { left: 118px !important; top: 100px !important; transform: rotate(13deg) !important; }
@media (max-width: 900px) { body.moon-auth .moon-tarot-fan { display: none !important; } }


/* v16: 去掉认证页滚动时会冒出来的那团光晕（它被 position:relative 顶出了视口） */
.moon-auth-glow, body > .moon-auth-glow { display: none !important; }
body.moon-auth { overflow-y: auto !important; overflow-x: hidden !important; }
body.moon-auth .container, body.moon-auth .container > * { overflow: visible !important; }

/* v17: 短视频口也允许滚动，但装饰全部固定，不会随滚动冒泡 */

/* v19: 藏掉控制台标题旁那串版本号（v1.0.0-rc.48），避免暴露上游版本 */
span[class*="max-w-32"][class*="font-mono"] { display: none !important; }

/* v20: 塔罗扇形只在登录/注册页出现，别的地方一律不显示 */
.moon-tarot-fan { display: none !important; }
body.moon-auth .moon-tarot-fan { display: block !important; }

/* v21: 首页装饰卡只在首页出现（之前会在控制台右上角露出一截） */
body:not(.moon-home) .moon-hero-deco { display: none !important; }

/* v22: 品牌区那个 h1 不该长月亮，只有认证卡片的标题才要 */
body.moon-auth header h1::before { content: none !important; display: none !important; }

/* v23: 品牌区的 H1（Moon-API 文字）不要再长月亮；标题月亮只留给卡片里的 H2 */
body.moon-auth h1::before { content: none !important; display: none !important; }
