/*
 * Connect the Montserrat Font
 */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 50% 111%, rgba(12, 45, 59, 1) 0%, rgba(11, 11, 12, 1) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    color: #FFFFFF;
    overflow: hidden;
    position: relative;
}

/* Background image with gradient overlay */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(180deg, rgba(10, 11, 11, 1) 16%, rgba(10, 11, 11, 0) 52%),
        url('../images/background.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Main login container */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 129px;
}

.logo {
    width: 194px;
    height: auto;
}

/* Glassmorphic form card */
.login-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.login-heading {
    font-weight: 500;
    font-size: 40px;
    line-height: 1.2em;
    text-align: center;
}

.error-message {
    color: #ff4d4d;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.form-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    width: 500px;
    max-width: 90vw;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Input fields */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: border-color 0.2s;
}

.input-row:focus-within {
    border-color: rgba(50, 215, 224, 0.5);
}

.input-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5em;
    min-width: 0;
}

.input-row input::placeholder {
    color: #7E7E7E;
}

.input-row input:-webkit-autofill,
.input-row input:-webkit-autofill:hover,
.input-row input:-webkit-autofill:focus,
.input-row input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    background-color: transparent !important;
    transition: background-color 5000s ease-in-out 0s;
}

.toggle-password {
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.toggle-password:hover {
    opacity: 1;
}

/* Options row: checkbox + forgot password */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox {
    background: rgba(50, 215, 224, 0.3);
    border-color: rgba(50, 215, 224, 0.6);
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
}

.checkbox-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5em;
}

.forgot-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5em;
    color: #FFFFFF;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
}

.forgot-link:hover {
    opacity: 0.7;
}

/* Login button */
.login-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(141deg, rgba(50, 215, 224, 1) 0%, rgba(81, 167, 203, 1) 39%, rgba(0, 115, 163, 1) 92%);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5em;
    color: #FFFFFF;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-btn:active {
    transform: scale(0.99);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .login-wrapper {
        gap: 40px;
        padding: 60px 20px 40px;
        width: 100%;
    }

    .login-card {
        gap: 24px;
        width: 100%;
    }

    .form-container {
        width: 100%;
        max-width: 100%;
        padding: 24px 20px;
    }

    .login-heading {
        font-size: 28px;
    }

    .form-container form {
        gap: 24px;
    }

    .input-row input {
        font-size: 16px;
    }

    .options-row {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .checkbox-text,
    .forgot-link {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .login-wrapper {
        gap: 30px;
        padding: 40px 16px 32px;
    }

    .form-container {
        padding: 20px 16px;
    }

    .login-heading {
        font-size: 24px;
    }

    .logo {
        width: 150px;
    }
}