/* Estilos del Truco Argentino */
#truco-juego-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #1a5f23 0%, #0d3b1c 100%);
    border-radius: 15px;
    color: white;
    font-family: Arial, sans-serif;
}

h1 {
    text-align: center;
    color: #FFD700;
    margin-bottom: 5px;
}

.subtitulo {
    text-align: center;
    color: #90EE90;
    font-style: italic;
    margin-bottom: 30px;
}

/* Marcador */
.marcador {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #2E8B57;
}

.jugador-info, .cpu-info {
    text-align: center;
    flex: 1;
}

.jugador-info h3, .cpu-info h3 {
    margin: 0 0 10px 0;
    color: #FFD700;
}

.puntos {
    font-size: 3em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.jugador-info .puntos {
    background: rgba(76, 175, 80, 0.2);
    border: 3px solid #4CAF50;
    color: #4CAF50;
}

.cpu-info .puntos {
    background: rgba(244, 67, 54, 0.2);
    border: 3px solid #F44336;
    color: #F44336;
}

.partida-info {
    flex: 2;
    text-align: center;
}

.partida-info div {
    margin: 5px 0;
    font-size: 1.2em;
}

/* Secciones de cartas */
.seccion-cpu, .seccion-jugador {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.seccion-cpu h3, .seccion-jugador h3 {
    margin-top: 0;
    color: #FFD700;
    text-align: center;
}

/* Contenedores de cartas */
.cartas-cpu, .cartas-jugador {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    min-height: 180px;
}

/* Estilos de cartas */
.carta-jugador, .carta-cpu {
    width: 120px;
    height: 180px;
    border-radius: 10px;
    border: 3px solid #333;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

.carta-jugador {
    background: white;
    cursor: pointer;
}

.carta-jugador:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.carta-cpu {
    background: linear-gradient(45deg, #8b0000, #ff0000);
    border-color: #FFD700;
}

.carta-jugador img, .carta-mesa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carta-boca-abajo {
    font-size: 4em;
    color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carta-info {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    color: #333;
}

/* Fallback para cuando no hay imagen */
.carta-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
}

.carta-fallback .numero {
    font-size: 3em;
    font-weight: bold;
}

.carta-fallback .palo {
    font-size: 2.5em;
    margin-top: 10px;
}

/* Mesa */
.mesa {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    min-height: 200px;
}

.carta-mesa {
    width: 140px;
    height: 200px;
    border-radius: 12px;
    border: 4px solid;
    display: none;
    overflow: hidden;
}

#carta-jugador-mesa {
    border-color: #4CAF50;
}

#carta-cpu-mesa {
    border-color: #F44336;
}

.vs {
    font-size: 2em;
    font-weight: bold;
    color: #FFD700;
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
}

.resultado {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    padding: 15px;
    margin: 20px 0;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

/* Botones */
.botones {
    text-align: center;
    margin-top: 20px;
}

.botones button {
    padding: 12px 25px;
    margin: 0 10px;
    border: none;
    border-radius: 8px;
    background: #FF6B6B;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.botones button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Historial */
.historial {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.historial h3 {
    margin-top: 0;
    color: #FFD700;
}

#historial-juego {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.historial-item {
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    border-left: 3px solid #FFD700;
}

/* Estado CPU */
.estado-cpu {
    text-align: center;
    font-style: italic;
    color: #90EE90;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .marcador {
        flex-direction: column;
        gap: 15px;
    }
    
    .cartas-cpu, .cartas-jugador {
        flex-wrap: wrap;
    }
    
    .carta-jugador, .carta-cpu {
        width: 100px;
        height: 150px;
    }
    
    .mesa {
        flex-direction: column;
        gap: 20px;
    }
    
    .botones button {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
    }
}