* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-image: url("../assets/images/wpp3.png?v=20241220-5");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.game-container {
    width: 100% !important;
    max-width: 470px !important; /* Limitação lateral no desktop */
    height: 100vh !important; /* Altura total da tela */
    background: #fff !important;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    margin: 0 auto !important; /* Centraliza no desktop */
}

/* 🟢 Desktop: força largura específica */
@media (min-width: 769px) {
    body .game-container {
        width: 470px !important;
        max-width: 470px !important;
        min-width: 470px !important;
    }
}

/* Força largura em qualquer tela maior que 470px */
@media (min-width: 471px) {
    body .game-container {
        width: 470px !important;
        max-width: 470px !important;
        min-width: 470px !important;
    }
}

/* 🟢 Mobile: ocupa 100% sem restrições */
@media (max-width: 768px) {
    .game-container {
        max-width: none !important; /* remove a limitação */
        width: 100vw !important;    /* ocupa toda a largura */
        height: 100vh !important;   /* ocupa toda a altura */
        border-radius: 0 !important; /* geralmente remove bordas para full screen */
        box-shadow: none !important;
    }
}


.game-header {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.game-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.game-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.game-area {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0d1c3b;
}

.game-board {
    width: 100%;
    height: 300px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.game-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
}

.placeholder-text {
    color: #999;
    font-size: 18px;
    text-align: center;
    z-index: 1;
}

.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-button {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.control-button:active {
    transform: translateY(0);
}

.secondary-button {
    background: linear-gradient(45deg, #ffa726, #ff9800);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    margin: 0 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Responsividade para telas muito pequenas */
@media (max-height: 600px) {
    .game-container {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .game-header {
        border-radius: 0;
    }
}

/* Animações */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

        .pulse {
            animation: pulse 0.5s ease-in-out;
        }

        /* Efeito de balanço quando colidindo */
        .bouncing {
            animation: bounce 2s ease-in-out;
        }

        @keyframes bounce {
            0% { transform: scale(1) translateY(0px); }
            10% { transform: scale(1) translateY(-5px); }
            20% { transform: scale(1.05) translateY(5px); }
            30% { transform: scale(1) translateY(-3px); }
            40% { transform: scale(1.02) translateY(3px); }
            50% { transform: scale(1) translateY(-2px); }
            60% { transform: scale(1.01) translateY(2px); }
            70% { transform: scale(1) translateY(-1px); }
            80% { transform: scale(1.005) translateY(1px); }
            100% { transform: scale(1) translateY(0px); }
        }

        /* Estilos do Modal de Autenticação */
        .auth-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .auth-modal.show {
            display: flex;
        }

        .auth-container {
            background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
            border-radius: 15px;
            padding: 30px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .auth-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .auth-header h2 {
            color: #fff;
            font-size: 24px;
            font-weight: 600;
        }

        .auth-close {
            background: none;
            border: none;
            color: #fff;
            font-size: 24px;
            cursor: pointer;
            padding: 5px;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .auth-close:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .auth-tabs {
            display: flex;
            margin-bottom: 25px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 4px;
        }

        .auth-tab {
            flex: 1;
            background: none;
            border: none;
            color: #fff;
            padding: 12px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .auth-tab.active {
            background: linear-gradient(45deg, #4CAF50, #45a049);
            color: #fff;
        }

        .auth-tab:hover:not(.active) {
            background: rgba(255, 255, 255, 0.1);
        }

        .auth-form {
            display: none;
        }

        .auth-form.active {
            display: block;
        }

        .auth-field {
            margin-bottom: 20px;
        }

        .auth-field label {
            display: block;
            color: #fff;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .auth-field input {
            width: 100%;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        .auth-field input:focus {
            outline: none;
            border-color: #4CAF50;
            background: rgba(255, 255, 255, 0.1);
        }

        .auth-field input::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .auth-submit {
            width: 100%;
            padding: 15px;
            background: linear-gradient(45deg, #4CAF50, #45a049);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .auth-submit:hover {
            background: linear-gradient(45deg, #45a049, #4CAF50);
            transform: translateY(-2px);
        }

        .auth-submit:active {
            transform: translateY(0);
        }

        .auth-message {
            margin-top: 15px;
            padding: 10px;
            border-radius: 6px;
            text-align: center;
            font-weight: 500;
        }

        .auth-message.success {
            background: rgba(76, 175, 80, 0.2);
            color: #4CAF50;
            border: 1px solid rgba(76, 175, 80, 0.3);
        }

        .auth-message.error {
            background: rgba(244, 67, 54, 0.2);
            color: #f44336;
            border: 1px solid rgba(244, 67, 54, 0.3);
        }

        /* Botão de Login/Logout */
        .auth-button {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 10000; /* Z-index muito alto para garantir que fique acima de tudo */
        }

        .login-btn, .logout-btn {
            background: linear-gradient(45deg, #4CAF50, #45a049);
            color: #fff;
            border: none;
            padding: 12px 24px;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .login-btn:hover, .logout-btn:hover {
            background: linear-gradient(45deg, #45a049, #4CAF50);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
        }

        .user-info {
            display: flex !important; /* Forçar display flex quando visível */
            align-items: center;
            gap: 15px;
            background: rgba(0, 0, 0, 0.85);
            padding: 12px 18px;
            border-radius: 25px;
            backdrop-filter: blur(10px);
            border: 2px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        }

        .user-info .user-name-display {
            color: #fff;
            font-weight: 600;
            font-size: 14px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .logout-btn {
            background: linear-gradient(45deg, #f44336, #d32f2f) !important;
            box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4) !important;
            padding: 10px 20px;
            font-size: 13px;
        }

        .logout-btn:hover {
            background: linear-gradient(45deg, #d32f2f, #f44336) !important;
            box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5) !important;
            transform: translateY(-2px);
        }

        .logout-btn i {
            font-size: 14px;
        }