:root {
    --gold: #c5a059;
    --dark: #111111;
    --pure-white: #ffffff;
    --off-white: #fcfcfc;
    --nav-height: 80px; 
}

* { box-sizing: border-box; }

body.auth-page {
    background-color: var(--off-white);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding-top: var(--nav-height);
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #ffffff; display: flex; justify-content: center; align-items: center;
    z-index: 9999; transition: opacity 0.8s ease, visibility 0.8s;
}
.loader-logo { width: 120px; margin-bottom: 20px; filter: grayscale(1); }
.loader-bar { width: 0; height: 2px; background: var(--gold); margin: 10px auto; animation: load 2s forwards; }
.loader-content p { font-family: 'Syncopate'; font-size: 0.6rem; letter-spacing: 4px; color: #999; }
@keyframes load { 0% { width: 0; } 100% { width: 100px; } }
#preloader.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }

/* --- Layout Container --- */
.auth-wrapper {
    display: flex; justify-content: center; align-items: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 20px;
}

.bespoke-container {
    background-color: var(--pure-white);
    position: relative; overflow: hidden;
    width: 900px; max-width: 100%; min-height: 620px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* --- Sliding Forms --- */
.form-container {
    position: absolute; top: 0; height: 100%;
    transition: all 0.6s ease-in-out; width: 50%;
}

/* Sign-in stays left initially */
.login-container { left: 0; z-index: 2; opacity: 1; }

/* Sign-up is hidden behind the overlay initially */
.signup-container { left: 0; opacity: 0; z-index: 1; }

/* Animation Trigger: Slide both forms right when active */
.bespoke-container.active .login-container { transform: translateX(100%); opacity: 0; z-index: 1; }
.bespoke-container.active .signup-container { transform: translateX(100%); opacity: 1; z-index: 5; }

/* --- Form Elements --- */
form { padding: 40px; display: flex; flex-direction: column; justify-content: center; height: 100%; text-align: center; background: #fff; }
.premium-title { font-family: 'Syncopate'; font-size: 1.3rem; letter-spacing: 4px; font-weight: 700; margin-bottom: 5px; }
.premium-title span { color: var(--gold); }
.subtitle { font-family: 'Playfair Display'; color: #888; font-style: italic; margin-bottom: 25px; font-size: 0.9rem; }

input { background: #f9f9f9; border: 1px solid #eee; padding: 12px; margin: 8px 0; width: 100%; font-family: 'Montserrat'; }
.gold-btn {
    background: var(--dark); color: #fff; border: 1px solid var(--gold);
    padding: 14px; margin-top: 15px; cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.gold-btn:hover { background: var(--gold); }

/* --- Sliding Black Overlay --- */
.overlay-container {
    position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
    overflow: hidden; transition: transform 0.6s ease-in-out; z-index: 100;
}
.bespoke-container.active .overlay-container { transform: translateX(-100%); }

.overlay {
    background: var(--dark); color: #fff;
    position: relative; left: -100%; height: 100%; width: 200%;
    transform: translateX(0); transition: transform 0.6s ease-in-out;
}
.bespoke-container.active .overlay { transform: translateX(50%); }

.overlay-panel {
    position: absolute; display: flex; align-items: center; justify-content: center;
    flex-direction: column; padding: 0 40px; text-align: center; top: 0; height: 100%; width: 50%;
    transition: transform 0.6s ease-in-out;
}

.overlay-left { transform: translateX(-20%); }
.bespoke-container.active .overlay-left { transform: translateX(0); }

.overlay-right { right: 0; transform: translateX(0); }
.bespoke-container.active .overlay-right { transform: translateX(20%); }

.playfair { font-family: 'Playfair Display'; font-size: 2.2rem; font-style: italic; margin-bottom: 10px; color: var(--gold); }
.overlay-panel p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; color: #ccc; }

.ghost-btn {
    background: transparent; border: 1px solid #fff; color: #fff;
    padding: 10px 30px; cursor: pointer; font-weight: 700; letter-spacing: 1px; transition: 0.3s;
}
.ghost-btn:hover { background: #fff; color: var(--dark); }

/* --- Mobile Styling --- */
@media (max-width: 768px) {
    .auth-wrapper { padding: 10px; align-items: flex-start; }
    .bespoke-container { min-height: auto; box-shadow: none; width: 100%; }
    .overlay-container { display: none; } /* Hide the black sliding part on mobile */
    
    .form-container { position: relative; width: 100%; height: auto; opacity: 1; }
    .login-container { display: block; }
    .signup-container { display: none; }
    
    .bespoke-container.active .login-container { display: none; }
    .bespoke-container.active .signup-container { display: block; transform: none; }
    
    .mobile-toggle-btn {
        display: block; background: none; border: none; color: var(--gold);
        margin-top: 20px; cursor: pointer; text-decoration: underline; font-size: 0.9rem;
        font-family: 'Montserrat';
    }
}

@media (min-width: 769px) { .mobile-toggle-btn { display: none; } }

.password-wrapper { width: 100%; position: relative; }
.toggle-eye { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #ccc; }
.forgot-link { font-size: 0.8rem; color: #888; text-decoration: none; margin-top: 15px; display: block; }