/* Nền động ngẫu nhiên */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background 0.5s ease-in-out;
    background: linear-gradient(to right, #4facfe, #00f2fe); /* Nền mặc định */
}

/* Khối đăng nhập */
.login-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 300px; /* Làm khối nhỏ lại */
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tiêu đề */
.login-container h1 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

/* Input và button */
input {
    width: calc(100% - 16px);
    padding: 8px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

input:focus {
    border-color: #6a11cb;
    box-shadow: 0 0 6px rgba(106, 17, 203, 0.2);
    outline: none;
}

button {
    width: 100%;
    padding: 8px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
    background: #2575fc;
    transform: scale(1.02);
}

.error-message {
    color: red;
    margin-top: 10px;
    font-size: 12px;
}

/* Overlay loading */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 16px;
    z-index: 999;
    animation: fadeIn 0.5s ease-in-out;
}

/* Spinner animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
