/* ===========================================================
   牛子涨涨的 · 可爱卡通主题（注入式，不改 new-api 源码）
   通过覆盖 shadcn 主题变量实现换肤：
   --primary / --background / --card / --radius 等
   =========================================================== */

:root {
  --radius: 1.25rem;

  /* 主色：草莓粉 */
  --primary: #ff7eb6;
  --primary-foreground: #ffffff;

  /* 背景：奶油樱花 */
  --background: #fff5fa;
  --foreground: #40293a;

  --card: #ffffff;
  --card-foreground: #40293a;
  --popover: #ffffff;
  --popover-foreground: #40293a;

  --secondary: #ffe6f2;
  --secondary-foreground: #b03a76;

  --muted: #fff0f7;
  --muted-foreground: #9b7390;

  /* 强调：薄荷紫 */
  --accent: #a78bfa;
  --accent-foreground: #ffffff;

  --border: #ffd9ea;
  --input: #ffd9ea;
  --ring: #ff9ecd;

  /* 圆润字体 */
  --font-ui-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI",
    "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: var(--font-ui-sans);
}

.dark {
  --background: #2a1d28;
  --foreground: #ffe9f4;

  --card: #36243a;
  --card-foreground: #ffe9f4;
  --popover: #36243a;
  --popover-foreground: #ffe9f4;

  --primary: #ff8cc6;
  --primary-foreground: #2a1020;

  --secondary: #4a3050;
  --secondary-foreground: #ffd0e6;

  --muted: #3d2940;
  --muted-foreground: #d8b3c8;

  --accent: #b9a1ff;
  --accent-foreground: #1e1026;

  --border: #55385c;
  --input: #55385c;
  --ring: #ff9ecd;
}

/* ---------- 背景：柔和渐变 + 波点 ---------- */
body {
  background-image: radial-gradient(circle at 12% 8%, #ffe0f0 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, #e8e0ff 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, #fff0f8 0%, transparent 55%);
  background-attachment: fixed;
}

.dark body {
  background-image: radial-gradient(circle at 12% 8%, #3d2136 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, #2c2444 0%, transparent 42%),
    radial-gradient(circle at 50% 100%, #331f30 0%, transparent 55%);
}

/* ---------- 卡片：更圆、更软、粉色描边 ---------- */
[class*="rounded-"] {
  border-radius: var(--radius);
}

/* ---------- 按钮：果冻感 ---------- */
button,
a[role="button"] {
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px rgba(255, 126, 182, 0.55);
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

/* ---------- 输入框：圆润 + 粉色聚焦环 ---------- */
input,
textarea,
select {
  border-radius: calc(var(--radius) * 0.7);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 126, 182, 0.22);
}

/* ---------- 表格 / 列表：行悬停粉底 ---------- */
tr:hover > td {
  background-color: rgba(255, 126, 182, 0.06);
}

/* ---------- 滚动条：粉色糖果 ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: #ffb3d6 transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffb3d6, #ff8cc6);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff8cc6, #ff7eb6);
  background-clip: content-box;
}

/* ---------- 选中文字 ---------- */
::selection {
  background: #ffd0e6;
  color: #40293a;
}

/* ---------- 侧边栏 / 顶栏：轻微粉紫渐变 ---------- */
aside,
[data-sidebar],
header {
  backdrop-filter: blur(8px);
}

/* ---------- 链接 hover ---------- */
a:hover {
  color: var(--primary);
}

/* ---------- 徽标/标签：圆润 ---------- */
[class*="badge"],
[class*="Badge"],
[class*="tag"],
[class*="Tag"] {
  border-radius: 999px !important;
}

/* ---------- 弹窗：大圆角 + 柔和阴影 ---------- */
[role="dialog"],
[class*="modal"],
[class*="Modal"] {
  border-radius: 1.5rem !important;
  box-shadow: 0 24px 60px -20px rgba(160, 80, 140, 0.35);
}
