/* SỬA LỖI: Thêm box-sizing để kiểm soát kích thước tốt hơn */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(270deg, #1A237E, #0D0C1F, #00BFFF, #1A237E);
    background-size: 600% 600%;
    animation: gradientAnimation 20s ease infinite;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: #E0E0E0;
}
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,255,255,0.15) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: moveDots 10s linear infinite;
    pointer-events: none;
}

@keyframes moveDots {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}


@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.login-container {
    display: flex;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 90%;
    max-width: 900px;
    position: relative;
    z-index: 10;
}

.visual-section {
    flex: 1;
    background: url('../images/login_bg_left.png') no-repeat center center;
    background-size: contain;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    position: relative;
    overflow: hidden;
    animation: slideInLeft 1.5s ease forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from { transform: translateX(-80px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.visual-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(0,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.login-form-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #1a1433;
}

.login-form-section h2 {
    color: #00FFFF;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.login-form-section p.subtitle {
    color: #90CAF9;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: none;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #00FFFF;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.4);
    color: #E0E0E0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #A0A0A0;
}

.form-group input:focus {
    border-color: #00BFFF;
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.5);
    outline: none;
}

.form-group .icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #00FFFF;
    font-size: 1.2rem;
}

.options-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.options-group a {
    color: #00FFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.options-group a:hover {
    color: #00BFFF;
}

.checkbox-remember {
    display: flex;
    align-items: center;
    color: #E0E0E0;
}

.checkbox-remember input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #00FFFF;
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(90deg, #00FFFF 0%, #00BFFF 100%);
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

button[type="submit"]:hover {
    background: linear-gradient(90deg, #00BFFF 0%, #00FFFF 100%);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.4);
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.register-link p {
    color: #E0E0E0;
    margin: 0;
}

.register-link a {
    color: #00FFFF;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #00BFFF;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        /* Cho phép body có thể dài hơn màn hình để cuộn */
        height: auto;
        min-height: 100%;
        align-items: flex-start; /* Không ép căn giữa theo chiều dọc nữa */
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-container {
        flex-direction: column;
        width: 95%;
        max-width: 450px;
        margin: 0 auto; /* SỬA LỖI: Bỏ margin top/bottom cố định */
    }
    
    .visual-section {
        min-height: 200px; /* Chiều cao hợp lý cho phần ảnh */
        border-radius: 15px 15px 0 0;
    }

    .login-form-section {
        padding: 25px; /* Giảm padding */
    }
    
}