/* Theme Switcher & Background Effects */

/* Theme Switcher Button */
.theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    width: 60px;
    height: 60px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(100, 116, 139, 0.2);
    z-index: 1001;
    transition: all var(--transition-normal);
    border: none;
}

.theme-switcher:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.theme-switcher:active {
    transform: scale(0.95);
}

.theme-icon {
    font-size: 1.5rem;
    transition: all var(--transition-normal);
}

.theme-icon.sun {
    display: none;
}

body[data-theme="light"] .theme-icon.moon {
    display: none;
}

body[data-theme="light"] .theme-icon.sun {
    display: block;
}

/* Animated Background Gradient */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 25%, #3b82f6 50%, #14b8a6 75%, #1e3a8a 100%);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    opacity: 0.15;
    transition: opacity var(--transition-normal);
}

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

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

.particle {
    position: absolute;
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
    border-radius: 50%;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    top: 20%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    animation-delay: 0s;
    animation-duration: 20s;
}

.particle:nth-child(2) {
    width: 120px;
    height: 120px;
    right: 20%;
    top: 40%;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: 5s;
    animation-duration: 25s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 50%;
    top: 60%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    animation-delay: 10s;
    animation-duration: 22s;
}

.particle:nth-child(4) {
    width: 90px;
    height: 90px;
    right: 40%;
    bottom: 20%;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: 3s;
    animation-duration: 18s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-80px) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(-50px) translateX(-30px) rotate(180deg);
    }
    75% {
        transform: translateY(-100px) translateX(20px) rotate(270deg);
    }
}

/* Loading State */
.theme-transition {
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Theme Transition */
* {
    transition-property: background-color, background, color, border-color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .theme-switcher {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .theme-icon {
        font-size: 1.2rem;
    }

    .particle {
        opacity: 0.2;
    }
}
