/* --- SCOPED VARIABLES --- */
#lx-modal-overlay {
    --lx-gold: #D4AF37;
    --lx-gold-dim: #8a7020;
    --lx-dark: #121212;
    --lx-panel-bg: #1A1A1A;
    --lx-white: #EDEDED;
    --lx-gray: #888888;
    --lx-font-serif: 'Cinzel', serif; /* Ensure you import this or use similar */
    --lx-font-sans: 'Montserrat', sans-serif;
    --lx-transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    font-family: var(--lx-font-sans); /* Reset font inside modal */
    box-sizing: border-box;
}

/* Import fonts if you haven't already in your head tag */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Montserrat:wght@300;400;500&display=swap');

/* --- OVERLAY & POSITIONING --- */
.lx-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); /* Glass effect */
    z-index: 9999; /* High Z-index to sit on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--lx-transition);
}

.lx-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* --- THE CARD --- */
.lx-modal-container {
    display: flex;
    width: 900px;
    max-width: 90%;
    height: 600px;
    background: var(--lx-panel-bg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    overflow: hidden;
    position: relative;
    transform: translateY(50px);
    transition: var(--lx-transition);
}

.lx-modal-overlay.open .lx-modal-container {
    transform: translateY(0);
}

/* --- CLOSE BUTTON --- */
.lx-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--lx-gray);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}
.lx-close-btn:hover { color: var(--lx-gold); }

/* --- LEFT PANEL (VISUAL) --- */
.lx-brand-panel {
    width: 40%;
    background: linear-gradient(135deg, #0a0a0a, #1f1f1f);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--lx-gold);
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

/* Subtle Animated Candle Graphic */
.lx-candle-graphic {
    width: 2px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 20px;
    position: relative;
}
.lx-flame {
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #fff, var(--lx-gold));
    border-radius: 50% 0 50% 50%;
    transform: rotate(-45deg);
    position: absolute;
    top: -15px;
    left: -6.5px;
    box-shadow: 0 0 10px var(--lx-gold), 0 0 20px var(--lx-gold);
    animation: flicker 2s infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.8; transform: rotate(-45deg) scale(1); }
    100% { opacity: 1; transform: rotate(-45deg) scale(1.1); }
}

.lx-brand-name {
    font-family: var(--lx-font-serif);
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 2px;
    color: var(--lx-gold);
}

.lx-brand-tagline {
    font-family: var(--lx-font-serif);
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* --- RIGHT PANEL (FORMS) --- */
.lx-form-panel {
    width: 60%;
    padding: 50px;
    position: relative;
    background: var(--lx-panel-bg);
}

/* TABS */
.lx-tabs {
    display: flex;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
}

.lx-tab {
    background: none;
    border: none;
    color: var(--lx-gray);
    padding: 10px 20px;
    font-family: var(--lx-font-serif);
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.lx-tab.active {
    color: var(--lx-gold);
    border-bottom: 1px solid var(--lx-gold);
}

/* FORMS */
.lx-form {
    display: none;
    animation: fadeIn 0.5s ease;
}
.lx-form.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lx-header h3 {
    color: var(--lx-white);
    font-family: var(--lx-font-serif);
    margin: 0 0 5px 0;
    font-weight: 400;
}

.lx-header p {
    color: var(--lx-gray);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* INPUTS (Floating Label) */
.lx-input-group {
    position: relative;
    margin-bottom: 25px;
}

.lx-input-group input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    padding: 10px 0;
    color: var(--lx-white);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.lx-input-group label {
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--lx-gray);
    pointer-events: none;
    transition: 0.3s;
}

.lx-input-group input:focus,
.lx-input-group input:not(:placeholder-shown) {
    border-bottom: 1px solid var(--lx-gold);
}

.lx-input-group input:focus ~ label,
.lx-input-group input:not(:placeholder-shown) ~ label {
    top: -15px;
    font-size: 0.8rem;
    color: var(--lx-gold);
}

/* FOOTER ACTIONS */
.lx-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--lx-gray);
    margin-bottom: 25px;
}

.lx-forgot-pass {
    color: var(--lx-gray);
    text-decoration: none;
    transition: 0.3s;
}
.lx-forgot-pass:hover { color: var(--lx-gold); }

/* REWARDS CHECKBOX */
.lx-rewards-optin {
    margin-bottom: 25px;
    background: rgba(212, 175, 55, 0.05);
    padding: 15px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.lx-checkbox-gold {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}
.lx-checkbox-gold input { display: none; }
.lx-checkmark {
    min-width: 18px;
    height: 18px;
    border: 1px solid var(--lx-gold);
    margin-right: 12px;
    margin-top: 3px;
    display: inline-block;
    position: relative;
}
.lx-checkbox-gold input:checked ~ .lx-checkmark {
    background: var(--lx-gold);
}
.lx-optin-text { display: flex; flex-direction: column; }
.lx-optin-text strong { color: var(--lx-gold); font-size: 0.9rem; font-family: var(--lx-font-serif); }
.lx-optin-text span { color: var(--lx-gray); font-size: 0.8rem; }

/* SUBMIT BUTTON */
.lx-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, #D4AF37, #F4E4BC, #D4AF37);
    background-size: 200%;
    border: none;
    color: #121212;
    font-family: var(--lx-font-serif);
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.5s;
}
.lx-submit-btn:hover {
    background-position: right center;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* TRIGGER BUTTON (For Demo) */
.lx-trigger-button {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid #D4AF37;
    color: #D4AF37;
    cursor: pointer;
    font-family: 'Cinzel', serif;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .lx-modal-container { flex-direction: column; height: auto; max-height: 90vh; overflow-y: auto; }
    .lx-brand-panel { width: 100%; height: 120px; flex-direction: row; gap: 15px; }
    .lx-candle-graphic { height: 40px; margin: 0; }
    .lx-form-panel { width: 100%; padding: 30px; box-sizing: border-box;}
}

/* ACCOUNT VIEW STATE */
.lx-auth-hidden {
    display: none !important;
}
