* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #2c3e50; /* Fundo escuro para destacar as cores */
    color: #ecf0f1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    overscroll-behavior: none; /* Previne efeito elástico no mobile */
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 10px 20px;
    border-radius: 10px;
}

.level-info {
    font-weight: bold;
    font-size: 18px;
}

.buttons {
    display: flex;
    gap: 10px;
}

button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s;
}

button:active { transform: scale(0.95); }
button.btn-help { background: #f1c40f; color: #333; }
button#next-btn { background: #2ecc71; }

/* ÁREA DO JOGO */
.game-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    background: #34495e;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    /* OBRIGATÓRIO PARA NÃO ROLAR A TELA */
    touch-action: none; 
}

/* Modais */
.modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.modal-overlay.show, .modal-overlay.show-start {
    display: flex;
}

.modal-content {
    background: white;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
}

.modal-content ul {
    text-align: left;
    margin: 15px 0 15px 20px;
    font-size: 14px;
}

.hide { display: none !important; }

/* AdSense */
.adsense-container {
    margin-top: 20px;
    width: 100%;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 400px) {
    .game-wrapper {
        width: 300px;
        height: 300px;
    }
    h1 { font-size: 28px; }
}