body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    text-align: center;
    padding: 40px 15px 0;
}

.contenedor {
    background: white;
    max-width: 600px;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
}

.consigna {
    color: #555;
    font-size: 0.95em;
}

button {
    margin-top: 15px;
    padding: 10px 20px;
    cursor: pointer;
}

.estadisticas p {
    display: inline-block;
    margin: 4px 10px;
    font-weight: bold;
    color: #555;
}

/* Tiempo */
#tiempo {
    margin: 10px 0 4px;
    font-weight: bold;
    color: #555;
}

.barra {
    max-width: 480px;
    height: 10px;
    margin: 0 auto 15px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#barraTiempo {
    width: 100%;
    height: 100%;
    background: #2ecc71;
    transition: width 0.1s linear;
}

/* Cancha */
.campo {
    max-width: 480px;
    margin: 0 auto;
    padding: 22px 10px 0;
    border-radius: 10px;
    background: linear-gradient(#2e8b57, #237a49);
}

/* Arco con red */
.arco {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 7px solid #fff;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 14px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 14px),
        rgba(0, 0, 0, 0.25);
}

/* Arquero (queda detrás de los botones, que son semitransparentes) */
#arquero {
    position: absolute;
    left: 50%;
    top: 62%;
    width: 17%;
    transform: translate(-50%, -50%);
    transition: left 0.4s ease, top 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

#arquero svg {
    display: block;
    width: 100%;
}

/* Los 9 tiros */
#tiros {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    z-index: 2;
}

.tiro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.7);
    border-radius: 6px;
}

.tiro:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
}

.tiro:disabled {
    cursor: default;
}

.op {
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-weight: bold;
    font-size: clamp(12px, 3.4vw, 18px);
    white-space: nowrap;
}

.res {
    display: none;
    padding: 1px 6px;
    border-radius: 6px;
    background: #fff;
    font-weight: bold;
    font-size: clamp(11px, 3vw, 15px);
}

.revelado .res {
    display: inline-block;
}

.tiro.gol {
    background: rgba(46, 204, 113, 0.4);
}

.tiro.ataja {
    background: rgba(231, 76, 60, 0.4);
}

.tiro.gol .res {
    color: #1e8449;
}

.tiro.ataja .res {
    color: #c0392b;
}

.tiro.elegido {
    outline: 3px solid #f1c40f;
}

/* Zona del penal y pelota */
.area {
    position: relative;
    height: 80px;
    border-top: 4px solid #fff;
}

#pelota {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: -0.6em 0 0 -0.6em;
    font-size: 2em;
    line-height: 1;
    transition: transform 0.55s ease-out;
    z-index: 3;
}

#mensaje {
    min-height: 3em;
    font-weight: bold;
}
