/* ========================================
   THEME TOGGLE - DARK/LIGHT MODE
   Bottom Left Fixed Button
   ======================================== */

/* Theme Toggle Button Container */
.theme-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.theme-toggle-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6);
}

.theme-toggle-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Icon Container */
.theme-icon {
    position: relative;
    width: 28px;
    height: 28px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sun Icon */
.sun-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #fbbf24;
    font-size: 28px;
    opacity: 1;
    transform: rotate(0deg) scale(1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Moon Icon */
.moon-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #e0e7ff;
    font-size: 28px;
    opacity: 0;
    transform: rotate(180deg) scale(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Active State */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Tooltip */
.theme-toggle-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 75px;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.theme-toggle-btn:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Ripple Effect */
.theme-toggle-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.theme-toggle-btn:active::after {
    width: 100px;
    height: 100px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }
    
    .theme-icon {
        width: 24px;
        height: 24px;
    }
    
    .sun-icon,
    .moon-icon {
        font-size: 24px;
    }
    
    .theme-toggle-btn::before {
        display: none;
    }
}

/* Animation on Page Load */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.theme-toggle-btn {
    animation: slideInLeft 0.6s ease 0.5s both;
}

/* Pulse Animation for Attention */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.7);
    }
}

.theme-toggle-btn.pulse {
    animation: pulse 2s ease-in-out infinite;
}
