﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #000000;
    color: #ffffff;
}

/* ========================================
   LOADING SCREEN
   ======================================== */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-screen p {
    margin-top: 20px;
    font-size: 18px;
    color: #888888;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   SPINNER DE LOADING
   ======================================== */

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   GAME CONTAINER
   ======================================== */

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas do Phaser é inserido automaticamente aqui */
canvas {
    display: block;
    margin: 0 auto;
    image-rendering: pixelated; /* Para jogos pixel art */
    image-rendering: crisp-edges;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
    #loading-screen p {
        font-size: 16px;
    }

    .spinner {
        width: 50px;
        height: 50px;
        border-width: 5px;
    }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

.hidden {
    display: none !important;
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* ========================================
   SCROLLBAR CUSTOMIZADA
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #66bb6a;
}
