/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url("{{ url_for('static', filename='images/background.jpg') }}") no-repeat center center/cover;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    /* height: 100vh; */ /* Eliminar esta línea */
    margin: 0;
    overflow: auto; /* Cambiar de hidden a auto */
    position: relative;
    min-height: 100vh; /* Asegurar que el body ocupe al menos la altura completa */
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Oscurece la imagen */
    z-index: 0;
}

.login-page {
    position: relative;
    z-index: 1; /* Trae el contenedor principal al frente */
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 1200px;
    /* height: 600px; */ /* Eliminar esta línea */
    background-color: rgba(20, 24, 36, 0.85); /* Fondo semi-transparente */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    flex-wrap: wrap; /* Permite que los elementos se ajusten en filas en pantallas pequeñas */
    padding: 20px; /* Agregar padding para evitar que el contenido se pegue a los bordes */
}

/* Panel Izquierdo */
.left-panel {
    flex: 1 1 100%; /* Permite que el panel se ajuste en pantallas pequeñas */
    background: url("{{ url_for('static', filename='images/background.jpg') }}") no-repeat center center/cover;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centrar horizontalmente */
    padding: 20px;
    text-align: center;
    position: relative;
    max-width: 100%; /* Evita que exceda el ancho del contenedor */
}

.left-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.left-panel h1, .left-panel p {
    position: relative;
    z-index: 1; /* Trae el texto al frente */
}

.left-panel h1 {
    font-size: 3em;
    color: #1db954;
    margin-bottom: 20px;
}

.left-panel p {
    font-size: 1em;
    color: #ccc;
    line-height: 1.5;
}

/* Panel Derecho */
.right-panel {
    flex: 1 1 100%; /* Permite que el panel se ajuste en pantallas pequeñas */
    background: #1f1f2f;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    max-width: 100%; /* Evita que exceda el ancho del contenedor */
}

.login-container {
    background: #141824;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 350px;
}

.login-container h2 {
    color: #1db954;
    font-size: 1.8em;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    text-align: left;
    color: #ccc;
    font-size: 0.9em;
}

input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    background: #29293d;
    border: 1px solid #333;
    border-radius: 5px;
    color: #fff;
    outline: none;
}

input:focus {
    border-color: #1db954;
    box-shadow: 0 0 5px #1db954;
}

.login-button {
    width: 100%;
    padding: 10px;
    background-color: #1db954;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-button:hover {
    background-color: #17a74a;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    color: #1db954;
    margin: 0 10px;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #17a74a;
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px; /* Espacio bajo el logo */
}

.logo {
    width: 120px; /* Tamaño del logo */
    height: auto;
    border-radius: 50%; /* Redondeado */
    background-color: rgba(255, 255, 255, 0.1); /* Fondo con transparencia */
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Sombra suave */
    animation: fadeIn 1.2s ease-in-out; /* Animación */
}

/* Animación del Logo */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Media Queries para Responsividad */

/* Dispositivos con ancho máximo de 768px (Tabletas y móviles grandes) */
@media (max-width: 768px) {
    .login-page {
        flex-direction: column;
        /* height: auto; */ /* Ya eliminado */
    }

    .left-panel, .right-panel {
        flex: 1 1 100%;
        width: 100%;
        height: auto;
    }

    .left-panel h1 {
        font-size: 2.5em;
    }

    .left-panel p {
        font-size: 1em;
    }

    .login-container {
        padding: 30px;
    }
}

/* Dispositivos con ancho máximo de 480px (Móviles) */
@media (max-width: 480px) {
    .left-panel h1 {
        font-size: 2em;
    }

    .left-panel p {
        font-size: 0.9em;
    }

    .login-container {
        padding: 20px;
    }

    .login-container h2 {
        font-size: 1.5em;
    }

    .logo {
        width: 100px;
    }
}
