/**
 * Space Shooter Styles
 * Canvas overlay and loading indicator
 */

/* Canvas container */
#space-shooter-canvas {
    display: none; /* Hidden by default, shown when game starts */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999; /* Above everything else */
    background-color: #0a0010; /* Dark purple background */
    cursor: none; /* Hide cursor during gameplay */
    margin: 0 !important;
    padding: 0 !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Loading indicator */
#space-shooter-loading {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000; /* Above canvas */
    background-color: rgba(10, 0, 16, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--text-color, #B388EE);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
}

/* Loading spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(179, 136, 238, 0.2);
    border-top-color: var(--text-color, #B388EE);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading text */
.loading-text {
    text-align: center;
    opacity: 0.8;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #space-shooter-canvas {
        /* Touch action */
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    #space-shooter-loading {
        font-size: 1rem;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #space-shooter-canvas {
        /* Pixi.js handles HiDPI automatically, but ensure no CSS scaling artifacts */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: pixelated;
    }
}

/* Fade in animation when game starts */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#space-shooter-canvas.active {
    animation: fadeIn 0.5s ease-in-out;
}

/* Easter egg trigger styling */
#easter-egg-trigger {
    cursor: pointer;
    transition: color 0.2s ease;
}

#easter-egg-trigger:hover {
    color: var(--accent-color, #D4A5FF);
}
