/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Press Start 2P", cursive;
    font-weight: 400;
}

/* ===== CORPO ===== */
body {
    background-image: url("https://picsum.photos/1920/1080?random=1");
    background-size: cover;           /* ✅ Cobre toda a tela */
    background-position: center;       /* ✅ Centraliza a imagem */
    background-repeat: no-repeat;      /* ✅ Não repete a imagem */
    background-attachment: fixed;      /* ✅ Imagem fixa ao rolar (opcional) */
    min-height: 100vh;                 /* ✅ Altura mínima da tela inteira */
    background-color: rgba(0, 0, 0, 0.4);  /* ✅ Cor escura semi-transparente */
    background-blend-mode: overlay;           /* ✅ Mistura imagem + cor */
      position: relative;             /* ✅ Para o overlay funcionar */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

/* ===== CABEÇALHO ===== */
header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#jokenpo {
    width: 120px;
    height: auto;
    border-radius: 10px;
}

/* ===== CONTAINER PRINCIPAL ===== */
.game-container {
    display: flex;
    width: 100%;
    max-width: 800px;
    max-height: 70vh;       
    gap: 15px;              
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 15px;          
    backdrop-filter: blur(10px);
    overflow: hidden;       
}

/* ===== MENU LATERAL ===== */
.menu-lateral {
    width: 150px;
    height: 100%;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
}

.menu-lateral h3 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.btn-opcao {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-opcao:hover {
    transform: translateX(10px) scale(1.05);
    background: #f0f0ff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn-opcao img {
    width: 50px;
    height: 50px;
}

.btn-opcao span {
    font-size: 0.8em;
    color: #333;
}

/* ===== ARENA DE BATALHA ===== */
.arena {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.batalha {
    display: flex;
    align-items: center;
    gap: 40px;
}

.lado-jogador, .lado-pc {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 150px;
}

.lado-jogador h4, .lado-pc h4 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1em;
}

.lado-jogador {
    border-bottom: 5px solid #4CAF50;
}

.lado-pc {
    border-bottom: 5px solid #f44336;
}

/* ===== IMAGENS DA BATALHA (ESSENCIAL!) ===== */
#img-jogador, #img-pc {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    /* Quando display: block, aparece! */
}

#escolha-jogador-texto, #escolha-pc-texto {
    color: #667eea;
    font-size: 1.2em;
    text-transform: uppercase;
}

.versus {
    font-size: 2em;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ===== PLACAR ===== */
.placar-container {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.2);
    padding: 15px 30px;
    border-radius: 15px;
}

.placar-box {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    min-width: 60px;
    text-align: center;
}

.placar-box span {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.placar-box.jogador {
    border-left: 5px solid #4CAF50;
}

.placar-box.pc {
    border-right: 5px solid #f44336;
}

.versus-placar {
    color: white;
    font-size: 1.2em;
}

/* ===== RESULTADO ===== */
#resultado {
    background: rgba(0,0,0,0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    text-align: center;
    max-width: 400px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   RESPONSIVO PARA CELULARES
   ============================================ */

@media screen and (max-width: 768px) {
    
    /* ===== CORPO ===== */
    body {
        padding: 5px;
        min-height: 100vh;
        justify-content: flex-start;  /* Começa do topo */
    }
    
    /* ===== CABEÇALHO ===== */
    header {
        margin-bottom: 5px;
    }
    
    h1 {
        font-size: 1.5em;           /* Bem menor */
        margin-bottom: 3px;
    }
    
    #jokenpo {
        width: 50px;                  /* Bem menor */
    }
    
    /* ===== CONTAINER PRINCIPAL: VERTICAL ===== */
    .game-container {
        flex-direction: column;       /* ← MUDANÇA CHAVE! */
        max-width: 100%;
        max-height: none;             /* Remove limite de altura */
        gap: 10px;
        padding: 10px;
        border-radius: 15px;
    }
    
    /* ===== MENU LATERAL: AGORA ABAIXO ===== */
    .menu-lateral {
        width: 100%;                  /* Ocupa largura total */
        height: auto;                 /* Altura automática */
        flex-direction: row;          /* ← Horizontal! */
        justify-content: center;      /* Centraliza botões */
        gap: 8px;
        padding: 10px;
        order: 3;                     /* ← Move para depois do placar */
    }
    
    .menu-lateral h3 {
        display: none;                /* Remove título para economizar espaço */
    }
    
    /* Botões menores e horizontais */
    .btn-opcao {
        flex-direction: column;
        gap: 3px;
        padding: 8px 12px;
        min-width: 70px;              /* Largura mínima */
    }
    
    .btn-opcao img {
        width: 30px;
        height: 30px;
    }
    
    .btn-opcao span {
        font-size: 0.6em;
    }
    
    /* ===== ARENA ===== */
    .arena {
        gap: 10px;
        order: 2;                     /* ← Fica no meio */
    }
    
    /* Batalha mais compacta */
    .batalha {
        gap: 20px;
    }
    
    .lado-jogador, .lado-pc {
        padding: 10px;
        min-width: 100px;
        border-radius: 12px;
    }
    
    .lado-jogador h4, .lado-pc h4 {
        font-size: 0.8em;
        margin-bottom: 8px;
    }
    
    #img-jogador, #img-pc {
        width: 50px;                  /* Imagens menores */
        height: 50px;
    }
    
    #escolha-jogador-texto, #escolha-pc-texto {
        font-size: 0.9em;
    }
    
    .versus {
        font-size: 1.2em;
    }
    
    /* ===== PLACAR ===== */
    .placar-container {
        gap: 10px;
        padding: 8px 15px;
        order: 1;                     /* ← Fica primeiro */
    }
    
    .placar-box {
        padding: 8px 15px;
        min-width: 50px;
    }
    
    .placar-box span {
        font-size: 1.5em;
    }
    
    .versus-placar {
        font-size: 0.9em;
    }
    
    /* ===== RESULTADO ===== */
    #resultado {
        order: 4;                     /* ← Fica por último */
        padding: 8px 15px;
        font-size: 0.85em;
        min-height: 35px;
        max-width: 100%;
    }
}

