/* Global stylesheet served at /index.css (referenced in front/index.html) */

/* ── 响应式布局尺度（单一数据源）──────────────────────────────────────────
 * 侧栏宽 / 任务面板宽 / 内容区偏移 三者互相耦合，过去在 Sidebar.tsx 与
 * Dashboard.tsx 里以 442/462/437/899 等魔法数字重复十几处。现在统一抽到这里：
 *   - clamp(min, 理想vw, max) 让尺寸随屏幕平滑响应，不再大小屏比例失衡
 *   - content-ml 由 gap + sidebar 计算得出，改一处全联动
 * 修改布局宽度只需改本文件。
 */
:root {
  --edge-gap: 1rem;                              /* 对齐 Tailwind left-4 / bottom-4 */
  --sidebar-w: clamp(360px, 26vw, 460px);        /* 左侧参数栏 */
  --panel-w:   clamp(320px, 22vw, 440px);        /* 右侧任务面板 */

  /* 内容区左边距：边距 + 侧栏 + 边距 */
  --content-ml:      calc(var(--edge-gap) + var(--sidebar-w) + var(--edge-gap));
  /* 任务面板展开时：再加上面板宽度 */
  --content-ml-open: calc(var(--content-ml) + var(--panel-w));
  /* 任务面板 / 折叠按钮的 left 定位：紧贴侧栏右缘 */
  --panel-left:      calc(var(--edge-gap) + var(--sidebar-w) + var(--edge-gap));
  /* 任务面板展开后，折叠按钮跟随移动到面板右缘 */
  --panel-left-open: calc(var(--panel-left) + var(--panel-w));
}

/* 中小屏收紧尺寸，避免侧栏在窄屏占比过大 */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 320px;
    --panel-w: 300px;
  }
}

/* Subtle floating blobs (warm, minimal) */
@keyframes metro-float-a {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  50% { transform: translate3d(-18px, 14px, 0) scale(1.04); opacity: 0.75; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
}

@keyframes metro-float-b {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate3d(16px, -12px, 0) scale(1.06); opacity: 0.7; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
}

/* Soft sparkles drifting up */
@keyframes metro-sparkle-up {
  0% { transform: translate3d(0, 12px, 0); opacity: 0; }
  15% { opacity: 0.25; }
  70% { opacity: 0.18; }
  100% { transform: translate3d(0, -48px, 0); opacity: 0; }
}

.metro-blob-float-a { animation: metro-float-a 12s ease-in-out infinite; }
.metro-blob-float-b { animation: metro-float-b 16s ease-in-out infinite; }

.metro-sparkle {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.28); /* amber-500 */
  filter: blur(0.2px);
  animation: metro-sparkle-up 6.5s ease-in-out infinite;
}

.metro-sparkle.s2 { width: 4px; height: 4px; background: rgba(251, 146, 60, 0.22); animation-duration: 7.2s; }
.metro-sparkle.s3 { width: 5px; height: 5px; background: rgba(245, 158, 11, 0.18); animation-duration: 8.0s; }

/* Slightly better default smoothing */
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

