body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
    background: url('/images/background_virginia.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fafbfc;
    position: relative;
    overflow-x: hidden;
}

.overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(90deg, rgba(28,35,55,0.88) 60%, rgba(30,30,30,0.75) 100%);
    z-index: 1;
}

.login-wrapper {
    display: flex;
    align-items: stretch;
    width: 97vw;
    max-width: 710px;
    min-height: 350px;
    margin: 48px auto;
    background: rgba(34,44,62,0.97);
    box-shadow: 0 8px 36px rgba(24,41,69,0.13), 0 1px 9px rgba(0,0,0,0.28);
    border-radius: 16px;
    overflow: hidden;
    z-index: 2;
    position: relative;
}

.login-image {
    flex: 1.05;
    background: #191e27;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    min-height: 100%;
    padding: 32px 9px 16px 9px;
}

.login-image img {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(33,150,243,0.14);
    background: #161b28;
}

.login-container {
    flex: 2;
    padding: 35px 24px 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInCard .7s cubic-bezier(.46,.03,.52,.96);
    z-index: 4;
}

@keyframes fadeInCard {
    0% { opacity: 0; transform: scale(0.97) translateY(12px);}
    85% { opacity: 1; transform: scale(1.03);}
    100% { opacity: 1; transform: scale(1);}
}

.login-container h1 {
    font-size: 1.39rem;
    font-weight: 800;
    color: #f2f6ff;
    margin-bottom: 15px;
    letter-spacing: .35px;
    text-align: left;
}

.login-container label {
    font-weight: 600;
    font-size: 0.97rem;
    margin-bottom: 3px;
    color: #b2e3fc;
    letter-spacing: .45px;
    display: block;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1.5px solid #313b4e;
    border-radius: 7px;
    background: #23252b;
    font-size: 0.97rem;
    color: #f7fafb;
    margin-bottom: 14px;
    outline: none;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.12px;
    transition: border-color 0.22s, box-shadow 0.20s;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: #03dac5;
    box-shadow: 0 0 0 2px rgba(3,218,197,0.09);
    background: #232a38;
}

.login-container input::placeholder {
    color: #a6a8b3;
    opacity: .66;
    font-size: 0.94rem;
    letter-spacing: 0.09px;
}

.forgot-link {
    display: block;
    margin-top: 3px;
    margin-bottom: 8px;
    text-align: right;
    color: #03dac5;
    font-size: 0.97rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.16s;
}
.forgot-link:hover {
    color: #2196f3;
}

/* Login with Google style */
.login-container a[href^="/oauth2/authorization/google"] {
    display: block;
    width: 100%;
    padding: 8px 0;
    margin-bottom: 10px;
    background: #fff;
    color: #30325c;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.97rem;
    text-decoration: none;
    box-shadow: 0 2px 10px #03dac510;
    border: none;
    transition: background 0.18s, color 0.18s;
}
.login-container a[href^="/oauth2/authorization/google"]:hover {
    background: #03dac5;
    color: #2a415a;
}

/* Buttons in one row */
.button-row {
    display: flex;
    width: 100%;
    gap: 11px;
    margin-top: 10px;
}

.login-btn, .register-btn {
    flex: 1;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: 7px;
    border: none;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.12s;
    box-shadow: 0 2px 12px rgba(33,150,243,0.08);
}

.login-btn {
    background: linear-gradient(90deg, #2196f3 0%, #03dac5 100%);
    color: #fff;
}
.login-btn:hover, .login-btn:focus {
    background: linear-gradient(90deg, #03dac5 0%, #2196f3 100%);
    color: #fff;
    box-shadow: 0 7px 18px rgba(33,218,197,.13);
    transform: scale(1.03);
    outline: none;
}

.register-btn {
    background: #363f55;
    color: #ffc700;
}
.register-btn:hover, .register-btn:focus {
    background: #232a38;
    color: #efefe4;
    box-shadow: 0 4px 10px rgba(33,150,243,0.09);
    outline: none;
}

.message {
    margin-top: 10px;
    text-align: center;
    color: #ff6b6b;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: .5px;
}
.success-message { color: #03dac5; }
.logout-message { color: #ffc700; }

@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        margin: 20px 2vw 10px 2vw;
    }
    .login-image {
        padding: 10px 2px 8px 2px;
        min-height: 70px;
    }
    .login-container {
        padding: 15px 7px 14px 7px;
        min-width: 98vw;
    }
    .login-image img {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 600px) {
    .login-wrapper {
        margin: 7vw 2vw 10px 2vw;
        max-width: 99vw;
        border-radius: 8px;
    }
    .login-image img {
        width: 24px;
        height: 24px;
    }
    .login-container input[type="text"],
    .login-container input[type="password"] {
        height: 28px;
        font-size: 0.93rem;
        padding: 0 7px;
    }
    .button-row {
        gap: 6px;
    }
}
