@font-face {
    font-family: 'Google Sans';
    src: url('fonts/GoogleSans-Bold.woff2') format('woff2'),
         url('fonts/GoogleSans-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Google Sans';
    src: url('fonts/GoogleSans-Medium.woff2') format('woff2'),
         url('fonts/GoogleSans-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Google Sans';
    src: url('fonts/GoogleSans-Regular.woff2') format('woff2'),
         url('fonts/GoogleSans-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Google Sans', sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    background: linear-gradient(135deg, #e0f2f7 0%, #c1e4ed 100%);
    overflow: hidden;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    opacity: 1;
    visibility: visible;
    flex-direction: column;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-out;
}

.loading-text {
    font-size: 1em;
    color: #555;
    font-weight: 400;
    animation: pulse 1.5s infinite alternate;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease-in-out;
}

.loading-text.font-loading {
    opacity: 0;
}

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

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.05); opacity: 1; }
}


.lock-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.lock-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    max-width: 400px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

body.loaded .lock-card {
    opacity: 1;
    transform: scale(1);
}


.lock-icon {
    font-size: 4em;
    color: #007bff;
    margin-bottom: 20px;
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.input-group input[type="password"],
.input-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    padding-right: 45px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Google Sans', sans-serif;
}

.input-group input[type="password"]:focus,
.input-group input[type="text"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
    outline: none;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #333;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.login-button,
.change-password-btn {
    background-color: #007bff;
    color: white;
    font-family: 'Google Sans';
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 400;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

.login-button:hover,
.change-password-btn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.change-password-btn {
    background-color: #6c757d;
    color: white;
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.3);
    text-decoration: none;
    font-weight: 400;
    font-size: .9rem;
}

.change-password-btn:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.4);
}


.login-button i,
.change-password-btn i {
    font-size: 1.1em;
}

.error-message {
    background-color: #f8d7da;
    color: #dc3545;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@media (max-width: 480px) {
    .lock-card {
        padding: 25px;
        margin: 0 15px;
    }

    .lock-icon {
        font-size: 3em;
    }

    h2 {
        font-size: 1.5em;
    }

    p {
        font-size: 0.9em;
    }

    .input-group input[type="password"],
    .input-group input[type="text"] {
        font-size: 0.95em;
        padding: 10px 20px;
    }
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    .login-button,
    .change-password-btn {
        width: 100%;
        justify-content: center;
    }
}
