/* ===============================================
   ENHANCED VISUAL THEME - Perfect Vibe System
   Beautiful backgrounds with dynamic effects
   =============================================== */

/* CSS Art Background - University/Campus Theme */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: 
        /* Campus buildings silhouette */
        linear-gradient(to bottom, transparent 60%, rgba(59, 130, 246, 0.1) 60%, rgba(59, 130, 246, 0.2) 80%, rgba(30, 41, 59, 0.1) 100%),
        /* Sky gradient */
        linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%),
        /* Pattern overlay */
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    background-size: 100% 100%, 400% 400%, 100% 100%, 100% 100%, 100% 100%;
    animation: gradientShift 20s ease infinite;
}

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

/* Geometric Patterns */
.geometric-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.03;
    background-image: 
        /* Hexagon pattern */
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 10l15 8.66v17.32L30 44.64 15 35.98V18.66z' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E"),
        /* Grid pattern */
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 60px 60px, 20px 20px, 20px 20px;
    background-position: 0 0, 0 0, 0 0;
    animation: patternMove 30s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

[data-theme="dark"] .geometric-overlay {
    opacity: 0.02;
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-book,
.floating-graduation,
.floating-building {
    position: absolute;
    opacity: 0.1;
    animation: floatUp 25s infinite linear;
}

.floating-book {
    width: 40px;
    height: 30px;
    background: linear-gradient(45deg, var(--primary-400), var(--primary-600));
    border-radius: 4px;
    left: 15%;
    animation-delay: 0s;
}

.floating-graduation {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--purple-400), var(--purple-600));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    left: 70%;
    animation-delay: 8s;
}

.floating-building {
    width: 60px;
    height: 80px;
    background: linear-gradient(to bottom, var(--primary-300), var(--primary-500));
    border-radius: 4px 4px 0 0;
    left: 45%;
    animation-delay: 15s;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    5% {
        opacity: 0.1;
    }
    95% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* Enhanced Glass Morphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-effect {
    background: rgba(30, 41, 59, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Interactive Light Effects */
.light-effect {
    position: relative;
    overflow: hidden;
}

.light-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent,
        rgba(139, 92, 246, 0.1),
        transparent
    );
    animation: rotate 10s linear infinite;
    z-index: -1;
}

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

/* Particle System */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.6), transparent);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

.particle:nth-child(odd) {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.6), transparent);
    animation-duration: 20s;
}

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

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

/* Enhanced Card Effects */
.enhanced-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

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

.enhanced-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

[data-theme="dark"] .enhanced-card {
    background: rgba(30, 41, 59, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Stunning Button Effects */
.stunning-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stunning-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.6s ease;
}

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

.stunning-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.6),
        0 0 20px rgba(118, 75, 162, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.stunning-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Modal with Perfect Background */
.perfect-modal {
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.perfect-modal-content {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .perfect-modal-content {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Navigation Enhancement */
.perfect-navbar {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .perfect-navbar {
    background: rgba(30, 41, 59, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Section Backgrounds */
.perfect-section {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .perfect-section {
    background: rgba(30, 41, 59, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dynamic-background {
        background-size: 100% 100%, 200% 200%, 100% 100%, 100% 100%, 100% 100%;
    }
    
    .particles {
        display: none;
    }
    
    .floating-elements {
        display: none;
    }
    
    .geometric-overlay {
        opacity: 0.02;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .dynamic-background,
    .geometric-overlay,
    .particles,
    .floating-elements,
    .light-effect::before {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .dynamic-background,
    .geometric-overlay,
    .particles,
    .floating-elements {
        display: none;
    }
}