/* =========================================
   GLOBAL BASE - LOGIN LUXURY GOLD & SPLIT
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: #070709;
    color: #e4e4e7;
    min-height: 100dvh;
    display: flex;
    overflow-x: hidden;
}

/* ==== BOTÓN DE IDIOMA FLOTANTE ==== */
#lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 24, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#lang-toggle:hover {
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

#lang-toggle img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    display: block;
}

/* ==== LAYOUT EN DOS MITADES ==== */
.split-layout {
    display: flex;
    width: 100%;
    min-height: 100dvh;
}

/* ==== MITAD IZQUIERDA: PRESENTACIÓN / TRADING BG ==== */
.brand-section {
    flex: 1.2;
    position: relative;
    background: url('assets/images/luxinicio.png') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7,7,9,0.1) 0%, rgba(7,7,9,0.85) 100%);
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    animation: fadeIn 1.2s ease;
}

.brand-content h2 {
    color: #d4af37;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.brand-content p {
    color: #a1a1aa;
    font-size: 1.1em;
    line-height: 1.6;
}

/* ==== MITAD DERECHA: SECCIÓN LOGIN ==== */
.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #070709;
}

/* ==== CARD ==== */
.login-card {
    background: #141418;
    backdrop-filter: blur(10px);
    padding: 45px 35px;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.15);
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: fadeIn 1.2s ease;
    transition: transform 0.3s ease;
}

.login-card h1 {
    color: #d4af37;
    font-size: 2.1em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.subtitle {
    font-size: 1.05em;
    color: #a1a1aa;
    margin-bottom: 30px;
}

/* ==== INPUTS ==== */
.login-card input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    background: #1c1c22;
    color: #ffffff;
    margin-bottom: 18px;
    outline: none;
    font-size: 1.05em;
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.15s;
}

.login-card input::placeholder {
    color: #71717a;
}

.login-card input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
    transform: scale(1.01);
}

/* ==== BUTTONS ==== */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.05em;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn-primary {
    background: #d4af37;
    color: #070709;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: #e6c547;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #27272a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    border: 1px solid #3f3f46;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #3f3f46;
}

.btn-link {
    background: none;
    border: none;
    color: #d4af37;
    margin-top: 15px;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95em;
    font-weight: 500;
}

.btn-link:hover {
    color: #f3e5ab;
}

/* ==== MESSAGE ==== */
.message {
    margin-top: 18px;
    font-size: 0.95em;
    font-weight: 500;
}

.success {
    color: #34d399;
}

.error {
    color: #f87171;
}

/* ==== REGISTER TEXT ==== */
.register-text {
    margin-top: 28px;
    color: #a1a1aa;
    font-size: 0.95em;
}

.register-text a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
}

.register-text a:hover {
    text-decoration: underline;
}

/* ==== ANIMATION ==== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   RESPONSIVE MEJORADO PARA MÓVILES Y TABLETS
========================================= */
@media (max-width: 1024px) {
    .brand-section {
        flex: 0.8;
        padding: 40px;
    }
    .brand-content h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    body {
        display: block;
        padding: 0;
        overflow-y: auto;
    }

    .split-layout {
        flex-direction: column;
        min-height: 100dvh;
    }

    /* Convertimos la sección de marca en un encabezado superior compacto para móviles */
    .brand-section {
        display: flex;
        flex: none;
        width: 100%;
        min-height: 220px;
        padding: 30px 20px;
        justify-content: center;
        text-align: center;
    }

    .brand-section::before {
        background: linear-gradient(180deg, rgba(7,7,9,0.4) 0%, #070709 100%);
    }

    .brand-content {
        max-width: 100%;
    }

    .brand-content h2 {
        font-size: 1.6em;
        margin-bottom: 6px;
    }

    .brand-content p {
        font-size: 0.9em;
    }

    .login-section {
        width: 100%;
        padding: 20px 15px 40px 15px;
        min-height: auto;
    }

    .login-card {
        max-width: 100%;
        padding: 30px 20px;
        border-radius: 14px;
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
    }

    .login-card h1 {
        font-size: 1.6em;
    }

    .subtitle {
        font-size: 0.9em;
        margin-bottom: 22px;
    }

    .login-card input {
        font-size: 0.95em;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .btn {
        padding: 12px;
        font-size: 1em;
    }
    
    #lang-toggle {
        top: 12px;
        right: 12px;
        padding: 4px 8px;
    }
}