:root {
    --primary-color: #2563eb;
    --secondary-color: #06b6d4;
    --accent-color: #f43f5e;
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #0f172a;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Background Grid Animation */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 200vh;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

.login-container {
    display: flex;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

/* Left Panel - Form */
.login-panel {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    min-width: 400px;
    box-sizing: border-box;
}

.brand-section {
    margin-bottom: 40px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    /* Add gap between logo and toggle */
}

.header-row .logo-wrapper {
    margin-bottom: 0;
    flex-shrink: 1;
    /* Allow logo to shrink if needed */
    min-width: 0;
    /* Allow text to truncate if needed */
}

.header-row .language-wrapper {
    margin-bottom: 0;
    flex-shrink: 0;
    /* Don't let toggle shrink */
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 48px;
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.5));
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 16px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 48px;
    font-weight: 300;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-form input {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

/* Language Toggle */
.language-wrapper {
    display: flex;
    justify-content: flex-end;
    /* Align to right */
    margin-bottom: 32px;
}

.language-toggle {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--glass-highlight);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover:not(.active) {
    color: #fff;
}

/* Button & Links */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(6, 182, 212, 0.5);
}

.btn-login:hover::before {
    left: 100%;
}

.footer-links {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-dim);
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.forgot-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    border-bottom: 1px solid transparent;
}

.forgot-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* Modal Styling */
.btn-close-modal {
    margin-top: 24px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Styling (Light Theme) */
.forgot-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 24px;
    box-sizing: border-box;
    /* Ensure modal stays on top of glass effects */
}

.forgot-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    /* Slightly darker overlay */
    backdrop-filter: blur(4px);
}

.forgot-modal-content {
    background: #ffffff;
    /* White background */
    color: #1e293b;
    /* Slate 800 text */
    position: relative;
    z-index: 1;
    width: min(420px, 92vw);
    padding: 40px 32px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: none;
    /* Remove glass border */
}

/* Close Icon */
.modal-close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-icon:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Logo in Modal */
.modal-logo-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.modal-logo {
    height: 48px;
    /* Match screenshot size */
    object-fit: contain;
}

.forgot-modal-content h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    /* Slate 900 */
}

.forgot-modal-description {
    margin: 0 0 24px;
    font-size: 15px;
    color: #64748b;
    /* Slate 500 */
    line-height: 1.5;
}

.forgot-modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group-modal {
    text-align: center;
    /* Center label and input for this specific design */
}

.forgot-modal-form label {
    font-size: 14px;
    font-weight: 700;
    /* Bold label */
    color: #1e293b;
    text-transform: none;
    /* Reset uppercase if set elsewhere */
    letter-spacing: normal;
    margin-bottom: 8px;
    display: block;
}

.forgot-modal-form input {
    width: 100%;
    padding: 14px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    /* Light gray border */
    border-radius: 12px;
    color: #1e293b;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.forgot-modal-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-forgot {
    margin-top: 8px;
    padding: 14px;
    font-size: 16px;
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
    /* Blue gradient */
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    border-radius: 12px;
    font-weight: 700;
}

.btn-forgot:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.forgot-modal-footer {
    margin-top: 24px;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

/* Remove old styles */
.forgot-support,
.btn-close-modal {
    display: none;
}

.support-email {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.support-email:hover {
    text-decoration: underline;
}

/* Right Panel - Showcase */
.showcase-panel {
    flex: 1.5;
    position: relative;
    overflow: hidden;
    border-left: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
}

.slider-container {
    height: 100%;
    width: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 6s ease-in-out;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 2;
}

.slide-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slide-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-desc {
    font-size: 16px;
    color: #e2e8f0;
    max-width: 80%;
    line-height: 1.6;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    right: 40px;
    display: flex;
    gap: 12px;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--secondary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--secondary-color);
}

@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 85vh;
        width: 95%;
        margin: 20px auto;
    }

    .showcase-panel {
        display: none;
    }

    .login-panel {
        min-width: unset;
        width: 100%;
        max-width: 100%;
        padding: 40px;
        box-sizing: border-box;
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    .login-container {
        width: 100%;
        height: 100%;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        margin: 0;
        backdrop-filter: none;
        background: transparent;
        align-items: center;
    }

    .login-panel {
        padding: 48px 24px 24px 24px;
        justify-content: flex-start;
        align-items: center;
        margin: 0 auto;
        align-self: center;
        width: 100%;
        max-width: 500px;
    }

    .login-panel .brand-section,
    .login-panel .header-row,
    .login-panel .login-form,
    .login-panel .footer-links {
        width: 100%;
    }

    .header-row {
        align-items: center;
        margin-bottom: 32px;
    }

    .logo-img {
        height: 28px;
    }

    .brand-title {
        font-size: 18px;
    }

    .language-toggle {
        padding: 2px;
        /* Tighter padding for toggle */
    }

    .lang-btn {
        padding: 4px 10px;
        font-size: 11px;
        /* Smaller font */
    }

    h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .login-form .form-group {
        margin-bottom: 16px;
    }

    .login-form input {
        padding: 12px;
        font-size: 14px;
    }

    /* Override any specific mobile overrides that might conflict */
    .language-wrapper {
        margin-bottom: 0;
        justify-content: flex-end;
        /* Keep aligned to right of its container */
    }
}

/* Password Toggle Styles */
.password-input-group {
    position: relative;
    width: 100%;
}

.password-input-group input {
    width: 100%;
    padding-right: 40px;
    /* Make space for the eye icon */
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-dim);
    z-index: 10;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Google Login Button */
.btn-google-login {
    width: 100%;
    padding: 14px 20px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google-login:hover {
    background: #f8fafc;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-google-login:active {
    transform: translateY(0);
}

.btn-google-login svg {
    flex-shrink: 0;
}

/* Auth Messages */
.auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fca5a5;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Text Color Variables */
:root {
    --text-bright: #f8fafc;
}