@font-face {
    font-family: 'Urban Heroes';
    src: url('assets/fonts/UrbanHeroes.ttf') format('truetype');
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}



.login-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background image with fade-out edges */
.login-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('assets/login-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Fade out edges — dark blue very dark */
.login-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        /* Top edge */
        linear-gradient(to bottom, #050a14 0%, transparent 18%),
        /* Bottom edge */
        linear-gradient(to top, #050a14 0%, transparent 18%),
        /* Left edge */
        linear-gradient(to right, #050a14 0%, transparent 18%),
        /* Right edge */
        linear-gradient(to left, #050a14 0%, transparent 18%);
    z-index: 1;
}

/* Canvas for animated lights */
#lightsCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Login form */
.login-form {
    position: relative;
    z-index: 10;
    width: 300px;
    max-width: 90vw;
}

/* Input fields */
.input-group {
    position: relative;
    margin-bottom: 14px;
}

.input-group input {
    width: 100%;
    height: 42px;
    background: rgba(243, 241, 241, 0.91);
    border: none;
    border-radius: 4px;
    padding: 0 40px 0 14px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #333;
    outline: none;
    caret-color: #EF1DB7;
}

.input-group input::placeholder {
    color: #75807E;
}

.eye-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remember me row */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 21px 4px;
}

.remember-text {
    color: white;
    font-size: 15px;
}

.toggle {
    width: 55px;
    height: 24px;
    border: 1px solid #E504A9;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.toggle.off {
    border-color: lightgray;
}

.toggle-slider {
    width: 50%;
    height: 100%;
    background: #EF1DB7;
    border-radius: 3px 0 0 3px;
    transition: all 0.2s ease;
}

.toggle.off .toggle-slider {
    background: lightgray;
    margin-left: 50%;
    border-radius: 0 3px 3px 0;
}

.toggle-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 14px;
    color: #00CEA8;
    transition: all 0.2s ease;
}

.toggle.off .toggle-text {
    right: auto;
    left: 8px;
    color: gray;
}

/* Error message */
.error-msg {
    color: #FF4444;
    font-size: 16px;
    text-align: center;
    margin-bottom: 12px;
    display: none;
}

.error-msg.show {
    display: block;
}

/* Lockout message */
.lockout-msg {
    color: #FF8800;
    font-size: 14px;
    text-align: center;
    margin-bottom: 12px;
    display: none;
}

.lockout-msg.show {
    display: block;
}

/* Login button */
.login-btn {
    width: 100%;
    height: 43px;
    background: #EF1DB7;
    border: none;
    border-radius: 7px;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    font-size: 21px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.2s ease;
}

.login-btn:hover {
    background: #D4189F;
}

.login-btn:active {
    background: #B5148A;
}

.login-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Branding */
.branding {
    position: absolute;
    bottom: 18px;
    right: 30px;
    color: white;
    font-family: 'Urban Heroes', sans-serif;
    font-size: 18px;
    z-index: 10;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .login-form {
        width: 85vw;
    }

    .input-group input {
        height: 48px;
        font-size: 16px; /* prevents iOS zoom */
    }

    .login-btn {
        height: 50px;
        font-size: 20px;
    }

    .branding {
        font-size: 14px;
        right: 15px;
        bottom: 12px;
    }

    .remember-text {
        font-size: 14px;
    }
}

@media (max-height: 500px) {
    .login-form {
        transform: scale(0.85);
    }
}
