@charset "utf-8";
/* ==========================================================
 * v2.0 Phase 5 - 动画与精装样式
 * 文件: assets/css/animations.css
 *
 * 功能：
 *   1. 毛玻璃强化（多层、有彩边、内发光）
 *   2. 全局动态光斑背景（mesh gradient + 流动光晕）
 *   3. 滚动入场动画（配合 animations.js 的 IntersectionObserver）
 *   4. 微动效：按钮波纹、卡片浮起、心跳、抖动、加载点
 *   5. 渐变文字、彩虹边框、光泽扫描
 *
 * 使用：
 *   <div data-anim="fade-up" data-anim-delay="100">...</div>
 *   <div class="glass glass-strong glass-rim">...</div>
 *   <button class="btn-fill ripple-btn">...</button>
 * ========================================================== */

/* ============================================================
 * 1. 毛玻璃强化
 * ============================================================ */
.glass-strong {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        0 12px 40px rgba(91, 108, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* 彩色描边毛玻璃（hover 时显示渐变边） */
.glass-rim {
    position: relative;
}
.glass-rim::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(91,108,255,0.5), rgba(139,92,246,0.5), rgba(236,72,153,0.4));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}
.glass-rim:hover::before { opacity: 1; }

/* 玻璃浮起（hover 时） */
.glass-lift {
    transition: transform .4s cubic-bezier(.22,1,.36,1),
                box-shadow .4s cubic-bezier(.22,1,.36,1);
    will-change: transform;
}
.glass-lift:hover {
    transform: translateY(-6px);
    box-shadow:
        0 24px 60px rgba(91, 108, 255, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

/* ============================================================
 * 2. 全局动态光斑背景（auto.fuguicn.com 风格）
 * ============================================================ */
.bg-aurora {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    overflow: hidden;
}
.bg-aurora::before,
.bg-aurora::after {
    content: "";
    position: absolute;
    width: 60vmax; height: 60vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}
.bg-aurora::before {
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: -10vmax; left: -10vmax;
    animation: aurora-1 22s ease-in-out infinite alternate;
}
.bg-aurora::after {
    background: radial-gradient(circle, #5b6cff 0%, transparent 70%);
    bottom: -10vmax; right: -10vmax;
    animation: aurora-2 26s ease-in-out infinite alternate;
}
.bg-aurora-3 {
    position: absolute;
    width: 50vmax; height: 50vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    top: 30%; left: 40%;
    animation: aurora-3 30s ease-in-out infinite alternate;
}
@keyframes aurora-1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(20vw, 10vh) scale(1.2); }
    100% { transform: translate(10vw, 30vh) scale(0.9); }
}
@keyframes aurora-2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-15vw, -10vh) scale(1.1); }
    100% { transform: translate(-25vw, -20vh) scale(1.3); }
}
@keyframes aurora-3 {
    0%   { transform: translate(-50%, -50%) scale(1); }
    50%  { transform: translate(-30%, -70%) scale(1.3); }
    100% { transform: translate(-70%, -30%) scale(0.9); }
}

/* 网格底纹叠加 */
.bg-grid-soft {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(91,108,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91,108,255,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 100%);
}

/* ============================================================
 * 3. 滚动入场动画（配合 animations.js）
 * ============================================================ */
[data-anim] {
    opacity: 0;
    transition:
        opacity var(--duration-500, 500ms) cubic-bezier(.22,1,.36,1),
        transform var(--duration-500, 500ms) cubic-bezier(.22,1,.36,1),
        filter var(--duration-500, 500ms) cubic-bezier(.22,1,.36,1);
    will-change: transform, opacity;
}
[data-anim="fade-up"]    { transform: translateY(24px); }
[data-anim="fade-down"]  { transform: translateY(-24px); }
[data-anim="fade-left"]  { transform: translateX(24px); }
[data-anim="fade-right"] { transform: translateX(-24px); }
[data-anim="fade"]       { transform: none; }
[data-anim="zoom-in"]    { transform: scale(.94); }
[data-anim="zoom-out"]   { transform: scale(1.06); }
[data-anim="blur-in"]    { filter: blur(10px); transform: scale(.97); }
[data-anim].anim-in {
    opacity: 1;
    transform: none;
    filter: none;
}

/* ============================================================
 * 4. 微动效
 * ============================================================ */

