/* ==================== ANIMATED BACKGROUND ENHANCEMENT ==================== */
/* Background động cho V-MENTOR AI 2026 */

/* ==================== ENHANCED GRADIENT ORBS ==================== */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
}

/* Orb 1 - Purple/Blue - Di chuyển theo đường tròn lớn */
.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    top: -250px;
    left: -250px;
    animation: orbitLarge 30s infinite ease-in-out;
}

/* Orb 2 - Pink/Red - Di chuyển theo đường elip */
.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -200px;
    right: -200px;
    animation: orbitMedium 15s infinite ease-in-out;
    animation-delay: -5s;
}

/* Orb 3 - Cyan/Blue - Di chuyển theo đường ngang */
.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    right: 10%;
    animation: floatHorizontal 18s infinite ease-in-out;
    animation-delay: -10s;
}

/* ==================== ADDITIONAL ORBS FOR MORE DEPTH ==================== */
.orb-4 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    top: 20%;
    left: 40%;
    animation: floatDiagonal 22s infinite ease-in-out;
    opacity: 0.35;
}

.orb-5 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    bottom: 30%;
    left: 15%;
    animation: pulseAndMove 16s infinite ease-in-out;
    opacity: 0.4;
}
.orb-6 {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #ee9ca7 0%, #ffdde1 100%);
    top: 40%;
    left: 60%;
    animation: floatHorizontal 24s infinite ease-in-out;
    opacity: 0.35;
}

/* ==================== FLOATING PARTICLES ==================== */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: floatParticle 15s infinite ease-in-out;
}

/* Particles với các vị trí và timing khác nhau */
.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 25%;
    top: 60%;
    animation-delay: -3s;
    animation-duration: 15s;
    background: rgba(139, 92, 246, 0.3);
}

.particle:nth-child(3) {
    left: 50%;
    top: 30%;
    animation-delay: -6s;
    animation-duration: 18s;
    background: rgba(59, 130, 246, 0.35);
}

.particle:nth-child(4) {
    left: 75%;
    top: 70%;
    animation-delay: -9s;
    animation-duration: 20s;
    background: rgba(16, 185, 129, 0.3);
}

.particle:nth-child(5) {
    left: 85%;
    top: 15%;
    animation-delay: -12s;
    animation-duration: 14s;
    background: rgba(245, 158, 11, 0.35);
}

.particle:nth-child(6) {
    left: 40%;
    top: 80%;
    animation-delay: -2s;
    animation-duration: 16s;
    background: rgba(236, 72, 153, 0.3);
}

.particle:nth-child(7) {
    left: 60%;
    top: 45%;
    animation-delay: -7s;
    animation-duration: 19s;
    background: rgba(79, 70, 229, 0.35);
}

.particle:nth-child(8) {
    left: 15%;
    top: 50%;
    animation-delay: -4s;
    animation-duration: 17s;
    background: rgba(20, 184, 166, 0.3);
}

/* ==================== MESH GRADIENT LINES ==================== */
.mesh-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.15), 
        transparent
    );
    animation: meshFlow 10s infinite linear;
}

.mesh-line:nth-child(1) {
    top: 20%;
    width: 100%;
    animation-delay: 0s;
}

.mesh-line:nth-child(2) {
    top: 50%;
    width: 100%;
    animation-delay: -3s;
}

.mesh-line:nth-child(3) {
    top: 80%;
    width: 100%;
    animation-delay: -6s;
}

/* ==================== ANIMATIONS ==================== */

/* Quỹ đạo tròn lớn */
@keyframes orbitLarge {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(60px, -60px) scale(1.15) rotate(90deg);
    }
    50% {
        transform: translate(100px, 20px) scale(0.9) rotate(180deg);
    }
    75% {
        transform: translate(40px, 80px) scale(1.05) rotate(270deg);
    }
}

/* Quỹ đạo hình elip */
@keyframes orbitMedium {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-80px, -50px) scale(1.2);
    }
    66% {
        transform: translate(-40px, 40px) scale(0.85);
    }
}

/* Di chuyển ngang với nhấp nhô */
@keyframes floatHorizontal {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-100px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 40px) scale(0.95);
    }
}

/* Di chuyển chéo */
@keyframes floatDiagonal {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(80px, -80px) rotate(90deg);
    }
    50% {
        transform: translate(-60px, -40px) rotate(180deg);
    }
    75% {
        transform: translate(-100px, 60px) rotate(270deg);
    }
}

/* Pulse và di chuyển kết hợp */
@keyframes pulseAndMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(50px, -60px) scale(1.3);
        opacity: 0.5;
    }
    50% {
        transform: translate(-40px, 30px) scale(0.8);
        opacity: 0.3;
    }
    75% {
        transform: translate(70px, 50px) scale(1.1);
        opacity: 0.45;
    }
}

/* Animation cho particles */
@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translate(100px, -200px) scale(1.5);
        opacity: 0.8;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(200px, -400px) scale(0.5);
        opacity: 0;
    }
}

/* Animation cho mesh lines */
@keyframes meshFlow {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================== GLOW EFFECTS ==================== */
.glow-spot {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(102, 126, 234, 0.2) 0%,
        transparent 70%
    );
    animation: glowPulse 4s infinite ease-in-out;
    pointer-events: none;
}

.glow-spot:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.glow-spot:nth-child(2) {
    top: 60%;
    left: 70%;
    animation-delay: -2s;
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

/* ==================== STARFIELD EFFECT ==================== */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

.star:nth-child(odd) {
    animation-delay: -1.5s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Tạo các stars ở các vị trí ngẫu nhiên */
.star:nth-child(1) { top: 15%; left: 25%; }
.star:nth-child(2) { top: 35%; left: 45%; animation-duration: 2.5s; }
.star:nth-child(3) { top: 55%; left: 65%; animation-duration: 3.5s; }
.star:nth-child(4) { top: 25%; left: 75%; animation-duration: 2s; }
.star:nth-child(5) { top: 75%; left: 35%; animation-duration: 4s; }
.star:nth-child(6) { top: 85%; left: 55%; animation-duration: 2.8s; }
.star:nth-child(7) { top: 45%; left: 15%; animation-duration: 3.2s; }
.star:nth-child(8) { top: 65%; left: 85%; animation-duration: 2.3s; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .gradient-orb {
        filter: blur(60px);
    }
    
    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
    .orb-4 { width: 220px; height: 220px; }
    .orb-5 { width: 180px; height: 180px; }
    
    .particle {
        width: 6px;
        height: 6px;
    }
    
    .glow-spot {
        width: 150px;
        height: 150px;
    }
}

/* ==================== PERFORMANCE OPTIMIZATION ==================== */
/* Sử dụng will-change để tối ưu hóa performance */
.gradient-orb,
.particle,
.mesh-line,
.glow-spot {
    will-change: transform, opacity;
}

/* Giảm hiệu ứng trên thiết bị yếu */
@media (prefers-reduced-motion: reduce) {
    .gradient-orb,
    .particle,
    .mesh-line,
    .glow-spot,
    .star {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .gradient-orb {
        filter: blur(60px); /* Giảm blur */
    }
    .orb-1 { width: 300px; height: 300px; }
}