/* ============================================================
 * komiTools 官网 · 自定义样式
 * 备注：@theme 块保留在 index.html 的 <style type="text/tailwindcss">
 * 中，由 Tailwind v4 浏览器 CDN 运行时处理；此处只放纯 CSS。
 * ============================================================ */

/* 基础排版 */
html, body {
  background: #070a17;
  color: #e2e8f0;
  font-family: "Inter", "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.font-display { font-family: "Space Grotesk", "Inter", system-ui, sans-serif; letter-spacing: -0.02em; }
.font-mono    { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* 渐变文字 */
.text-gradient-cyan {
  background: linear-gradient(120deg, #67e8f9 0%, #06b6d4 35%, #a78bfa 75%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-gradient-orange {
  background: linear-gradient(120deg, #fdba74 0%, #fb923c 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 玻璃拟态 */
.glass {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.glass-strong {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

/* 网格背景 */
.bg-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* 光斑背景 */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}
.blob-cyan   { background: radial-gradient(circle, #06b6d4 0%, transparent 70%); }
.blob-violet { background: radial-gradient(circle, #7c3aed 0%, transparent 70%); }
.blob-orange { background: radial-gradient(circle, #f97316 0%, transparent 70%); }
.blob-pink   { background: radial-gradient(circle, #ec4899 0%, transparent 70%); }

@keyframes float-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(40px, -30px, 0) scale(1.08); }
}
@keyframes float-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-50px, 20px, 0) scale(1.12); }
}
@keyframes float-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(30px, 40px, 0) scale(0.95); }
}
.animate-float-1 { animation: float-1 18s ease-in-out infinite; }
.animate-float-2 { animation: float-2 22s ease-in-out infinite; }
.animate-float-3 { animation: float-3 26s ease-in-out infinite; }

/* 滚动进入动画 */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* 工具卡 hover */
.tool-card {
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              background-color 0.4s ease;
}
.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 18px 50px -20px rgba(6, 182, 212, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tool-card:hover .tool-icon {
  transform: scale(1.1) rotate(-4deg);
  color: #67e8f9;
}
.tool-icon {
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.4s ease;
}

/* Tab 切换 */
.tab-btn {
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tab-btn.active {
  background: linear-gradient(120deg, rgba(6, 182, 212, 0.22), rgba(167, 139, 250, 0.22));
  color: #e0f2fe;
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 8px 30px -10px rgba(6, 182, 212, 0.6);
}

/* 按钮主样式 */
.btn-primary {
  background: linear-gradient(120deg, #06b6d4 0%, #6366f1 50%, #a78bfa 100%);
  box-shadow: 0 12px 32px -8px rgba(99, 102, 241, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -10px rgba(99, 102, 241, 0.7),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-ghost {
  transition: all 0.3s ease;
}
.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.4);
}

/* 分割线 */
.divider-glow {
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), rgba(167, 139, 250, 0.5), transparent);
  height: 1px;
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b1020; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e293b, #334155);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #334155, #475569); }

/* 选中颜色 */
::selection { background: rgba(6, 182, 212, 0.35); color: #f0f9ff; }

/* 渐变描边卡片 */
.gradient-border {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
}
.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), transparent 40%, transparent 60%, rgba(167, 139, 250, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}
.gradient-border:hover::before { opacity: 1; }

/* 步骤连线 */
.step-line {
  background: repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.4) 0 6px, transparent 6px 14px);
}

/* 头部 logo 点阵动效 */
@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 0.7; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.pulse-dot { position: relative; }
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
  animation: pulse-ring 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}