/* 4.1 按钮波纹（点击扩散圆） */
.ripple-btn { position: relative; overflow: hidden; }
.ripple-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transform: scale(0);
    animation: ripple-go .6s linear;
    pointer-events: none;
}
.ripple-btn.dark-ripple .ripple {
    background: rgba(91, 108, 255, 0.25);
}
@keyframes ripple-go {
    to { transform: scale(2.5); opacity: 0; }
}

/* 4.2 心跳 */
.beat { animation: beat 1.6s ease-in-out infinite; }
@keyframes beat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

/* 4.3 浮动小幅 */
.floaty { animation: floaty 4s ease-in-out infinite; }
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* 4.4 抖动（错误反馈） */
.shake { animation: shake .5s ease-in-out; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* 4.5 数字翻滚（首次出现） */
.count-up { display: inline-block; animation: count-up .5s ease-out; }
@keyframes count-up {
    0%   { opacity: 0; transform: translateY(8px) scale(.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 4.6 加载点动画 */
.dot-loading {
    display: inline-flex; gap: 4px; align-items: center;
}
.dot-loading span {
    display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: currentColor;
    animation: dot-pulse 1.2s ease-in-out infinite;
}
.dot-loading span:nth-child(2) { animation-delay: .15s; }
.dot-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(.7); opacity: .5; }
    40%           { transform: scale(1.1); opacity: 1; }
}

/* 4.7 渐变文字（标题用） */
.text-grad {
    background: linear-gradient(135deg, #5b6cff 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4.8 光泽扫过（卡片高光） */
.shine {
    position: relative;
    overflow: hidden;
}
.shine::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(115deg,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%);
    transform: skewX(-20deg);
    transition: left .8s ease;
    pointer-events: none;
}
.shine:hover::after { left: 150%; }

/* 4.9 输入框聚焦微光 */
.input-glow:focus,
input.input:focus,
select.input:focus,
textarea.input:focus {
    border-color: var(--primary, #5b6cff) !important;
    box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.15) !important;
    transition: box-shadow .25s ease, border-color .25s ease;
}

/* 4.10 卡片堆叠序列动画（父加 .stagger-children） */
.stagger-children > *               { opacity: 0; transform: translateY(16px); }
.stagger-children.anim-in > *       { animation: stagger-in .6s cubic-bezier(.22,1,.36,1) forwards; }
.stagger-children.anim-in > *:nth-child(1) { animation-delay: 0s; }
.stagger-children.anim-in > *:nth-child(2) { animation-delay: .08s; }
.stagger-children.anim-in > *:nth-child(3) { animation-delay: .16s; }
.stagger-children.anim-in > *:nth-child(4) { animation-delay: .24s; }
.stagger-children.anim-in > *:nth-child(5) { animation-delay: .32s; }
.stagger-children.anim-in > *:nth-child(6) { animation-delay: .40s; }
.stagger-children.anim-in > *:nth-child(7) { animation-delay: .48s; }
.stagger-children.anim-in > *:nth-child(8) { animation-delay: .56s; }
@keyframes stagger-in {
    to { opacity: 1; transform: translateY(0); }
}

/* 4.11 hero 标题分词揭示（可选） */
.split-line {
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
}
.split-line > span {
    display: inline-block;
    transform: translateY(110%);
    animation: line-up .8s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes line-up { to { transform: translateY(0); } }

/* 4.12 数字滚动（hero-stats 用 animations.js 触发） */
.num-counter { font-variant-numeric: tabular-nums; }

/* 4.13 滚动收缩导航 */
.navbar.shrink {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    box-shadow: 0 6px 24px rgba(91,108,255,0.10);
}
.navbar.shrink .nav-inner { padding-top: 10px; padding-bottom: 10px; }

/* ============================================================
 * 5. 模态框/Toast 增强
 * ============================================================ */
.toast.show { animation: toast-in .35s cubic-bezier(.22,1,.36,1); }
@keyframes toast-in {
    0%   { opacity: 0; transform: translate(-50%, 16px) scale(.95); }
    100% { opacity: 1; transform: translate(-50%, 0)   scale(1); }
}

/* 客服浮窗气泡进入 */
.cs-panel.open {
    animation: cs-panel-in .35s cubic-bezier(.22,1,.36,1);
}
@keyframes cs-panel-in {
    0%   { opacity: 0; transform: translateY(8px) scale(.96); }
    100% { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ============================================================
 * 6. 响应/降级
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    [data-anim] { opacity: 1; transform: none !important; filter: none !important; }
}
@media (max-width: 720px) {
    .bg-aurora::before,
    .bg-aurora::after { filter: blur(60px); }
}