body {
    background: #111;
    color: white;
    font-family: Arial;
    text-align: center;
}
.contenedor {
    margin-top: 20px;
    padding: 0 10px;
}

/* ── Formulario de nombres ── */
.nombres-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.nombre-campo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 300px;
}
.nombre-campo label {
    font-size: 15px;
    color: cyan;
}
.nombre-campo input {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    background: #222;
    border: 2px solid cyan;
    color: white;
    text-align: center;
    box-sizing: border-box;
}
.nombre-campo input::placeholder {
    color: #888;
}
.nombre-campo input:focus {
    outline: none;
    background: #333;
}

/* ── VS Máquina ── */
.vs-maquina {
    font-size: 16px;
    color: #888;
    margin: 0;
    letter-spacing: 2px;
}
.vs-maquina span {
    color: cyan;
    font-weight: bold;
}

/* ── Zona de juego ── */
.oculto {
    display: none;
}
.info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.marcador {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.marcador > div {
    min-width: 120px;
}
.tablero {
    width: 330px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 10px;
}
.celda {
    width: 100px;
    height: 100px;
    background: #222;
    border: 2px solid cyan;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    cursor: pointer;
}
.celda:hover {
    background: #333;
}
button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    background: #222;
    color: white;
    border: 2px solid cyan;
}
button:hover {
    background: #333;
}
.botones {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.botones button {
    margin-top: 20px;
}

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }
    h2 {
        font-size: 16px;
    }
    h3 {
        font-size: 15px;
    }
    p {
        font-size: 13px;
    }
    .tablero {
        width: 270px;
        grid-template-columns: repeat(3, 82px);
        gap: 8px;
    }
    .celda {
        width: 82px;
        height: 82px;
        font-size: 38px;
    }
    .nombre-campo input {
        font-size: 14px;
        padding: 8px 10px;
    }
    button {
        font-size: 15px;
        padding: 9px 16px;
    }
    .marcador {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    .info {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 360px) {
    .tablero {
        width: 240px;
        grid-template-columns: repeat(3, 72px);
        gap: 6px;
    }
    .celda {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}