/* --- Estilos generales --- */
body {
    background: linear-gradient(135deg, #ffc1e3, #ff80ab);
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- Contenedor principal del login --- */
.content-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem; /* Espacio extra en móviles */
}

/* --- Cuadro de login --- */
.login-card {
    position: relative;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2.5rem; /* Espacio interno */
    width: 500px; /* Ancho base */
    max-width: 100%; /* Evita desbordamiento en pantallas pequeñas */
    margin: 0 auto; /* Centra el cuadro */
    text-align: center;
}

/* --- Botones y campos de entrada --- */
.btn-primary {
    background-color: #ff4081;
    border: none;
}

.btn-primary:hover {
    background-color: #e91e63;
}

.form-control {
    border-radius: 10px;
}

.btn-error {
    animation: shake 0.5s ease;
}

.input-error {
    animation: errorGlow 0.8s ease;
}

/* --- Dino animado --- */
@keyframes moveDino {
    0% { top: -30px; left: -27px; transform: rotate(0deg); }
    25% { top: -30px; left: calc(97%); transform: rotate(90deg); }
    50% { top: calc(97%); left: calc(97%); transform: rotate(180deg); }
    75% { top: calc(97%); left: -30px; transform: rotate(270deg); }
    100% { top: -30px; left: -30px; transform: rotate(360deg); }
}

@keyframes walkDino {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-2px); }
    50% { transform: translateY(2px); }
    75% { transform: translateY(-2px); }
}

.dino-container {
    position: absolute;
    width: 40px;
    height: 40px;
    animation: moveDino 20s linear infinite;
    top: -20px;
    right: -20px;
}

.dino {
    width: 100%;
    height: 100%;
    background-image: url('multimedia/web/dinoMove.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: walkDino 1s ease infinite;
}

/* --- Encabezado con personaje y bocadillo --- */
.character-container {
    position: fixed;
    top: 30px;
    right: 5px;
    width: 200px;
    z-index: 10;
}

.character {
    width: 100%;
    height: auto;
}

.speech-bubble {
    position: absolute;
    top: -20px;
    left: -180px;
    width: 250px;
    padding: 10px;
    background: #bfe0cc;
    border-radius: 15px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    color: #333;
    text-align: center;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: #bfe0cc;
    border-left: 0;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }
    
    .speech-bubble {
        width: 200px;
        font-size: 12px;
        padding: 8px;
    }
    
    .character-container {
        width: 150px;
    }
}

@media (max-width: 576px) {
    .login-card {
        width: 90%; /* Ajusta el tamaño en móviles */
        padding: 1.5rem;
        margin-top: 50px; /* Empuja el login hacia abajo */
    }
    
    .speech-bubble {
        width: 180px;
        left: -150px;
        font-size: 12px;
    }
    
    .character-container {
        width: 120px;
    }
    
    .dino-container {
        width: 30px;
        height: 30px;
        top: -10px;
        right: -10px;
        animation: moveDino 15s linear infinite;
    }
}
