/* 
   Modern Login Redesign - Premium Dual Pane 
   Inspired by the requested UI image
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #00B5E2; /* Celeste Vibrante */
    --primary-dark: #0093B8;
    --accent-color: #87CEEB; /* Sky Blue */
    --bg-light: #F0F4F8;
    --text-dark: #2D3436;
    --text-muted: #636E72;
    --white: #FFFFFF;
    --radius-lg: 24px;
    --radius-md: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* AJUSTES MANUALES: Modifica estos valores para mover el logo y textos */
    --content-offset-x: -60px;
    --content-offset-y: -10px;
    --content-scale: 1.0;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#wrapper-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-color: #f0f4f8;
    position: relative;
    overflow: hidden;
    z-index: 1;
    perspective: 1500px; /* Habilita el efecto 3D global */
}

#wrapper-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(240, 244, 248, 0.4) 100%);
    z-index: -1;
}

.bg-icons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

#bg-physics-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sobre el fondo, bajo el card */
    pointer-events: none;
}

@keyframes fall {
    0% {
        top: -100px;
        transform: translateX(0) rotate(0deg);
    }

    100% {
        top: 110vh;
        transform: translateX(0) rotate(360deg);
    }
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    min-height: 600px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* Crítico para el z-index */
    z-index: 10;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animaciones de Transición 3D */
.card-rotate-in {
    animation: rotateInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.card-rotate-out-right {
    animation: rotateOutRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes rotateInRight {
    from {
        opacity: 0;
        transform: rotateY(90deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

@keyframes rotateOutRight {
    from {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
    to {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.9);
    }
}

/* Left Pane - Welcome Section */
.login-left {
    flex: 1.2;
    background: linear-gradient(135deg, #00B5E2 0%, #0093B8 100%);
    color: var(--white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Animaciones de fondo (Blobs) */
.bg-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.15);
    filter: blur(80px);
    border-radius: 50%;
    z-index: 0;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    left: -100px;
    background: rgba(255, 255, 255, 0.2);
}

.blob-2 {
    bottom: -150px;
    right: -100px;
    background: rgba(123, 159, 242, 0.4);
    animation-delay: -5s;
}

.blob-3 {
    top: 50%;
    left: 40%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    animation-duration: 15s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Contenedor para ajustes manuales */
.left-content-wrapper {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* AQUÍ SE APLICAN LOS AJUSTES MANUALES DEL :ROOT */
    transform: translate(var(--content-offset-x), var(--content-offset-y)) scale(var(--content-scale));
    transition: transform 0.3s ease;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 260px;
    /* Size of the circle */
    height: 140%;
    background: var(--white);
    right: -130px;
    /* Half of width out */
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
}


.login-left .logo-container,
.login-left .brand-name,
.login-left .welcome-msg,
.login-left .welcome-sub {
    width: 100%;
}

.login-left .logo-container {
    margin-bottom: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo-circle {
    width: 120px;
    height: 120px;
    background: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), inset 0 0 15px rgba(0, 181, 226, 0.1);
    animation: floating 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

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

.logo-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


.login-left .brand-name {
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-left .welcome-msg {
    font-weight: 600;
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.login-left .welcome-sub {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* Right Pane - Form Section */
.login-right {
    flex: 1;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
}

.login-right h2 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-input {
    width: 100%;
    border: 2px solid #F1F3F5;
    background: #F8F9FA;
    padding: 14px 45px 14px 15px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(123, 159, 242, 0.15);
}

.form-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-input:focus+i {
    color: var(--primary-color);
}

.forgot-link {
    display: block;
    text-align: right;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 30px;
}

.btn-login {
    background: linear-gradient(135deg, #87CEEB 0%, #00B5E2 50%, #0093B8 100%);
    background-size: 200% auto;
    color: white;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 181, 226, 0.3);
    margin-top: 10px;
}

.btn-login:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 181, 226, 0.4);
}

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

.btn-multimozo {
    background: var(--white);
    color: var(--text-dark);
    padding: 14px;
    border: 2px solid #F1F3F5;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-multimozo:hover {
    background: #F8F9FA;
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}


.social-container {
    text-align: center;
    margin-top: 35px;
}

.social-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    position: relative;
}

.social-title::before,
.social-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 1px;
    background: #EEE;
    top: 50%;
}

.social-title::before {
    left: 0;
}

.social-title::after {
    right: 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #F8F9FA;
    border: 2px solid #F1F3F5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn:hover {
    background: var(--white);
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 181, 226, 0.2);
}

.social-btn i {
    transition: transform 0.3s ease;
}

.social-btn:hover i {
    transform: scale(1.1);
}

.footer-info {
    margin-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Multi Mozo Compact adjustments */
.card-multimozo {
    max-width: 800px;
    min-height: 500px;
}

.card-multimozo .login-left {
    padding: 40px;
}

.card-multimozo .login-right {
    padding: 30px 40px;
}

.card-multimozo .logo-circle {
    width: 110px;
    height: 110px;
    padding: 10px;
}

.card-multimozo .virtual-keyboard {
    gap: 8px;
    max-width: 260px;
}

.card-multimozo .kb-btn {
    font-size: 1.2rem;
}

.card-multimozo .login-right h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

/* Virtual Keyboard Styles */
.virtual-keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 25px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.kb-btn {
    aspect-ratio: 1;
    background: #F8F9FA;
    border: 2px solid #F1F3F5;
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kb-btn:hover {
    background: var(--white);
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.kb-btn:active {
    transform: scale(0.95);
}

.kb-btn.kb-del {
    background: #FFF5F5;
    color: #FA5252;
    border-color: #FFE3E3;
}

.kb-btn.kb-del:hover {
    background: #FA5252;
    color: var(--white);
    border-color: #FA5252;
}

.kb-btn.kb-empty {
    visibility: hidden;
}

.text-center {
    text-align: center !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Responsiveness */
@media (max-width: 900px) {
    .login-left {
        display: none;
    }

    .login-card {
        max-width: 450px;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 40px 30px;
    }
}