* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cyan: #00d4ff;
    --green: #7ed957;
    --dark: #0a0e1a;
    --dark-card: #1a1f35;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fondo degradado oscuro con animación */
.login-page {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 50%, #0f1624 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Efectos de luz de fondo */
.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: glow1 6s ease-in-out infinite alternate;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(126, 217, 87, 0.12) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: glow2 8s ease-in-out infinite alternate;
}

@keyframes glow1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    100% { transform: translate(-50px, 50px) scale(1.2); opacity: 0.5; }
}

@keyframes glow2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    100% { transform: translate(50px, -30px) scale(1.15); opacity: 0.5; }
}

/* Contenedor principal - Diseño glassmorphism */
.container {
    padding: 30px 25px;
    max-width: 480px;
    width: 100%;
    background: rgba(26, 31, 53, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(0, 212, 255, 0.1),
        inset 0 0 80px rgba(0, 212, 255, 0.03);
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Borde brillante animado */
.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--cyan), var(--green), var(--cyan), var(--green));
    border-radius: 30px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
}

.container:hover::before {
    opacity: 0.6;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.center-block {
    margin-bottom: 35px;
}

.center-block img {
    max-width: 65%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

form {
    max-width: 100%;
    margin: auto;
}

/* Labels modernos */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: #a8b3cf;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Inputs con diseño futurista */
.form-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1em;
    background: rgba(15, 20, 36, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

.form-group input::placeholder {
    color: rgba(168, 179, 207, 0.5);
}

.form-group input:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(15, 20, 36, 0.8);
}

.form-group input:focus {
    border-color: var(--cyan);
    background: rgba(15, 20, 36, 0.9);
    box-shadow: 
        0 0 0 4px rgba(0, 212, 255, 0.1),
        0 8px 24px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

/* Botón con gradiente brillante */
.btn {
    width: 100%;
    padding: 18px;
    margin-top: 15px;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--green) 100%);
    color: var(--dark);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 30px rgba(0, 212, 255, 0.3),
        0 0 40px rgba(126, 217, 87, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(0, 212, 255, 0.5),
        0 0 60px rgba(126, 217, 87, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

/* Mensaje de error moderno */
.error-message {
    margin-top: 25px;
    padding: 15px 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    border-radius: 12px;
    color: #fca5a5;
    font-size: 0.95em;
    font-weight: 500;
    animation: shake 0.4s ease-in-out;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .container {
        padding: 40px 30px;
        border-radius: 25px;
    }

    .center-block img {
        max-width: 75%;
    }

    .form-group label {
        font-size: 0.85em;
    }

    .form-group input {
        padding: 14px 18px;
        font-size: 0.95em;
    }

    .btn {
        padding: 16px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 15px;
    }

    .container {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .center-block {
        margin-bottom: 30px;
    }

    .center-block img {
        max-width: 80%;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.8em;
        margin-bottom: 8px;
    }

    .form-group input {
        padding: 13px 16px;
        font-size: 0.9em;
    }

    .btn {
        padding: 15px;
        font-size: 0.95em;
        letter-spacing: 1.5px;
    }

    /* Reducir efectos de fondo en móviles */
    .login-page::before,
    .login-page::after {
        opacity: 0.5;
    }
}

/* Accesibilidad - reducir animaciones */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}