@tailwind base;
@tailwind components;
@tailwind utilities;

html, body, #root {
  height: 100%;
}

body {
  font-family: Inter, "Noto Sans SC", -apple-system, system-ui, sans-serif;
  background-color: #F8FAFC;
  color: #0F172A;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条美化 */
.scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #CBD5E1; }

/* 键帽 3D 效果 - Linear/Raycast 级质感 */
.keycap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: transform 180ms cubic-bezier(.3,.7,.4,1.2),
              box-shadow 200ms ease,
              filter 200ms ease;
  will-change: transform;
}
.keycap:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.08);
}
.keycap:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.95);
}
/* 大号键帽（L1 级别） */
.keycap-lg {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  min-width: 84px;
  border-radius: 10px;
}
/* 中号键帽（L2 级别） */
.keycap-md {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  min-width: 64px;
}
/* 小号键帽（L3 及更深级别） */
.keycap-sm {
  padding: 7px 12px;
  font-size: 12px;
  min-width: 52px;
  border-radius: 7px;
}

/* 键帽 stagger 入场动画 */
@keyframes keycapEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.keycap-enter {
  animation: keycapEnter 0.3s cubic-bezier(.22,1,.36,1) both;
}

/* 技能卡片展开区域 slide-down */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.skill-panel-enter {
  animation: slideDown 0.35s cubic-bezier(.22,1,.36,1) both;
}

/* 全屏进入缩放过渡 */
@keyframes fullscreenIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.fullscreen-enter {
  animation: fullscreenIn 0.3s cubic-bezier(.22,1,.36,1) both;
}

@keyframes overlayDrawerIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 居中弹层缩放入场 */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* 火焰角标摇晃动画 */
@keyframes flame-sway {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.05); }
}
.flame-badge {
  animation: flame-sway 1.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(255, 120, 0, 0.4));
}
