﻿/* ============================================================
   楦¤吙灏忕珯 路 ShareLLM 椋庢牸涓婚
   ------------------------------------------------------------
   鍙傝€冿細娣＄传绮夋笎鍙樿儗鏅?+ 鐧借壊鑳跺泭椤舵爮 + 澶у渾瑙掑崱鐗?+ 娴呰摑涓昏壊
   ============================================================ */

/* ---------- 1. 瀛椾綋 ---------- */
html,
html:root,
html[data-theme-preset],
html[data-theme-preset="default"] {
  --font-ui-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, sans-serif !important;
  --font-body: var(--font-ui-sans) !important;
  --font-sans: var(--font-ui-sans) !important;

  --radius: 1rem !important;
  --radius-xs: 0.5rem !important;
  --radius-sm: 0.625rem !important;
  --radius-md: 0.75rem !important;
  --radius-lg: 1rem !important;
  --radius-xl: 1.25rem !important;
  --radius-2xl: 1.5rem !important;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui-sans) !important;
  letter-spacing: -0.008em;
}

/* 浠ｇ爜绛夊 */
code, pre, kbd, samp, .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* ---------- 2. 娴呰壊涓婚鑹叉澘锛圫hareLLM 椋庯級 ---------- */
html:not(.dark),
html[data-theme-preset]:not(.dark) {
  --background: #f7f5fb !important;
  --foreground: #1f2937 !important;

  --card: #ffffff !important;
  --card-foreground: #1f2937 !important;
  --popover: #ffffff !important;
  --popover-foreground: #1f2937 !important;

  --primary: #93c5fd !important;
  --primary-foreground: #1e3a5f !important;

  --secondary: #eff6ff !important;
  --secondary-foreground: #1e3a5f !important;

  --muted: #f3f4f6 !important;
  --muted-foreground: #9ca3af !important;

  --accent: #dbeafe !important;
  --accent-foreground: #1d4ed8 !important;

  --destructive: #f87171 !important;
  --destructive-foreground: #ffffff !important;

  --border: rgba(0, 0, 0, 0.06) !important;
  --input: rgba(0, 0, 0, 0.08) !important;
  --ring: #93c5fd !important;
}

/* 娣辫壊涓婚 */
html.dark {
  --background: #0f1117 !important;
  --foreground: #e5e7eb !important;
  --card: #1a1d26 !important;
  --card-foreground: #e5e7eb !important;
  --popover: #1a1d26 !important;
  --popover-foreground: #e5e7eb !important;
  --primary: #3b82f6 !important;
  --primary-foreground: #ffffff !important;
  --secondary: #252a36 !important;
  --secondary-foreground: #e5e7eb !important;
  --muted: #252a36 !important;
  --muted-foreground: #9ca3af !important;
  --accent: #1e3a5f !important;
  --accent-foreground: #93c5fd !important;
  --border: rgba(255, 255, 255, 0.08) !important;
  --input: rgba(255, 255, 255, 0.1) !important;
  --ring: #3b82f6 !important;
}

