/**
 * Mouse Chaser Game Styles
 * Optimized for performance and visual appeal
 */

/* Base container styles */
.mouse-chaser-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

/* Bubble element styles */
.mouse-chaser-bubble {
    position: absolute;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    cursor: pointer;
    pointer-events: auto;
    
    /* Performance optimizations */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    
    /* Subtle glow animation */
    animation: bubbleGlow 4s ease-in-out infinite alternate;
}

@keyframes bubbleGlow {
    0% {
        box-shadow: 
            0 8px 32px rgba(150, 156, 255, 0.2),
            inset 0 2px 8px rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 
            0 12px 40px rgba(150, 156, 255, 0.4),
            inset 0 2px 8px rgba(255, 255, 255, 0.3);
    }
}

/* Hover effects for bubble */
.mouse-chaser-bubble:hover {
    transform: scale(1.1) !important;
    filter: brightness(1.2) saturate(1.2) !important;
}

/* Toggle button styles */
.mouse-chaser-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(150, 156, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Subtle border */
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Shadow for depth */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mouse-chaser-toggle:hover {
    background: rgba(150, 156, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mouse-chaser-toggle:active {
    transform: scale(0.95);
}

.mouse-chaser-toggle:focus {
    outline: 2px solid rgba(150, 156, 255, 0.6);
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mouse-chaser-bubble {
        /* Slightly smaller on mobile for better UX */
        width: 30px !important;
        height: 30px !important;
    }
    
    .mouse-chaser-toggle {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .mouse-chaser-bubble {
        width: 25px !important;
        height: 25px !important;
    }
    
    .mouse-chaser-toggle {
        bottom: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mouse-chaser-bubble {
        border: 3px solid currentColor;
        background: rgba(150, 156, 255, 0.9) !important;
    }
    
    .mouse-chaser-toggle {
        border: 2px solid currentColor;
        background: rgba(150, 156, 255, 0.9);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mouse-chaser-bubble {
        animation: none;
        transition: none;
    }
    
    .mouse-chaser-toggle {
        transition: none;
    }
    
    /* Hide the game entirely for users who prefer no motion */
    .mouse-chaser-container {
        display: none;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .mouse-chaser-toggle {
        background: rgba(150, 156, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .mouse-chaser-toggle:hover {
        background: rgba(150, 156, 255, 0.5);
    }
}

/* Print styles - hide game elements */
@media print {
    .mouse-chaser-container,
    .mouse-chaser-toggle {
        display: none !important;
    }
}

/* Performance optimizations for older browsers */
.mouse-chaser-bubble,
.mouse-chaser-toggle {
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    
    /* Optimize repaints */
    will-change: transform, opacity;
    
    /* Smooth animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility improvements */
.mouse-chaser-toggle[aria-pressed="true"] {
    background: rgba(150, 156, 255, 0.6);
}

/* Focus indicators for keyboard navigation */
.mouse-chaser-bubble:focus,
.mouse-chaser-toggle:focus {
    outline: 2px solid rgba(150, 156, 255, 0.8);
    outline-offset: 3px;
}

/* Loading state */
.mouse-chaser-loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}