/* css/login.css - Diseño con Imagen de Fondo y Glassmorphism */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ============================================
   FONDO CON IMAGEN
   ============================================ */

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/Fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* ============================================
   CONTENEDOR DE LOGIN
   ============================================ */

.login-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 2;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   CAJA DE LOGIN CON GLASSMORPHISM
   ============================================ */

.login-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 50px 45px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

/* Borde superior con gradiente */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #22c55e, #fbbf24, #f472b6, #8b5cf6);
    background-size: 200% 100%;
    animation: borderSlide 3s ease infinite;
}

@keyframes borderSlide {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   LOGO
   ============================================ */

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    animation: bounceIn 0.8s ease-out 0.2s backwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.logo-image {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* ============================================
   HEADER
   ============================================ */

.login-header {
    text-align: center;
    margin-bottom: 38px;
    animation: slideDown 0.6s ease-out 0.3s backwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header h1 {
    font-size: 32px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.login-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   FORMULARIO
   ============================================ */

.form-group {
    margin-bottom: 26px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.4s;
}

.form-group:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.label-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    font-weight: 500;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2),
                0 8px 25px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.form-group input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.22);
}

/* ============================================
   BOTÓN DE LOGIN
   ============================================ */

.btn-login {
    width: 100%;
    padding: 17px 32px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.5);
    animation: fadeIn 0.6s ease-out 0.6s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 400px;
    height: 400px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.6);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(5px);
}

/* ============================================
   FOOTER
   ============================================ */

.login-footer {
    margin-top: 32px;
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.7s backwards;
}

.login-footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
    }

    .login-box {
        padding: 40px 30px;
        border-radius: 20px;
    }

    .logo-image {
        max-width: 150px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .login-header p {
        font-size: 14px;
    }

    .form-group input {
        padding: 14px 18px;
        font-size: 14px;
    }

    .btn-login {
        padding: 15px 28px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .login-box {
        padding: 35px 25px;
    }

    .logo-image {
        max-width: 130px;
    }

    .login-header h1 {
        font-size: 24px;
    }
}