:root {
    --primary: rgb(255, 81, 81);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    --text-dark: #2d2d2d;
}

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

html, body {
    height: 100%;
    font-family: "Funnel Sans", sans-serif;
}

body {
    background-image: url("../images/loginLaptop.png");
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Adds a subtle dark tint over the image so the glass card is legible */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* The Main Glass Modal */
.login-card {
    position: relative;
    z-index: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.8rem;
    color: var(--text-dark);
    font-family: "Cal Sans", sans-serif;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.1rem;
    color: rgba(45, 45, 45, 0.6);
    font-weight: 400;
}

/* Alerts */
.alert {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.alert-error {
    background: rgba(255, 81, 81, 0.15);
    color: rgb(220, 50, 50);
    border: 1px solid rgba(255, 81, 81, 0.3);
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    color: rgb(30, 130, 70);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    width: 100%;
}

label {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

label i {
    color: var(--primary);
    margin-right: 6px;
}

input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-family: "Funnel Sans", sans-serif;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(45, 45, 45, 0.2);
    border-radius: 12px;
    color: var(--text-dark);
    transition: 0.3s ease;
    outline: none;
}

input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 81, 81, 0.15);
}

.forgot-password {
    align-self: flex-end;
    font-size: 0.95rem;
    color: rgba(45, 45, 45, 0.7);
    text-decoration: none;
    margin-bottom: 25px;
    transition: 0.2s;
}

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

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-family: "Funnel Sans", sans-serif;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 81, 81, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 81, 81, 0.4);
    background-color: rgb(240, 60, 60);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid rgba(45, 45, 45, 0.3);
}

.btn-secondary:hover {
    background-color: white;
    border-color: var(--primary);
    color: var(--primary);
}

/* Stylish divider line */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(45, 45, 45, 0.5);
    margin: 20px 0;
    width: 100%;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(45, 45, 45, 0.2);
}

.divider::before {
    margin-right: .5em;
}

.divider::after {
    margin-left: .5em;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .login-card {
        width: 90%;
        padding: 30px 20px;
    }

    h1 {
        font-size: 2.2rem;
    }
}