/* ============================================
   炮炮星球 - 高级特效样式表
   参考 uemo.net 特效实现
   主题色：#ccff00 (霓虹绿) | 背景：#050505 (深黑)
   ============================================ */

/* CSS Variables */
:root {
    --neon-green: #ccff00;
    --deep-black: #050505;
    --alert-red: #ff3333;
    --glass-bg: rgba(26, 26, 26, 0.85);
    --glass-border: rgba(204, 255, 0, 0.15);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   1. 鼠标跟随视差背景系统
   ============================================ */
.parallax-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-bg-container {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0;
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.1s linear;
}

/* 渐变背景层 */
.parallax-layer-1 {
    background: radial-gradient(ellipse at 30% 20%, rgba(204, 255, 0, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(204, 255, 0, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(100, 100, 100, 0.05) 0%, transparent 70%);
}

/* 网格线层 */
.parallax-layer-2 {
    background-image: 
        linear-gradient(rgba(204, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

/* 浮动粒子层 */
.parallax-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.parallax-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--neon-green);
    opacity: 0.3;
    animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translateY(20px) translateX(-20px) scale(0.8);
        opacity: 0.2;
    }
    75% {
        transform: translateY(-10px) translateX(30px) scale(1.1);
        opacity: 0.4;
    }
}

/* 光晕效果 */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 255, 0, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    transition: all 0.3s ease-out;
}

/* ============================================
   2. 导航栏玻璃态特效
   ============================================ */
.nav-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--transition-smooth);
}

.nav-glass.scrolled {
    background: rgba(5, 5, 5, 0.9);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 导航链接特效 */
.nav-link-advanced {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.3s var(--transition-smooth);
    overflow: hidden;
}

.nav-link-advanced::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-green);
    transition: all 0.3s var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link-advanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--neon-green);
    opacity: 0;
    transition: all 0.3s var(--transition-smooth);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--neon-green);
}

.nav-link-advanced:hover {
    color: var(--neon-green);
    transform: translateY(-2px);
}

.nav-link-advanced:hover::before {
    width: 100%;
}

.nav-link-advanced:hover::after {
    opacity: 1;
    bottom: -1px;
}

/* 下拉菜单特效 */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    padding: 16px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--transition-smooth);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--glass-bg);
    border-left: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
}

.nav-dropdown-item {
    display: block;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nav-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--neon-green);
    transform: scaleY(0);
    transition: transform 0.3s var(--transition-smooth);
}

.nav-dropdown-item:hover {
    color: var(--neon-green);
    background: rgba(204, 255, 0, 0.05);
    padding-left: 28px;
}

.nav-dropdown-item:hover::before {
    transform: scaleY(1);
}

/* ============================================
   3. 磁性按钮特效
   ============================================ */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: var(--neon-green);
    color: var(--deep-black);
    font-weight: 700;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s var(--transition-smooth);
    will-change: transform;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s var(--transition-smooth);
}

.magnetic-btn:hover::before {
    left: 100%;
}

.magnetic-btn-outline {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
}

.magnetic-btn-outline:hover {
    background: var(--neon-green);
    color: var(--deep-black);
}

/* 按钮光晕效果 */
.btn-glow {
    position: relative;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--neon-green);
    border-radius: 50px;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    z-index: -1;
    transition: all 0.4s var(--transition-smooth);
}

.btn-glow:hover::after {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.3;
    filter: blur(20px);
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   4. 3D卡片倾斜特效
   ============================================ */
.tilt-card {
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.tilt-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s var(--transition-smooth);
}

.tilt-card-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.tilt-card:hover .tilt-card-shine {
    opacity: 1;
}

/* ============================================
   5. 案例展示特效
   ============================================ */
.case-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.5s var(--transition-smooth);
    cursor: pointer;
}

.case-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 5, 5, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.case-card:hover {
    transform: translateY(-10px);
    border-color: rgba(204, 255, 0, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(204, 255, 0, 0.1);
}

.case-card:hover::before {
    opacity: 1;
}

.case-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

.case-card:hover .case-card-image {
    transform: scale(1.1);
}

.case-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s var(--transition-smooth);
}

.case-card:hover .case-card-content {
    transform: translateY(0);
    opacity: 1;
}

.case-card-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(204, 255, 0, 0.15);
    border: 1px solid rgba(204, 255, 0, 0.3);
    border-radius: 20px;
    color: var(--neon-green);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.case-card-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.case-card-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* 查看按钮 */
.case-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--neon-green);
    color: var(--deep-black);
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--transition-smooth) 0.1s;
}

.case-card:hover .case-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.case-view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(204, 255, 0, 0.4);
}

/* ============================================
   6. 文字特效
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--neon-green) 0%, #88ff00 50%, var(--neon-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: text-shine 3s linear infinite;
}

@keyframes text-shine {
    to {
        background-position: 200% center;
    }
}

.text-glow {
    text-shadow: 0 0 20px rgba(204, 255, 0, 0.5), 0 0 40px rgba(204, 255, 0, 0.3);
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--neon-green);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--neon-green); }
}

/* ============================================
   7. 滚动触发动画
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition-smooth);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* 交错动画延迟 */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================
   8. 数字滚动计数器
   ============================================ */
.counter-number {
    font-variant-numeric: tabular-nums;
    display: inline-block;
}

/* ============================================
   9. 图片悬停特效
   ============================================ */
.img-zoom-container {
    overflow: hidden;
    border-radius: 12px;
}

.img-zoom {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

.img-zoom-container:hover .img-zoom {
    transform: scale(1.1);
}

/* 图片遮罩 */
.img-overlay {
    position: relative;
    overflow: hidden;
}

.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 5, 5, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.img-overlay:hover::after {
    opacity: 1;
}

/* ============================================
   10. 边框流动特效
   ============================================ */
.border-flow {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
}

.border-flow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: border-rotate 4s linear infinite;
}

@keyframes border-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ============================================
   11. 脉冲光晕
   ============================================ */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(204, 255, 0, 0.6), 0 0 60px rgba(204, 255, 0, 0.3);
    }
}

/* ============================================
   12. 悬浮效果
   ============================================ */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

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

/* ============================================
   13. 加载动画
   ============================================ */
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(204, 255, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--neon-green);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   14. 自定义光标
   ============================================ */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 50px;
    height: 50px;
    background-color: rgba(204, 255, 0, 0.1);
}

/* 光标拖尾 */
.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.5;
    transform: translate(-50%, -50%);
}

/* ============================================
   15. 响应式调整
   ============================================ */
@media (max-width: 768px) {
    .parallax-bg-container {
        display: none;
    }
    
    .custom-cursor,
    .cursor-trail {
        display: none;
    }
    
    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
    }
    
    .case-card:hover {
        transform: translateY(-5px);
    }
}

/* ============================================
   16. 滚动条美化
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-black);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-green);
}

/* ============================================
   17. 选择文本颜色
   ============================================ */
::selection {
    background: rgba(204, 255, 0, 0.3);
    color: white;
}

/* ============================================
   18. 焦点样式
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}
