/* ========================================
   66Claw 毛玻璃主题样式
   所有页面共享
   ======================================== */

/* ========== Inter 字体（本地） ========== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========== Material Symbols Outlined（本地） ========== */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/fonts/material-symbols-outlined.ttf") format("truetype");
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
}

/* 全局字体与排版 */
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1, "calt" 1;
}

h1 {
  letter-spacing: -0.02em;
}

h2 {
  letter-spacing: -0.02em;
}

h3, h4 {
  letter-spacing: -0.01em;
}

/* 页面级毛玻璃底色 */
body.glass-theme {
  background: #f0f4f8;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(249, 115, 22, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

/* 页面背景浮动光斑 */
body.glass-theme::before,
body.glass-theme::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
}
body.glass-theme::before {
  top: -10%;
  left: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  animation: orb-drift 30s ease-in-out infinite;
}
body.glass-theme::after {
  bottom: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.06) 0%, transparent 70%);
  animation: orb-drift 25s ease-in-out infinite reverse;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

/* 导航栏毛玻璃 */
.glass-nav {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 导航链接悬停下划线动效 */
.glass-nav a {
  position: relative;
  transition: color 0.2s ease;
}
.glass-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(.4,0,.2,1), left 0.3s cubic-bezier(.4,0,.2,1);
}
.glass-nav a:hover::after {
  width: 100%;
  left: 0;
}
/* 当前活跃导航项 */
.glass-nav a.text-blue-600::after,
.glass-nav a[class*="font-bold"]::after {
  width: 100%;
  left: 0;
  opacity: 0.5;
}

/* 首屏光晕背景 */
.hero-glass {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.5) 0%, rgba(255, 255, 255, 0.3) 40%, transparent 100%);
}
.hero-glass::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: float-slow 20s ease-in-out infinite;
}
.hero-glass::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: float-slow 25s ease-in-out infinite reverse;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

/* 毛玻璃卡片 - 核心样式 */
.glass,
.glass-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 4px 24px -1px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s cubic-bezier(.4,0,.2,1), background 0.3s ease;
}
.glass:hover,
.glass-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.75);
  box-shadow:
    0 20px 52px -10px rgba(59, 130, 246, 0.10),
    0 8px 20px -6px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* 毛玻璃容器（section 级） */
.glass-section {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: saturate(150%) blur(24px);
  -webkit-backdrop-filter: saturate(150%) blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 毛玻璃内容卡 */
.glass-content {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: all 0.3s ease;
}
.glass-content:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.06);
}

/* 暗色毛玻璃 */
.dark-glass {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 毛玻璃分类标签 */
.glass-tag {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.25s ease;
}
.glass-tag:hover {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06);
}

/* Footer 毛玻璃 */
.glass-footer {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(150%) blur(20px);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

/* ========== UI 增强 ========== */

/* 按钮通用增强 - 渐变主色 + 微动效 */
button.bg-blue-600,
a.bg-blue-600,
button.bg-primary,
a.bg-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
  box-shadow: 0 4px 14px -2px rgba(59, 130, 246, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
button.bg-blue-600:hover,
a.bg-blue-600:hover,
button.bg-primary:hover,
a.bg-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -2px rgba(59, 130, 246, 0.45);
}
button.bg-blue-600:active,
a.bg-blue-600:active,
button.bg-primary:active,
a.bg-primary:active {
  transform: translateY(0);
}

/* chip 标签激活态增强 */
.chip-active {
  background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 10px -2px rgba(59, 130, 246, 0.4);
}

/* 全局平滑滚动 + 始终显示滚动条轨道防抖 */
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* 选中文本高亮色 */
::selection {
  background: rgba(59, 130, 246, 0.15);
  color: inherit;
}

/* 页面切换遮罩 - 纯 CSS 初始遮住，JS 淡出 */
#page-curtain {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: 0;
  z-index: 9999;
  background: #f0f4f8;
  opacity: 1;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(.4,0,.2,1);
}
#page-curtain.hide {
  opacity: 0;
}

/* ========== 进阶动效 ========== */

/* 滚动渐入动画 */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 渐变文字 - 用于标题 */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 卡片彩色边框光效 hover */
.glass-glow {
  position: relative;
}
.glass-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.15), rgba(249,115,22,0.1));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.glass-glow:hover::before {
  opacity: 1;
}

/* 脉动提示点 */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0; }
}
.pulse-dot {
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background: #f97316;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* 微光扫过效果 - 适用于按钮和卡片 */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: none;
  animation: shimmer-sweep 3s ease-in-out infinite;
}
@keyframes shimmer-sweep {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

/* Footer 增强 */
.glass-footer a {
  transition: color 0.2s ease;
}
.glass-footer h4 {
  background: linear-gradient(135deg, #1e293b, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 柔和光晕装饰（可用于任意 section） */
.glow-blue {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.glow-orange {
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
