* {
    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; 
}

/* CATEGORY GRID */
.cactheloai {
    width: 80%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-gap: 25px;
    padding-bottom: 40px;
    margin-top: 50px;
}

.theloai {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 10px #ddd;
    cursor: pointer;
    transition: 0.3s;
    border-left: 6px solid #ff4da6;
}

.theloai:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 16px #ccc;
}

.theloai h3 {
    font-size: 22px;
    color: rgb(248, 118, 140);
}

.theloai p {
    margin-top: 10px;
    color: rgb(0, 0, 0);
    line-height: 1.4;
}
.theloai a{
    text-decoration: none;
}


/* Hiệu ứng cho thể loại */
.theloai {
    cursor: pointer;
    transition: all 0.3s ease;
}

.theloai:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Container sản phẩm */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.modal-review {
    /* Mặc định ẩn modal */
    display: none; 
    position: fixed;
    z-index: 1000; /* Đảm bảo modal nằm trên tất cả */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* Nền mờ */
}

.modal-content {
    background-color: #ffffff; /* Nền trắng sạch */
    margin: 5% auto; 
    padding: 30px; /* Tăng padding để nội dung có không gian thở */
    border: none;
    border-radius: 12px; /* Bo tròn góc nhiều hơn */
    width: 90%; 
    max-width: 650px; /* Giảm chiều rộng tối đa, tập trung vào nội dung */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); /* Đổ bóng mạnh hơn để tạo chiều sâu */
    position: relative;
    /* Hiệu ứng trượt vào */
    animation: slideIn 0.3s ease-out; 
}

/* Thêm hiệu ứng trượt vào (tuỳ chọn) */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #333;
    border-bottom: 2px solid #f781bc; /* Đường kẻ dưới tiêu đề */
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
}

/* Hiệu ứng mờ dần */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================================== */
/* 2. CSS CHO NGÔI SAO (Như hướng dẫn trước) */
/* ==================================== */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center; /* Đưa ngôi sao ra giữa form */
    margin: 15px 0 25px 0; /* Khoảng cách trên dưới rộng hơn */
}

.rating-stars .star {
    font-size: 40px; /* Ngôi sao to hơn, dễ click hơn */
    color: #e0e0e0; /* Màu xám nhạt mặc định */
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    margin: 0 3px; /* Tạo khoảng cách giữa các ngôi sao */
}

.rating-stars .star:hover,
.rating-stars .star:hover ~ .star,
.rating-stars .star.rated {
    color: #ffc107; /* Màu vàng nổi bật */
}

.rating-stars .star:active {
    transform: scale(0.95); /* Hiệu ứng nhấn xuống khi click */
}
.review-btn {
    background-color: #f781bc; /* Màu nền hồng chủ đạo của Rebook */
    color: white;
    border: none;
    border-radius: 5px; /* Bo tròn góc */
    padding: 8px 15px; /* Kích thước nút */
    font-size: 14px;
    font-weight: 600; /* Chữ đậm hơn */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Hiệu ứng chuyển động */
    margin-left: 10px; /* Khoảng cách với nút bên cạnh */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Đổ bóng nhẹ */
    display: inline-flex; /* Để căn giữa icon và text */
    align-items: center; /* Căn giữa theo chiều dọc */
    justify-content: center; /* Căn giữa theo chiều ngang */
    gap: 5px; /* Khoảng cách giữa icon và text */
}

.review-btn:hover {
    background-color: #e56fa5; /* Màu hồng đậm hơn khi di chuột qua */
    transform: translateY(-2px); /* Nút nhấc lên một chút */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Đổ bóng đậm hơn */
}

.review-btn:active {
    background-color: #c95c8e; /* Màu đậm hơn khi click */
    transform: translateY(0); /* Nút trở về vị trí ban đầu */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Điều chỉnh nếu bạn muốn icon ngôi sao có màu riêng */
.review-btn span.star-icon {
    color: #ffd700; /* Màu vàng cho ngôi sao */
}
.submit-review textarea {
    padding: 15px;
    margin: 15px 0;
    min-height: 120px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Bo tròn góc */
    width: 100%; /* Đảm bảo chiếm hết chiều ngang */
    box-sizing: border-box; /* Quan trọng để padding không làm tăng chiều rộng */
    resize: vertical; /* Chỉ cho phép kéo dãn theo chiều dọc */
    font-size: 16px;
}

.submit-review button[type="submit"] {
    padding: 12px 25px;
    background-color: #f781bc;
    color: white;
    border: none;
    border-radius: 25px; /* Bo tròn hoàn toàn (Pill shape) */
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
    max-width: 200px; /* Giới hạn chiều rộng nút */
    align-self: flex-start; /* Nút nằm ở bên trái (nếu form là flex) */
    margin: 10px auto 0; /* Đưa nút ra giữa */
}

.submit-review button[type="submit"]:hover {
    background-color: #e56fa5;
    transform: translateY(-1px);
}
#reviewsList {
    margin-top: 25px;
    max-height: 300px; /* Giới hạn chiều cao */
    overflow-y: auto; /* Thêm thanh cuộn nếu quá dài */
    padding-right: 15px; /* Khoảng cách cho thanh cuộn */
}

.review-item {
    background-color: #f9f9f9; /* Nền xám nhạt cho mỗi đánh giá */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 5px solid #f781bc; /* Đường kẻ nổi bật bên trái */
}

.review-item .reviewer-info {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Đưa tên người dùng và sao ra hai bên */
    margin-bottom: 8px;
    font-size: 15px;
}

.review-item .review-rating {
    /* Đảm bảo sao vàng trong danh sách hiển thị đúng */
    font-size: 14px;
    display: inline-block;
}

.review-item p {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
}

.review-item .review-date {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
    text-align: right;
}