/* styles/style.css */

/* Thiết lập chung cho body */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
    height: 100vh; /* Full height để căn giữa đúng */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Container để căn giữa form */
.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    box-sizing: border-box; /* Đảm bảo padding không làm thay đổi kích thước */
}

.form-container {
    display: none;
}
.form-container.active {
    display: block;
}
/* Nút chuyển form */
.switch-btn {
    margin-top: 10px;
    padding: 10px 20px; /* Tăng padding để nút trông thoải mái hơn */
    cursor: pointer;
    background-color: #ec8712; /* Màu xanh lam tươi */
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease; /* Thêm hiệu ứng chuyển động mượt mà */
    box-sizing: border-box;
    width: 100%; /* Giúp nút rộng bằng với các phần tử trong form */
    text-align: center;
}

/* Hiệu ứng khi hover vào nút */
.switch-btn:hover {
    background-color: #f3430d; /* Màu xanh đậm hơn khi hover */
    transform: translateY(-2px); /* Nâng nút lên một chút khi hover */
}

/* Hiệu ứng khi focus vào nút */
.switch-btn:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(224, 50, 7, 0.7); /* Hiệu ứng ánh sáng khi focus */
}

/* Hiệu ứng khi nhấn nút */
.switch-btn:active {
    transform: translateY(2px); /* Nút hạ xuống khi nhấn */
}

/* Tiêu đề */
h1 {
    text-align: center;
    color: #e74c3c;
    font-size: 24px;
    margin-bottom: 20px;
}

/* Căn chỉnh các label */
label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #e74c3c;
    font-weight: bold;
}

/* Căn chỉnh các input */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border 0.3s ease;
    box-sizing: border-box; /* Đảm bảo padding được tính vào chiều rộng của input */
}

/* Hiệu ứng khi focus vào input */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #e67e22;
    outline: none;
}

/* Nút Đăng Ký */
input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #e67e22; /* Cam */
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-sizing: border-box; /* Đảm bảo padding được tính vào chiều rộng của nút */
}

/* Hiệu ứng khi hover vào nút */
input[type="submit"]:hover {
    background-color: #d35400; /* Cam đậm */
}

/* Định dạng lỗi cho form */
input:invalid {
    border-color: #e74c3c;
}

input:valid {
    border-color: #2ecc71;
}

/* Media queries cho responsive */
@media (max-width: 500px) {
    .container {
        padding: 15px; /* Giảm padding cho các màn hình nhỏ */
    }

    h1 {
        font-size: 20px; /* Giảm kích thước chữ tiêu đề */
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="submit"] {
        padding: 12px; /* Cải thiện độ dễ dàng nhập liệu trên màn hình nhỏ */
    }
}
