* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: cursive;
}

body {
    background-color: pink;
}

/* THANH TÁC VỤ */
.tacvu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0 5px 5%;
    background: #f781bc;
}

.ketnoi {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.iconfb_ig a {
    color: white;
    font-size: 14px;
}

.chaychu {
    width: 50%;
    overflow: hidden;
    color: white;
    font-weight: bold;
    position: relative;
}

.chaychu span{
    display: inline-block;
    white-space: nowrap;
    margin-left: 100%;
    animation: chay 10s linear infinite;
}

@keyframes chay {
    0% { transform: translateX(0%);}
    100% { transform: translateX(-100%);}
}

.menu {
    display: flex;
    list-style: none;
    gap: 15px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    transition: 0.3s;
    
}

.menu a:hover {
    background: rgba(255,255,255,0.3);
}
.menu a:hover,
.menu .active,
.menu2 .active {
    background: rgba(255,255,255,0.3);
}


.logo {
    display: flex;         /* Giúp căn giữa ảnh theo chiều dọc */
    align-items: center;   /* Căn giữa */
    margin-right: 15px;    /* Tạo khoảng cách với Menu bên cạnh */
    flex-shrink: 0;        /* Đảm bảo logo không bị bóp méo khi màn hình nhỏ */
}

/* 2. Chỉnh kích thước Ảnh Logo */
.logo img {
    height: 60px;          /* Chiều cao cố định (Bạn có thể chỉnh 50px - 80px tùy ý) */
    width: auto;           /* Chiều rộng tự động theo tỉ lệ ảnh -> KHÔNG BỊ MÉO */
    object-fit: contain;   /* Đảm bảo ảnh hiển thị trọn vẹn */
    display: block;        /* Xóa khoảng trắng thừa dưới chân ảnh */
}

/* 3. Đảm bảo thanh Logo_TimKiem căn giữa mọi thứ */
.logo_timkiem {
    display: flex;
    align-items: center;   /* Căn giữa logo, menu và thanh tìm kiếm theo chiều dọc */
    justify-content: space-between;
    padding: 10px 20px;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
}
/* Container Menu phụ */
.logo_timkiem .menu2 {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    
    /* TẠO KHOẢNG CÁCH RÕ RÀNG GIỮA CÁC MỤC MENU */
    gap: 18px; 
    
    /* Cho phép menu này chiếm không gian linh hoạt nhưng không quá rộng */
    flex-grow: 1; 
}

/* Các liên kết trong Menu */
.logo_timkiem .menu2 li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    white-space: nowrap; /* Ngăn chữ menu bị xuống dòng */
    transition: color 0.2s;
}

.logo_timkiem .menu2 li a:hover {
    color: #007bff;
}


.menu2 {
    display: flex;
    gap: 20px;
    list-style: none;
}

.menu2 li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 10px;
    background: pink;
    box-shadow: 0 2px 5px rgb(255, 218, 218);
    transition: 0.3s;
}

.menu2 li a:hover {
    background: #ff4da6;
}

/* SEARCH */
.search {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search input {
    padding: 5px 10px;
    border-radius: 20px 0 0 20px;
    border: 1px solid #ccc;
}

.search button {
    padding: 5px 10px;
    border-radius: 0 20px 20px 0;
    border: none;
    background: #ff4da6;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Nút đăng nhập/đăng ký */
.auth-buttons {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.auth-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    background: white;
    color: #ff4da6;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    font-size: 14px;
}

.auth-btn:hover {
    background: #ff4da6;
    color: white;
}

/* User info khi đã đăng nhập */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-name {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 180px;
    z-index: 100;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
    border-bottom: 1px solid #eee;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f5f5f5;
    color: #ff4da6;
}

.banner {
    position: relative;
    width: 100%;
    
    /* Kích thước ảnh banner */
    height: 400px; /* Chiều cao cố định */
    background-image: url('../img/banner.jpg');
    background-size: cover;
    background-position: center;
}

.banner-text {
    /* Căn giữa tuyệt đối */
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    
    /* Thiết kế chữ nổi bật */
    text-align: center;
    color: white; 
    width: 80%;
    
    /* Nền mờ cho chữ dễ đọc hơn */
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 20px 30px;
    border-radius: 8px;
}

.banner-text h2, 
.banner-text p {
    margin: 0; /* Loại bỏ margin mặc định để căn giữa chính xác */
    /* Thêm bóng cho chữ để rõ hơn nữa */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.banner-text h2 {
    font-size: 2.5em; 
}
.tongquan {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 50px auto;
}

.vietsach {
    max-width: 800px;
    flex: 2;
    margin: 50px auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
}

.vietsach h2 {
    text-align: center ;
    margin-bottom: 20px;
}

.vietsach form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.vietsach form input,
.vietsach form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Trong file css/vietsach.css, tìm và sửa */

.vietsach form button {
    display: block;
    margin: 20px auto 0;
    padding: 10px 30px;
    border: none;
    /* Đổi màu từ xanh dương sang hồng */
    background-color: #f781bc; 
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold; /* Thêm để nổi bật */
    transition: background-color 0.3s;
}

.vietsach form button:hover {
    /* Đổi màu hover */
    background-color: #ff4da6;
}

.vietsach form textarea {
    width: 100%;
    padding: 15px;
    margin-top: 5px;
    border-radius: 12px;
    border: 2px solid #ccc;
    resize: vertical; /* người dùng chỉ kéo cao/thấp, không ngang */
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    transition: border 0.3s, box-shadow 0.3s;
}

.vietsach form textarea:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 8px rgba(30,144,255,0.3);
    outline: none;
    background-color: #fffbea;
}
.vietsach form input[type="file"] {
    margin-top: 5px;
    margin-bottom: 15px;
}
.nguoikhac-cuaban {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 20px;
    margin: auto;
}
.nguoikhac-cuaban .cuaban,
.nguoikhac-cuaban .nguoikhac {
    flex: 1; /* chiếm 50% chiều cao của cột phải */
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nguoikhac-cuaban .cuaban:hover,
.nguoikhac-cuaban .nguoikhac:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-color: #ffe6f0;
}

.nguoikhac-cuaban h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.nguoikhac-cuaban p {
    font-size: 16px;
    text-align: center;
    color: #555;
    margin: auto;
}