/* ---------- 3. 娓愬彉鑳屾櫙 ---------- */
html:not(.dark) body {
  background: #f7f5fb !important;
  background-image:
    radial-gradient(ellipse 70% 55% at 8% 0%, rgba(196, 181, 253, 0.30), transparent 62%),
    radial-gradient(ellipse 65% 55% at 95% 100%, rgba(165, 243, 252, 0.30), transparent 62%),
    radial-gradient(ellipse 55% 45% at 75% 8%, rgba(251, 207, 232, 0.22), transparent 60%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

html.dark body {
  background: #0f1117 !important;
  background-image:
    radial-gradient(ellipse 70% 55% at 8% 0%, rgba(99, 102, 241, 0.12), transparent 62%),
    radial-gradient(ellipse 65% 55% at 95% 100%, rgba(6, 182, 212, 0.10), transparent 62%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

/* 绉婚櫎涔嬪墠 Apple 涓婚鐨勯《閮ㄨ楗?*/
body::before,
body::after {
  display: none !important;
}

/* ---------- 4. 椤舵爮锛氱櫧鑹茶兌鍥?---------- */
header,
[class*="header"]:not([class*="table"]):not([class*="card"]) {
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

html:not(.dark) header {
  background-color: rgba(255, 255, 255, 0.78) !important;
  border-bottom: none !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

/* 椤舵爮鍐呯殑瀵艰埅鑳跺泭 */
html:not(.dark) header a,
html:not(.dark) header button {
  border-radius: 999px !important;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}

html:not(.dark) header a:hover,
html:not(.dark) header button:hover {
  background-color: rgba(219, 234, 254, 0.7) !important;
}

/* ---------- 5. 渚ф爮 ---------- */
html:not(.dark) aside,
html:not(.dark) [class*="sidebar"],
html:not(.dark) nav[class*="side"] {
  background-color: rgba(255, 255, 255, 0.72) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid rgba(0, 0, 0, 0.04) !important;
}

/* 渚ф爮鑿滃崟椤癸細澶у渾瑙?+ 娣¤摑搴曢€変腑 */
html:not(.dark) aside a,
html:not(.dark) aside button,
html:not(.dark) [class*="sidebar"] a,
html:not(.dark) [class*="sidebar"] button {
  border-radius: 11px !important;
  transition: background-color 0.18s ease, color 0.18s ease !important;
  font-size: 13.5px !important;
}

html:not(.dark) aside a:hover,
html:not(.dark) aside button:hover {
  background-color: rgba(239, 246, 255, 0.9) !important;
}

/* 閫変腑椤癸細娣¤摑濉厖 */
html:not(.dark) aside [data-active="true"],
html:not(.dark) aside [aria-current="page"],
html:not(.dark) [class*="sidebar"] [data-active="true"] {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
  font-weight: 600 !important;
}

/* ---------- 6. 鍗＄墖锛氱函鐧藉ぇ鍦嗚 ---------- */
html:not(.dark) [class*="bg-card"],
html:not(.dark) .glass-1,
html:not(.dark) .glass-2,
html:not(.dark) .glass-3,
html:not(.dark) .glass-4,
html:not(.dark) .glass-5 {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.045) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 8px 28px rgba(0, 0, 0, 0.035) !important;
  border-radius: 18px !important;
}

/* 鍗＄墖鍐呭祵濂楀崱鐗囨椂鐢ㄦ贰鐏板簳 */
html:not(.dark) [class*="bg-card"] [class*="bg-card"] {
  background-color: #fafafa !important;
  box-shadow: none !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: 14px !important;
}

/* ---------- 7. 琛ㄦ牸 ---------- */
table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

html:not(.dark) table {
  background: #ffffff !important;
  border-radius: 16px !important;
  overflow: hidden;
}

thead th {
  font-weight: 600 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.01em !important;
  color: #9ca3af !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

html.dark thead th {
  color: #9ca3af !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

tbody tr {
  transition: background-color 0.15s ease !important;
}

html:not(.dark) tbody tr:hover {
  background-color: #f8fafc !important;
}

html:not(.dark) tbody tr[data-state="selected"],
html:not(.dark) tbody tr[aria-selected="true"] {
  background-color: #eff6ff !important;
}

html.dark tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

table td {
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid rgba(0, 0, 0, 0.035) !important;
}

/* ---------- 8. 鎸夐挳 ---------- */
button, .btn, [role="button"] {
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-weight: 500 !important;
  border-radius: 11px !important;
  letter-spacing: -0.005em !important;
}

button:active, .btn:active {
  transform: scale(0.975) !important;
}

/* 涓绘寜閽細娴呰摑濉厖 + 娣辫摑瀛?*/
html:not(.dark) .bg-blue-500,
html:not(.dark) .bg-blue-600,
html:not(.dark) [class*="bg-primary"] {
  background-color: #93c5fd !important;
  color: #1e3a5f !important;
  border: none !important;
  box-shadow: 0 1px 2px rgba(147, 197, 253, 0.4) !important;
}

html:not(.dark) .bg-blue-500:hover,
html:not(.dark) .bg-blue-600:hover,
html:not(.dark) [class*="bg-primary"]:hover {
  background-color: #bfdbfe !important;
  box-shadow: 0 4px 14px rgba(147, 197, 253, 0.45) !important;
}

/* 娆¤鎸夐挳锛氭贰鐏板簳 */
html:not(.dark) button[class*="outline"],
html:not(.dark) .btn-secondary {
  background-color: #f3f4f6 !important;
  border-color: transparent !important;
  color: #374151 !important;
}

html:not(.dark) button[class*="outline"]:hover {
  background-color: #e5e7eb !important;
}

/* ---------- 9. 杈撳叆妗?---------- */
input, textarea, select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
  border-radius: 11px !important;
}

html:not(.dark) input,
html:not(.dark) textarea,
html:not(.dark) select {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
}

html:not(.dark) input:focus,
html:not(.dark) textarea:focus,
html:not(.dark) select:focus {
  outline: none !important;
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3.5px rgba(147, 197, 253, 0.25) !important;
}

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.25) !important;
}

/* ---------- 10. 寰界珷/鏍囩鑳跺泭鍖?---------- */
[class*="badge"], [class*="Badge"], [class*="tag"], [class*="chip"] {
  border-radius: 999px !important;
  font-weight: 500 !important;
  font-size: 11.5px !important;
}

/* ---------- 11. 寮圭獥/娴眰 ---------- */
[role="dialog"], [class*="popover"], [class*="dropdown"], [class*="Dialog"], [class*="Sheet"] {
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
  border: none !important;
}

html.dark [role="dialog"],
html.dark [class*="popover"],
html.dark [class*="dropdown"] {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* ---------- 12. 婊氬姩鏉?---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  border: 2.5px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.26);
  background-clip: content-box;
}
html.dark ::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  background-clip: content-box;
}

/* ---------- 13. 閾炬帴 ---------- */
a { transition: color 0.18s ease, opacity 0.18s ease; }
a:hover { opacity: 0.8; }

/* ---------- 14. 鍥炬爣瀹瑰櫒锛氬渾褰㈡祬钃濆簳 ---------- */
html:not(.dark) [class*="rounded-lg"][class*="bg-"],
html:not(.dark) [class*="rounded-md"][class*="bg-"] {
  border-radius: 11px !important;
}

/* ---------- 15. 鏁板瓧绛夊 ---------- */
[class*="tabular"], table td {
  font-variant-numeric: tabular-nums;
}

/* ---------- 16. 鍔ㄦ晥鏇茬嚎 ---------- */
*, *::before, *::after {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 密钥表格后台刷新时保持原有亮度，避免周期性闪烁。 */
.transition-opacity.opacity-60:has(.jitun-conc-th) {
  opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
\n
