/* 沉浸式首页增强样式 - 参考几何节点和现代Web设计 */

/* ============================================
   1. 动态渐变背景系统
============================================ */
.hero-enhanced {
    position: relative;
    overflow: hidden;
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gradientShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(10px, -10px) scale(1.05);
        opacity: 0.9;
    }
    50% {
        transform: translate(-10px, 10px) scale(1.1);
        opacity: 0.85;
    }
    75% {
        transform: translate(10px, 10px) scale(1.05);
        opacity: 0.9;
    }
}

/* ============================================
   2. 几何装饰元素
============================================ */
.geometric-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.6;
}

.geometric-shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.geometric-shape:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
}

.geometric-shape:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: -7s;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
}

.geometric-shape:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 15%;
    animation-delay: -14s;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(5deg);
    }
    50% {
        transform: translate(-15px, 15px) rotate(-3deg);
    }
    75% {
        transform: translate(15px, 10px) rotate(3deg);
    }
}

/* ============================================
   3. 玻璃态卡片效果增强
============================================ */
.glass-card-enhanced {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.8s ease;
}

.glass-card-enhanced:hover::before {
    left: 100%;
}

/* ============================================
   4. 服务器状态栏增强
============================================ */
.status-bar-enhanced {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.status-bar-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(16, 185, 129, 0.5),
        transparent
    );
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ============================================
   5. 数据指标动画
============================================ */
.stat-item {
    position: relative;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(16, 185, 129, 0.8),
        transparent
    );
    transition: transform 0.3s ease;
}

.stat-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.stat-value {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: valueGlow 2s ease-in-out infinite;
}

@keyframes valueGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

/* ============================================
   6. 状态指示器动画
============================================ */
.status-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.status-dot {
    position: relative;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(16, 185, 129, 0.8),
        0 0 20px rgba(16, 185, 129, 0.5);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 50%;
    animation: ripple 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   7. 按钮增强效果
============================================ */
.btn-enhanced {
    position: relative;
    padding: 1rem 2.5rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 16px;
    border: none;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    box-shadow: 
        0 10px 30px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-enhanced:hover::before {
    opacity: 1;
}

.btn-enhanced:active {
    transform: translateY(-1px);
}

/* ============================================
   8. 粒子背景效果（纯CSS）
============================================ */
.particles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: -2s; animation-duration: 15s; }
.particle:nth-child(3) { left: 30%; animation-delay: -4s; animation-duration: 18s; }
.particle:nth-child(4) { left: 40%; animation-delay: -6s; animation-duration: 14s; }
.particle:nth-child(5) { left: 50%; animation-delay: -8s; animation-duration: 16s; }
.particle:nth-child(6) { left: 60%; animation-delay: -10s; animation-duration: 13s; }
.particle:nth-child(7) { left: 70%; animation-delay: -12s; animation-duration: 17s; }
.particle:nth-child(8) { left: 80%; animation-delay: -14s; animation-duration: 19s; }
.particle:nth-child(9) { left: 90%; animation-delay: -16s; animation-duration: 15s; }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px) scale(1);
        opacity: 0;
    }
}

/* ============================================
   9. 悬浮卡片效果
============================================ */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ============================================
   10. 网格背景效果
============================================ */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* ============================================
   11. 响应式优化
============================================ */
@media (max-width: 768px) {
    .geometric-shape {
        display: none;
    }
    
    .status-bar-enhanced {
        padding: 1rem 1.25rem;
        border-radius: 16px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .btn-enhanced {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   12. 文字渐变效果
============================================ */
.text-gradient-emerald {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 5s ease infinite;
    background-size: 200% auto;
}

@keyframes gradientText {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* ============================================
   13. 数据流动效果
============================================ */
.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(16, 185, 129, 0.2),
        transparent
    );
    animation: dataFlow 3s ease-in-out infinite;
}

@keyframes dataFlow {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   14. 发光边框效果
============================================ */
.glow-border {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.5),
        rgba(59, 130, 246, 0.5),
        rgba(168, 85, 247, 0.5)
    );
    -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: borderGlow 3s linear infinite;
    background-size: 200% 200%;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   15. 性能优化
============================================ */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
