/**
 * Nashmi Survey Background - Enhanced Animated Style
 * Complete background replacement with advanced animations
 */

/* Main Background with Animated Gradient */
body.nashmi-survey-standalone {
    position: relative;
    background: linear-gradient(135deg, #1A2238 0%, #2C1C3E 25%, #C8102E 75%, #A00D26 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow-x: hidden;
}

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

/* Mesh Gradient Overlay */
body.nashmi-survey-standalone::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    background: 
        radial-gradient(at 20% 30%, #D4AF37 0px, transparent 50%),
        radial-gradient(at 80% 70%, #F4D03F 0px, transparent 50%),
        radial-gradient(at 50% 50%, #C8102E 0px, transparent 50%),
        radial-gradient(at 90% 20%, #D4AF37 0px, transparent 50%),
        radial-gradient(at 10% 80%, #F4D03F 0px, transparent 50%);
    filter: blur(100px);
    animation: meshMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* Animated Grid Pattern */
body.nashmi-survey-standalone::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridScroll 30s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gridScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Top Animated Border */
#main.site-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, 
        #D4AF37 0%, 
        #F4D03F 25%, 
        #D4AF37 50%, 
        #F4D03F 75%, 
        #D4AF37 100%);
    background-size: 200% 100%;
    animation: borderFlow 4s linear infinite;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    pointer-events: none;
    z-index: 10;
}

@keyframes borderFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Glowing Orbs */
#main.site-content::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 18s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, -80px) scale(1.2); }
    66% { transform: translate(-60px, 60px) scale(0.8); }
}

/* Additional orbs and elements using dedicated container */
.nashmi-survey-bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Orb 2 */
.nashmi-survey-bg-elements::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.3) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 18s ease-in-out infinite 6s;
}

/* Orb 3 */
.nashmi-survey-bg-elements::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(244, 208, 63, 0.35) 0%, transparent 70%);
    top: 40%;
    left: 35%;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbFloat 18s ease-in-out infinite 12s;
}

/* Arabesque Patterns */
.arabesque {
    position: fixed;
    width: 200px;
    height: 200px;
    border: 3px solid #D4AF37;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
    z-index: 1;
}

.arabesque::before,
.arabesque::after {
    content: '';
    position: absolute;
    border: 3px solid #F4D03F;
    border-radius: 50%;
}

.arabesque::before {
    top: -30%;
    left: 20%;
    width: 60%;
    height: 60%;
}

.arabesque::after {
    bottom: -30%;
    right: 20%;
    width: 60%;
    height: 60%;
}

.arabesque-1 {
    top: 10%;
    left: 10%;
    animation: arabesqueFloat 25s ease-in-out infinite;
}

.arabesque-2 {
    top: 60%;
    right: 15%;
    transform: rotate(45deg);
    animation: arabesqueFloat 25s ease-in-out infinite 8s;
}

.arabesque-3 {
    bottom: 15%;
    left: 40%;
    transform: rotate(90deg);
    animation: arabesqueFloat 25s ease-in-out infinite 16s;
}

@keyframes arabesqueFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.06;
    }
    50% {
        transform: translateY(-50px) rotate(180deg);
        opacity: 0.03;
    }
}

/* Shooting Stars */
.shooting-star {
    position: fixed;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, #D4AF37, transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.star-1 { 
    top: 20%; 
    left: 10%; 
    animation: shoot 8s ease-in-out infinite;
}

.star-2 { 
    top: 40%; 
    left: 70%; 
    animation: shoot 8s ease-in-out infinite 2.6s;
}

.star-3 { 
    top: 60%; 
    left: 30%; 
    animation: shoot 8s ease-in-out infinite 5.2s;
}

@keyframes shoot {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) rotate(45deg);
    }
    10% {
        opacity: 1;
    }
    30% {
        opacity: 0;
        transform: translateY(300px) translateX(300px) rotate(45deg);
    }
    100% {
        opacity: 0;
    }
}

/* Pulsing Rings */
.pulse-ring {
    position: fixed;
    border: 2px solid #D4AF37;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    animation: pulseRing 6s ease-out infinite;
}

.ring-1 {
    width: 100px;
    height: 100px;
    top: 25%;
    left: 20%;
}

.ring-2 {
    width: 120px;
    height: 120px;
    top: 65%;
    right: 25%;
    animation-delay: 2s;
}

.ring-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Morphing Polygons */
.polygon {
    position: fixed;
    width: 100px;
    height: 100px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
    animation: morphPoly 12s ease-in-out infinite;
}

.poly-1 {
    top: 15%;
    right: 30%;
    background: #D4AF37;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.poly-2 {
    bottom: 25%;
    left: 25%;
    background: #F4D03F;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation-delay: 4s;
}

.poly-3 {
    top: 50%;
    left: 60%;
    background: #D4AF37;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation-delay: 8s;
}

@keyframes morphPoly {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.3);
    }
    50% {
        transform: rotate(180deg) scale(0.8);
    }
    75% {
        transform: rotate(270deg) scale(1.1);
    }
}

/* Sparkle Effect */
.sparkle {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #F4D03F;
    border-radius: 50%;
    box-shadow: 0 0 20px #D4AF37;
    pointer-events: none;
    z-index: 1;
    animation: sparkleAnim 4s ease-in-out infinite;
}

.sparkle-1 { top: 18%; left: 45%; }
.sparkle-2 { top: 38%; left: 85%; animation-delay: 1s; }
.sparkle-3 { top: 58%; left: 15%; animation-delay: 2s; }
.sparkle-4 { top: 78%; left: 65%; animation-delay: 3s; }
.sparkle-5 { top: 28%; right: 12%; animation-delay: 0.5s; }
.sparkle-6 { bottom: 25%; left: 55%; animation-delay: 1.5s; }

@keyframes sparkleAnim {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(2);
    }
}

/* Flowing Ribbons */
.ribbon {
    position: fixed;
    width: 3px;
    height: 200px;
    background: linear-gradient(to bottom, transparent, #D4AF37, transparent);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    animation: ribbonFlow 10s linear infinite;
}

.ribbon-1 { left: 20%; }
.ribbon-2 { left: 50%; animation-delay: 3.3s; }
.ribbon-3 { left: 80%; animation-delay: 6.6s; }

@keyframes ribbonFlow {
    0% {
        top: -200px;
        transform: translateX(0);
    }
    100% {
        top: 100%;
        transform: translateX(50px);
    }
}

/* Main Content with proper z-index */
#main.site-content {
    position: relative;
    z-index: 100;
}

/* Survey Container - Enhanced */
.nashmi-survey-container {
    position: relative !important;
    z-index: 1000 !important;
}

.nashmi-survey-wrapper {
    background: rgba(250, 249, 246, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    border-radius: 32px !important;
    box-shadow: 
        0 20px 60px rgba(26, 34, 56, 0.4),
        0 0 0 1px rgba(212, 175, 55, 0.2) !important;
    border-top: 4px solid !important;
    border-image: linear-gradient(90deg, #D4AF37, #F4D03F, #D4AF37) 1 !important;
    animation: cardFadeIn 1s ease-out !important;
    position: relative !important;
    z-index: 1001 !important;
}

.nashmi-survey-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    animation: cardGlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cardGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

/* Responsive */
@media (max-width: 768px) {
    .nashmi-survey-wrapper {
        border-radius: 24px !important;
    }
    
    .arabesque {
        width: 150px;
        height: 150px;
    }
    
    .polygon {
        width: 70px;
        height: 70px;
    }
}
