/* Main Stylesheet for Unity WebGL Games */

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    background-color: #121212;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* Unity Container */
#unity-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    background: #222;
}

/* Loading Screen */
#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    z-index: 1000;
}

#unity-loading-bar {
    width: 80%;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Logo */
#unity-logo {
    margin-bottom: 30px;
    text-align: center;
}

#logo-img {
    width: 256px;
    height: 256px;
    border-radius: 20px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Progress Bar */
#unity-progress-bar-empty {
    width: 100%;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease-out;
    border-radius: 10px;
}

/* Spinner Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    #logo-img {
        width: 256px;
        height: 256px;
    }
    
    #unity-loading-bar {
        width: 90%;
    }
}

@media (max-width: 480px) {
    #logo-img {
        width: 256px;
        height: 256px;
    }
    
    #unity-progress-bar-empty {
        height: 16px;
    }
    
    .spinner {
        width: 32px;
        height: 32px;
    }
}