/* login-modern.css: Estilo moderno para login de dos paneles */

/* Configuración General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
    overflow: hidden;
}

/* ===== Video Background ===== */
.video-bg-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
}

/* Contenedor Principal */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.main-card {
    display: flex;
    width: 920px;
    min-height: 550px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Panel Izquierdo */
.left-panel {
    flex: 1.2;
    position: relative;
    padding: 40px;
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.left-panel-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    z-index: 0;
}

.left-panel .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(28, 55, 103, 0.35), rgba(63, 94, 251, 0.22));
    z-index: 1;
}

.left-panel .content {
    position: relative;
    z-index: 2;
}

.main-logo {
    width: 180px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

/* Particles canvas */
.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Greeting animation */
.greeting-wrapper {
    width: 100%;
    margin-bottom: 20px;
    margin-left: auto;
    text-align: right;
}

.greeting-line {
    position: relative;
    height: 3.5rem;
    overflow: hidden;
}

.greeting-hello .greeting-text {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.greeting-welcome .greeting-text {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
}

.greeting-text {
    position: absolute;
    right: 0;
    top: 0;
    color: #fff;
    opacity: 0;
    filter: blur(12px);
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
    white-space: nowrap;
}

.greeting-text.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.greeting-text.fade-out {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-10px) scale(0.95);
}

/* Language indicator dots */
.lang-indicator {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
}

.lang-dot.active {
    background: #4dc3ff;
    box-shadow: 0 0 8px rgba(77, 195, 255, 0.6);
    transform: scale(1.3);
}

.left-panel p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.5;
}

.btn-outline {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-outline:hover {
    background: #fff;
    color: #1c3767;
}

/* Panel Derecho */
.right-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

/* Two-step form */
.login-step {
    width: 100%;
    animation: stepFadeIn 0.35s ease;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
}

/* User display (step 2 header) */
.user-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.06);
}

.user-display i {
    font-size: 28px;
    color: #4dc3ff;
}

.user-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    flex: 0 0 auto;
}

#user-photo-fallback {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.user-display span {
    flex: 1;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}

.btn-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    min-width: auto;
    margin: 0;
}

.btn-link:hover {
    color: #4dc3ff;
    background: rgba(77, 195, 255, 0.1);
}

/* Description wrapper (multilang) */
.description-wrapper {
    position: relative;
    min-height: 3rem;
    margin-bottom: 10px;
}

.description-text {
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    line-height: 1.5;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(6px);
    transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}

.description-text.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.description-text.fade-out {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-6px);
}

.user-icon {
    position: relative;
    font-size: 80px;
    color: #4dc3ff;
    margin-bottom: 30px;
}

.sub-icon {
    position: absolute;
    bottom: 5px;
    right: -5px;
    font-size: 25px;
    color: #1c3767;
    background: #fff;
    border-radius: 50%;
}

/* Mensaje de error */
.login-error {
    color: #ff6b6b;
    background: rgba(255, 77, 79, 0.12);
    border: 1px solid rgba(255, 77, 79, 0.25);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 15px;
    display: block;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

/* Formulario y Textboxes estilo Minimalista */
.login-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    padding: 5px 0;
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-bottom-color: #4dc3ff;
}

.input-group i {
    color: #4dc3ff;
    margin-right: 15px;
    font-size: 1.1rem;
}

.input-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: #fff !important;
    padding: 8px 0;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-appearance: none;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    background-color: transparent !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #fff;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-options {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.5);
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
}

.remember-me input[type="checkbox"] {
    accent-color: #4dc3ff;
    margin-right: 6px;
}

.forgot-pass {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}

.forgot-pass:hover {
    color: #4dc3ff;
}

/* Botones con degradado */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    box-shadow: 0 4px 18px rgba(0, 198, 255, 0.25);
    margin-bottom: 20px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    text-align: center;
    display: block;
    text-decoration: none;
    min-width: auto;
    margin-left: 0;
    margin-right: 0;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.signup-section {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.signup-section span {
    display: block;
    margin-bottom: 8px;
}

.btn-secondary {
    margin-top: 5px;
    font-size: 0.95rem;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 198, 255, 0.35);
    filter: brightness(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        width: 95%;
        min-height: auto;
        max-width: 450px;
    }

    .left-panel {
        padding: 30px;
        min-height: 250px;
    }

    .greeting-hello .greeting-text {
        font-size: 2rem;
    }

    .greeting-welcome .greeting-text {
        font-size: 2.4rem;
    }

    .right-panel {
        padding: 30px;
    }
}
