/* ========================================================= */
/* Linxy CN Web — 公共交互/动效层 (ui-effects.css)           */
/* 用途：统一青绿色主题、背景动效、滚动揭示、卡片光晕、      */
/*       微交互与无障碍 reduced-motion 适配。                 */
/* ========================================================= */

:root {
    /* 品牌青绿色系 */
    --linxy-brand: #22d3b6;
    --linxy-brand-strong: #18c7b5;
    --linxy-brand-soft: rgba(34, 211, 182, 0.14);
    --linxy-brand-border: rgba(34, 211, 182, 0.42);
    --linxy-brand-glow: rgba(34, 211, 182, 0.28);
    --linxy-brand-grad: linear-gradient(135deg, #22d3b6, #18c7b5);

    /* 功能色（保留金色 Pro 点缀） */
    --linxy-gold: #F9D423;
    --linxy-gold-grad: linear-gradient(135deg, #F9D423, #FF4E50);
    --linxy-success: #4ade80;

    /* 深色背景 */
    --bg-deep: #0a0a0f;
    --bg-card: rgba(25, 25, 32, 0.6);
    --bg-panel: #15151a;
    --text-main: #f8f9fa;
    --text-muted: #a1aab3;
    --glass-border: rgba(255, 255, 255, 0.08);

    /* 统一缓动 */
    --ease-premium: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 粒子与极光背景容器 */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: var(--bg-deep);
    overflow: hidden;
    pointer-events: none;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float 15s infinite alternate linear;
}

.aurora-1 { top: -5%; left: -10%; width: 600px; height: 600px; background: var(--linxy-brand); }
.aurora-2 { bottom: 10%; right: -5%; width: 500px; height: 500px; background: var(--linxy-brand-strong); animation-delay: -6s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

/* 滚动揭示动画 */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-premium),
                transform 0.8s var(--ease-premium);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.8s var(--ease-premium),
                transform 0.8s var(--ease-premium);
}

.reveal-scale.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 卡片容器通用光晕（Spotlight） */
.lx-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
}

.lx-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
                rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.lx-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y),
                rgba(34, 211, 182, 0.22), transparent 40%);
    padding: 1.5px;
    -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 0.3s;
    pointer-events: none;
    z-index: 0;
}

.lx-card:hover {
    border-color: rgba(34, 211, 182, 0.35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(34, 211, 182, 0.08);
    z-index: 10;
}

.lx-card:hover::before,
.lx-card:hover::after { opacity: 1; }

/* 按钮微交互统一 */
.lx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease-premium),
                box-shadow 0.25s var(--ease-premium),
                filter 0.25s var(--ease-premium),
                background 0.25s var(--ease-premium);
}

.lx-btn-primary {
    background: var(--linxy-brand-grad);
    color: #041311;
    box-shadow: 0 8px 25px rgba(34, 211, 182, 0.28);
}

.lx-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(34, 211, 182, 0.45);
    filter: brightness(1.05);
}

.lx-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(34, 211, 182, 0.35);
    color: #fff;
    backdrop-filter: blur(10px);
}

.lx-btn-secondary:hover {
    background: rgba(34, 211, 182, 0.1);
    border-color: rgba(34, 211, 182, 0.6);
    transform: translateY(-2px);
}

/* 链接下划线展开动画 */
.lx-link {
    color: var(--linxy-brand);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.25s var(--ease-premium);
}

.lx-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--linxy-brand);
    transition: width 0.25s var(--ease-premium), left 0.25s var(--ease-premium);
}

.lx-link:hover {
    color: #fff;
}

.lx-link:hover::after {
    width: 100%;
    left: 0;
}

/* 导航栏滚动状态 */
.lx-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: background 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.lx-header.scrolled {
    background: rgba(10, 10, 15, 0.9);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.04);
}

/* 导航当前页指示 */
.lx-nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s var(--ease-premium);
}

.lx-nav-link:hover,
.lx-nav-link.active { color: #fff; }

.lx-nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--linxy-brand);
    box-shadow: 0 0 8px rgba(34, 211, 182, 0.5);
}

/* Toast 提示 */
#lx-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    background: var(--linxy-brand);
    color: #000;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s var(--ease-bounce), opacity 0.4s ease;
    opacity: 0;
    z-index: 99999;
    pointer-events: none;
}

#lx-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .aurora,
    #particles-canvas,
    .float-anim,
    .reveal,
    .reveal-scale {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
