@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root {
    /* Colors */
    --background-color: #03232a;
    --text-color: #ffffff;
    --desc-color: hsla(0, 0%, 100%, 0.7);
    --border-color: hsla(0, 0%, 56%, 0.6);
    --input-bg-color: hsla(0, 0%, 100%, 0.05);
    --input-text-color: hsla(0, 0%, 100%, 0.5);
    --focus-border-color: #c4c4c4;
    --focus-shadow: 0 0 0 3px rgba(75, 83, 92, 0.25);

    /* Spacing - Fluid Scale */
    --space-xs: clamp(0.5rem, 1vw + 0.25rem, 0.75rem);
    --space-sm: clamp(0.75rem, 1.5vw + 0.25rem, 1rem);
    --space-md: clamp(1rem, 2vw + 0.5rem, 1.5rem);
    --space-lg: clamp(1.5rem, 3vw + 1rem, 2.5rem);
    --container-padding: clamp(1rem, 4vw, 3.5rem);

    /* Typography - Fluid Scale */
    --font-xs: clamp(0.75rem, 1vw + 0.5rem, 0.875rem);
    /* ~12px -> 14px */
    --font-sm: clamp(0.875rem, 1vw + 0.5rem, 1rem);
    /* ~14px -> 16px */
    --font-md: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
    /* ~16px -> 20px */
    --font-lg: clamp(1.5rem, 2.5vw + 1rem, 2.5rem);
    /* ~24px -> 40px - Headline */
}

/* Base Reset & Globals */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.2;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* Main Container Layout */
.main-container {
    width: 100%;
    min-height: 100vh;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    /* Mobile Default */
    align-items: center;
    justify-content: start;
    gap: var(--space-md);
    overflow-y: scroll;
}

/* Images Section */
.left-section {
    width: 100%;
    height: 35vh;
    /* Mobile height */
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.left-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Form Section */
.form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs) 0;
}

.inner-form {
    width: 100%;
    max-width: 480px;
    /* Constrain max width for readability */
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Headings */
.headtext {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.headtext h1 {
    font-size: var(--font-md);
    font-weight: bold;
    color: var(--text-color);
    line-height: 1.1;
}

.headtext p {
    font-size: var(--font-sm);
    font-weight: 300;
    color: var(--desc-color);
}

/* Form Inputs */
.form-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.input-box {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.input-box label {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-color);
}

.password-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.password-label a {
    font-size: var(--font-xs);
    color: var(--desc-color);
    text-decoration: none;
    transition: color 0.2s;
}

.password-label a:hover,
.password-label a:focus {
    color: var(--text-color);
    text-decoration: underline;
}

.input-container {
    display: flex;
    align-items: center;
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.input-container span {
    color: var(--desc-color);
    font-size: 1.25rem;
    /* Icon size */
    background: transparent;
}

.input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: var(--font-sm);
    line-height: 1.3;
}

.input-container input::placeholder {
    color: var(--input-text-color);
    background-color: transparent;
}

/* Remove background color for autocomplete/autofill */
.input-container input:-webkit-autofill,
.input-container input:-webkit-autofill:hover,
.input-container input:-webkit-autofill:focus,
.input-container input:-webkit-autofill:active {
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--text-color);
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 20px 20px #23232329;
}

.input-container:focus-within {
    border-color: var(--focus-border-color);
    box-shadow: var(--focus-shadow);
}

.input-container:focus-within span {
    color: var(--text-color);
}

.toggle-password {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--text-color) !important;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.5rem;
}

.remember-me label {
    font-size: var(--font-xs);
    color: var(--desc-color);
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    cursor: pointer;
    accent-color: var(--text-color);
    width: 1rem;
    height: 1rem;
}



/* Buttons */
.login-sign-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    width: 100%;
    margin-top: var(--space-xs);
}

.login-sign-btns button {
    width: 100%;
    padding: 0.85rem;
    background-color: #fff;
    color: #010101;
    font-size: var(--font-sm);
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-sign-btns button:not(:disabled):hover,
.login-sign-btns button:not(:disabled):focus {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.login-sign-btns button:active {
    transform: scale(0.98);
}

.login-sign-btns button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    /* Prevents clicks and hover states entirely */
}

.login-sign-btns p.formMsg {
    width: 100%;
    text-align: center;
}

.login-sign-btns a {
    color: var(--desc-color);
    text-decoration: none;
    font-size: var(--font-xs);
    margin-top: 0.5rem;
}

.login-sign-btns a span {
    color: #fff;
    font-weight: 600;
}

.login-sign-btns a:hover span,
.login-sign-btns a:focus span {
    text-decoration: underline;
}

/* Separator */
.separator {
    display: flex;
    align-items: center;
    color: var(--desc-color);
    font-size: var(--font-xs);
    width: 100%;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #333;
}

.separator::before {
    margin-right: 1rem;
}

.separator::after {
    margin-left: 1rem;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    width: 100%;
}

.social-login button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--desc-color);
    font-size: var(--font-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.social-login button img {
    width: 20px;
    height: 20px;
    background: transparent;
}

.social-login button:hover,
.social-login button:focus {
    background-color: #161616;
    color: #fff;
    border-color: #fff;
}

.social-login button:active {
    transform: scale(0.98);
}

/* DESKTOP LAYOUT (min-width: 1024px) */
/* Flex Row Switch */
@media (min-width: 1024px) {
    .main-container {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
        align-items: center;
        justify-content: center;
    }

    .left-section {
        width: 40%;
        height: 90vh;
        padding: var(--space-md);
    }

    .left-section img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 12px;
    }

    .form {
        width: 50%;
        height: 90vh;
        /* Match left section */
        justify-content: center;
    }

    .inner-form {
        width: 80%;
        max-width: 550px;
    }
}

/* Success Modal */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Dimmed background */
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: fadeIn 0.4s ease forwards;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #161616;
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.success-icon {
    font-size: 3rem !important;
    /* Override material symbol size */
    color: #4CAF50;
    /* Green color */
    animation: iconPulse 0.6s ease-out;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: var(--font-md);
    color: var(--text-color);
}

.modal-content p {
    font-size: var(--font-sm);
    color: var(--desc-color);
    line-height: 1.5;
}

.modal-content button {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: var(--font-sm);
    transition: background-color 0.2s;
    width: 100%;
}

.modal-content button:hover {
    background-color: #e0e0e0;
}