/* Magic UI Effects & Custom Styles */

/* Spotlight Effect */
.spotlight {
    position: relative;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
                rgba(59, 130, 246, 0.15) 0%, 
                rgba(59, 130, 246, 0.05) 25%, 
                transparent 50%);
    transition: all 0.3s ease;
}

.spotlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
                rgba(255, 255, 255, 0.1) 0%, 
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    pointer-events: none;
}

.spotlight:hover::before {
    opacity: 1;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-dark {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Blur */
.gradient-blur {
    position: relative;
}

.gradient-blur::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
                rgba(59, 130, 246, 0.3), 
                rgba(147, 51, 234, 0.3), 
                rgba(236, 72, 153, 0.3));
    filter: blur(50px);
    opacity: 0.5;
    z-index: -1;
    animation: rotate 20s linear infinite;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.shimmer:hover::before {
    transform: translateX(100%);
}

/* Tilt Effect */
.tilt {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.05);
}

/* Hero Gradient Background */
.hero-gradient {
    background: linear-gradient(
        135deg,
        rgba(240, 249, 255, 0.9) 0%,
        rgba(224, 242, 254, 0.9) 25%,
        rgba(186, 230, 253, 0.9) 50%,
        rgba(147, 197, 253, 0.9) 75%,
        rgba(96, 165, 250, 0.9) 100%
    );
    position: relative;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.05"/><circle cx="50" cy="50" r="0.5" fill="%23000" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button Glow Effect */
.btn-glow {
    position: relative;
    transition: all 0.3s ease;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(10px);
}

.btn-glow:hover::before {
    opacity: 0.7;
}

/* Loading Animation */
.loading-dots {
    display: inline-flex;
    align-items: center;
}

.loading-dots::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: loading-dots 1.5s infinite;
}

/* Marquee Animation */
.marquee {
    display: flex;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

/* Animations */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes loading-dots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .tilt:hover {
        transform: none;
    }
    
    .card-hover:hover {
        transform: translateY(-4px);
    }
    
    .shimmer::before {
        display: none;
    }
}

/* Focus Styles for Accessibility */
.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating Elements */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation:nth-child(2) {
    animation-delay: 2s;
}

.float-animation:nth-child(3) {
    animation-delay: 4s;
}

/* Enhanced Form Styles */
.form-floating {
    position: relative;
}

.form-floating input:focus + label,
.form-floating input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.8);
    color: #3b82f6;
}

.form-floating label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    transition: all 0.2s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.5rem;
}

/* Success/Error States */
.success-glow {
    animation: pulse-glow-green 2s infinite;
}

.error-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse-glow-green {
    0%, 100% { box-shadow: 0 0 5px rgba(34, 197, 94, 0.5); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.8); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass, .glass-dark {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}