* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 70vh;
    min-height: 400px; /* Altura mínima */
    max-height: 600px; /* Altura máxima */
}

.carousel-track {
    display: flex;
    height: 100%;
    align-items: center;
    will-change: transform;
}

.carousel-item {
    min-width: 300px;
    height: 80%;
    margin: 0 15px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    border-radius: 8px;
    outline: none; /* Para accesibilidad */
}

.carousel-item:focus {
    box-shadow: 0 0 0 3px #ff0000; /* Indicador de foco */
}

.carousel-item:hover {
    transform: scale(1.03);
}

.carousel-item.flipped {
    transform: rotateY(180deg);
}

.carousel-item-front, 
.carousel-item-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.carousel-item-front {
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Cambiado a columna para apilar elementos */
    justify-content: flex-end; /* Alinea el contenido al final (inferior) */
    align-items: center; /* Centra horizontalmente el título */
}

.carousel-item-front::after {
    content: "Imagen no encontrada";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 0.9rem;
    display: none;
}

.carousel-item-back {
    background: white;
    transform: rotateY(180deg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-item-title {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    z-index: 2; /* Asegura que el título esté por encima de la imagen */
}

.carousel-item-info {
    overflow-y: auto;
    height: 100%;
}

.carousel-item-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.carousel-item-info p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.controls {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

#decreaseSpeedBtn{
    background: #c20101cc;
    color: white;
    border: none;
    margin: 0;
    width: 35px; 
    height: 35px;
    cursor: pointer;
    font-size: 1.5em; 
    transition: all 0.3s ease;
    border-top-left-radius: 50%;
    border-bottom-left-radius: 50%;
}

#decreaseSpeedBtn:hover {
    background: #c90303;
    transform: translateY(-2px);
}


#pauseBtn {
    background: #2c3e50;
    color: white;
    border: none;
    margin: 0;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    height: 35px;
}

#pauseBtn:hover {
    background: #34495e;
    transform: translateY(-2px);
}

#increaseSpeedBtn{
    background: #c20101cc;
    color: white;
    border: none;
    margin: 0;
    width: 35px; 
    height: 35px;
    cursor: pointer;
    font-size: 1.5em; 
    transition: all 0.3s ease;
    border-top-right-radius: 50%;
    border-bottom-right-radius: 50%;
}

#increaseSpeedBtn:hover {
    background: #c90303;
    transform: translateY(-2px);
}


/* Añade esto a tu archivo styles.css */
.carousel-speed-display {
    margin-left: 20px; 
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
    min-width: 60px;
    text-align: center;
}

/* Ajusta el layout de los controles para que se vea bien con el nuevo campo */
.carousel-controles {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding-bottom: 20px; 
}

/* Insignias de reino */
.reino-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Colores para cada reino */
.badge-animalia { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.badge-plantae { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.badge-fungi { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.badge-protista { background: linear-gradient(135deg, #3498db, #2980b9); }
.badge-monera { background: linear-gradient(135deg, #f39c12, #d35400); }

/* Colores de texto para cada reino */
.animalia-text { color: #e74c3c; }
.plantae-text { color: #2ecc71; }
.fungi-text { color: #9b59b6; }
.protista-text { color: #3498db; }
.monera-text { color: #f39c12; }

/* Responsive design */
@media (max-width: 768px) {
    .carousel-container {
        height: 50vh;
        min-height: 300px;
    }
    
    .carousel-item {
        min-width: 250px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        min-width: 200px;
        margin: 0 10px;
    }
    
    .carousel-item-title {
        font-size: 1rem;
        padding: 10px;
    }
}

