@import url('https://fonts.googleapis.com/css2?family=Playwrite+DE+Grund:wght@100..400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* Efecto de partículas en el fondo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(111, 66, 193, 0.05) 2px, transparent 2px), 
                     radial-gradient(circle, rgba(62, 0, 112, 0.03) 1px, transparent 1px);
    background-size: 30px 30px, 20px 20px;
    background-position: 0 0, 15px 15px;
    animation: particlesMovement 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particlesMovement {
    0% {
        background-position: 0 0, 15px 15px;
    }
    100% {
        background-position: 100px 100px, 115px 115px;
    }
}

.container {
    display: flex;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
}

.left-section {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
    z-index: 2;
    padding: 0 3%;
}

.left-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(111, 66, 193, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
    animation: pulseGradient 6s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes pulseGradient {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.login-frame {
    background-color: transparent;
    border-radius: 12px;
    padding: 30px;
    width: 85%;
    max-width: 400px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    backdrop-filter: blur(10px);
}

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

.login-frame h2 {
    background: linear-gradient(90deg, #3e0070, #6f42c1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    font-size: 2.8rem;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

.login-frame h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3e0070, #6f42c1);
    border-radius: 3px;
}

.login-frame p.welcome-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 300;
    animation: fadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
}

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

.input-container {
    position: relative;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.input-container:focus-within {
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.15);
}

.input-container input {
    width: 100%;
    padding: 16px 50px;
    margin: 0;
    border: none;
    border-radius: 8px;
    background-color: rgba(244, 245, 248, 0.8);
    color: #333;
    font-size: 15px;
    font-weight: 400;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-container input:focus {
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(62, 0, 112, 0.1), 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.input-container .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6f42c1;
    font-size: 18px;
    z-index: 1;
    transition: all 0.3s ease;
}

.input-container:focus-within .icon {
    color: #3e0070;
}

.password-toggle {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer;
    color: #6f42c1 !important;
    user-select: none;
    z-index: 10 !important;
    transition: all 0.2s ease;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background-color: rgba(111, 66, 193, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.password-toggle:hover {
    background-color: rgba(111, 66, 193, 0.2);
    color: #3e0070;
}

/* Estilos para el checkbox de mantener sesión */
.remember-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 5px;
    text-align: left;
    position: relative;
}

.remember-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background-color: rgba(244, 245, 248, 0.8);
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(111, 66, 193, 0.2);
}

.remember-container input[type="checkbox"]:checked {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.remember-container input[type="checkbox"]:checked::before {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.remember-container label {
    color: #555;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.remember-container label:hover {
    color: #3e0070;
}

.login-button {
    width: 100%;
    padding: 16px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6f42c1, #3e0070);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(62, 0, 112, 0.2);
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.login-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: all 0.8s ease;
    opacity: 0;
}

.login-button:hover {
    background: linear-gradient(135deg, #5933a1, #2b004f);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(62, 0, 112, 0.25);
}

.login-button:hover::after {
    left: 100%;
    opacity: 1;
}

.login-button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(62, 0, 112, 0.3);
}

.right-section {
    width: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #3e0070, #6f42c1);
    height: 100vh;
    overflow: hidden;
    box-shadow: none !important;
}

.right-section::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: -25%;
    left: -25%;
    opacity: 0.6;
    animation: pulseEffect 8s ease-in-out infinite alternate;
}

.right-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path fill="rgba(255,255,255,0.05)" d="M11 18v64h7V18h-7zm22 0v64h7V18h-7zm22 0v64h7V18h-7zm22 0v64h7V18h-7z"/><path fill="rgba(255,255,255,0.05)" d="M18 11h64v7H18v-7zm0 22h64v7H18v-7zm0 22h64v7H18v-7zm0 22h64v7H18v-7z"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

@keyframes pulseEffect {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 2s ease;
}

.carousel-image.active {
    opacity: 1;
    transform: scale(1.05);
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1.05) translate(0, 0);
    }
    50% {
        transform: scale(1.1) translate(-1%, -1%);
    }
    100% {
        transform: scale(1.05) translate(1%, 1%);
    }
}

button.prev,
button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

button.prev:hover,
button.next:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

button.prev {
    left: 0;
}

button.next {
    right: 0;
}

button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 992px) {
    .container {
        flex-direction: column;
        max-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .left-section,
    .right-section {
        width: 100%;
        max-width: 100vw;
    }
    
    .left-section {
        min-height: 100vh;
        clip-path: none;
        padding: 40px 20px;
        box-sizing: border-box;
    }
    
    .right-section {
        display: none;
    }
    
    .login-frame {
        width: 90%;
        max-width: 450px;
        padding: 30px 20px;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    body::before {
        background-size: 20px 20px, 15px 15px;
    }
}

@media (max-width: 480px) {
    .login-frame {
        width: 95%;
        padding: 25px 15px;
    }
    
    .login-frame h2 {
        font-size: 2.2rem;
    }
    
    .input-container input {
        padding: 14px 14px 14px 45px;
        font-size: 14px;
    }
    
    .login-button {
        padding: 14px;
    }
    
    .left-section {
        padding: 30px 15px;
    }
}

.message-box {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    animation: slideInDown 0.5s ease-out forwards;
    position: relative;
    overflow: hidden;
}

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

.success-message {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.1);
}

.success-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: #4CAF50;
    border-radius: 4px 0 0 4px;
}

.error-message {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.4);
    box-shadow: 0 4px 6px rgba(244, 67, 54, 0.1);
}

.error-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: #f44336;
    border-radius: 4px 0 0 4px;
}

.hide {
    display: none;
}

.login-text {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    position: relative;
    display: inline-block;
}

.login-text::before,
.login-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: rgba(111, 66, 193, 0.15);
}

.login-text::before {
    right: 100%;
    margin-right: 15px;
}

.login-text::after {
    left: 100%;
    margin-left: 15px;
}

.login-text a {
    color: #6f42c1;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.login-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6f42c1, #3e0070);
    transition: width 0.3s ease;
}

.login-text a:hover {
    color: #3e0070;
}

.login-text a:hover::after {
    width: 100%;
}

::-webkit-scrollbar {
    display: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-image {
    max-width: 350px;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-logo {
    text-align: center;
    max-width: 450px;
    margin: 0 auto;
    pointer-events: auto;
}

.brand-logo h1 {
    font-size: 7rem;
    font-weight: 700;
    margin: 10px 0;
    color: white;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 4px;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6);
}

.brand-logo p {
    font-size: 1.2rem;
    color: #eee;
    margin: 0;
    font-weight: 300;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    pointer-events: none;
    padding: 20px;
    box-sizing: border-box;
}