#juego-container {
    display: none;
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    border-radius: 30px;           /* un poco más pequeño */
    padding: 15px;                 /* reducido */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 100%;
    margin: 10px auto;             /* menos margen arriba/abajo */
}

#datos-usuario {
    background: #fff176;
    padding: 12px 15px;            /* reducido */
    border-radius: 22px;
    font-size: 1.45rem;            /* más pequeño */
    color: #d81b60;
    font-family: 'Chewy', cursive;
    box-shadow: 0 8px 20px rgba(255,193,7,0.4);
    margin-bottom: 12px;
    border: 5px dashed #ffeb3b;
    line-height: 1.25;             /* más compacto */
}

#juego-container > p {           /* instrucción principal */
    font-size: 1.45rem;            /* reducido */
    margin: 8px 0 6px;
    line-height: 1.3;
    color: #333;
    font-family: 'Chewy', cursive;
    text-align: center;
}

#juego-container > p small {
    font-size: 1.05rem;
    display: block;
    margin-top: 4px;
    color: #757575;
}

/* ==================== MESA ==================== */
#mesa {
    background: #fffde7;
    padding: 14px;                 /* reducido */
    border-radius: 22px;
    border: 5px dashed #ffeb3b;
    margin: 12px 0;
}

.objeto {
    width: 110px;                  /* reducido significativamente */
    height: 110px;
    cursor: pointer;
    border: 3px solid #ccc;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    background-color: white;
}

.objeto:hover {
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(0,0,0,0.25);
}

.objeto img {
    width: 100%;
    height: 100%;
    object-fit: contain;           /* mejor que cover para no cortar imágenes */
    padding: 5px;
}

/* ==================== CARTA GRANDE ==================== */
#carta-volteada {
    width: 195px;                  /* reducido */
    height: 285px;                 /* reducido */
    margin: 12px auto;
    border: 7px solid #ffeb3b;
    border-radius: 22px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(255,235,59,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s;
    overflow: hidden;
}

#carta-volteada.volteando {
    transform: rotateY(180deg);
}

#carta-volteada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#instruccion-inicial {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.9);
    font-size: 1.25rem;            /* reducido */
    font-weight: bold;
    color: #ff5722;
    text-align: center;
    border-top: 1px solid #90caf9;
    font-family: 'Chewy', cursive;
}

/* Botones */
#boton-voltear {
    background-color: #4CAF50;
    color: white;
}

#boton-voltear:hover:not(:disabled) {
    background-color: #388e3c;
}

#nueva-partida {
    background-color: #2196F3;
    color: white;
    width: 100%;
    font-size: 1.55rem;
    padding: 14px;
    margin-top: 10px;
}

#nueva-partida:hover {
    background-color: #1976d2;
}

/* Mensajes y puntuación */
#mensaje {
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 30px;
    margin: 12px 0;
    font-family: 'Chewy', cursive;
    text-align: center;
}

#mensaje.correcto {
    color: #2e7d32;
}

#mensaje.incorrecto {
    color: #d32f2f;
}

#puntuacion {
    font-size: 1.55rem;
    margin-top: 8px;
    font-family: 'Fredoka One', cursive;
    text-align: center;
}

#errores {
    font-size: 1.35rem;
    color: #d32f2f;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
}

/* Sección de tiempos */
#tiempos {
    margin-top: 18px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    background: #fffde7;
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(255,235,59,0.3);
}

#lista-tiempos p {
    margin: 4px 0;
    font-size: 1rem;
}

#promedio {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 10px;
    color: #d81b60;
}