/* TaskMate 原型共用样式：仅补充动画、伪元素、第三方控件外观，布局与配色走 Tailwind 工具类 */
:root {
  --tm-brand: #4f46e5;
  --tm-brand-2: #6366f1;
  --tm-bg: #f5f6ff;
  --tm-ink: #1f2933;
  --tm-line: #e7e9f7;
}

html,
body {
  background: var(--tm-bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

iconify-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* 细滚动条：PC 保留可发现的细条 */
.scroll-thin {
  scrollbar-width: thin;
  scrollbar-color: #cfd4ea transparent;
}
.scroll-thin::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.scroll-thin::-webkit-scrollbar-thumb {
  background: #cfd4ea;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.scroll-thin::-webkit-scrollbar-track {
  background: transparent;
}

/* 复习卡片翻转 */
.flip {
  perspective: 1400px;
}
.flip-inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.flip.is-flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

/* 阈值滑块 */
.tm-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #4f46e5 var(--tm-fill, 50%),
    #e8eaf6 var(--tm-fill, 50%)
  );
  outline: none;
}
.tm-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid #4f46e5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
  cursor: pointer;
}
.tm-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid #4f46e5;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
  cursor: pointer;
}

/* 入场与等待动画 */
@keyframes tmFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tm-fade {
  animation: tmFade 0.35s ease both;
}

@keyframes tmBlink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}
.tm-dot {
  animation: tmBlink 1.2s infinite;
}
.tm-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.tm-dot:nth-child(3) {
  animation-delay: 0.3s;
}

/* DDL 高亮 */
.tm-mark {
  background: #fef3c7;
  color: #7c2d12;
  border-radius: 4px;
  padding: 1px 3px;
  box-shadow: inset 0 0 0 1px #fcd34d;
}

/* 复选框与下拉统一品牌色 */
.tm-check {
  accent-color: #4f46e5;
  width: 16px;
  height: 16px;
}

/* 趋势柱状图 */
.tm-bar {
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-origin: bottom;
}
.tm-bar:hover {
  filter: brightness(1.06);
  transform: scaleY(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .flip-inner,
  .tm-bar {
    transition: none;
  }
  .tm-fade,
  .tm-dot {
    animation: none;
  }
}
