
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.danhsach {
    margin-right: auto;
    margin-left: auto;
    padding-left: 1px;
    padding-right: 1px;

}


.col-xs-2, .col-xs-3, .col-xs-7, .col-xs-12 {
    position: relative;
    min-height: 1px;
    padding-left: 5px;
    padding-right: 5px;
}
.col-xs-2, .col-xs-3, .col-xs-7, .col-xs-12 {
    float: left;
}
.col-xs-12 {
    width: 99%;
}
.col-xs-7 {
    width: 81%;
}

.col-xs-3 {
    width: 18%;
	display: flex; /* Kích hoạt Flexbox */
    justify-content: center; /* Canh giữa theo chiều ngang */
    align-items: center; /* Canh giữa theo chiều dọc */
    height: 180px; /* Có thể thay đổi theo nhu cầu, ví dụ 300px */
}

* {
    margin: 0;
}

#list-page {
    text-align: left;
    font-size: 18px;
}
.list {
    display: table;
    
}



.list {
    display: flex; /* Sử dụng flexbox */
    flex-wrap: wrap; /* Cho phép phần tử xuống dòng nếu cần */
    justify-content: flex-start; /* Căn chỉnh phần tử sang trái */
}

.list>.row {
	margin-left: auto;
    display: table-row;
	padding: 9px 3px;
    object-fit: cover;
    border-radius: 10px; /* Bo tròn các góc */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Đổ bóng cho hiệu ứng nổi */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hiệu ứng chuyển đổi khi hover */
	margin: 10px;
}

#list-page .list>.row>div {
    height: 90px;
    line-height: 20px;
    display: table;
    table-layout: fixed;
    border-left: 0;
    white-space: normal;
    padding-left: 10px;
    padding-right: 10px
}

#list-page .list>.row>div>div>.truyen-title {
    font-weight: bold;
    font-size: 18px;
	line-height: 1.8;
    margin-top: 0;
    margin-bottom: 10px;
	font-family: music;
}
#list-page .list>.row>div>div>.author {
    font-size: 18px;
    display: block;
	margin-left: auto; 
    text-align: right;
    font-family: tacgiavn;
	color:#666633; 
	
    
	
}

.list>.row>div:first-child {
    border-left: 0;
    padding-left: 0;
}
.list>.row>div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label-title {
    padding: 1px 3px;
    font-size: 12px;
    vertical-align: bottom;
    margin-left: 1px;
}
.totalchuong {
    font-size: 12px;
    display: block;
	margin-left: auto; /* Đẩy tác giả sang phải */
    /*white-space: nowrap; /* Giữ tác giả trên một dòng */
    text-align: right;
    overflow: hidden;
	text-overflow: ellipsis;
	
}
.label-t {
    padding: 1px 3px;
    font-size: 13px;
    vertical-align: bottom;
    margin-left: 5px;
	display: inline-block; /* Đảm bảo phần tử hiển thị đúng */
    box-sizing: border-box; /* Tính toán kích thước chính xác */
}
.label-theloai {
    border: 1px solid #86ad86;
    color: #86ad86;
    margin: 1px;
    display: inline-block; /* Đảm bảo phần tử hiển thị đúng */
    box-sizing: border-box; /* Tính toán kích thước chính xác */
	white-space: nowrap;
}

.label-scan {
    border: 1px solid #FD8383;
    color: #FD8383;
    margin: 1px;
    display: inline-block; /* Đảm bảo phần tử hiển thị đúng */
    box-sizing: border-box; /* Tính toán kích thước chính xác */
	white-space: nowrap;
}

.label-time {
    border: 1px solid #8EB3FD;
    color: #8EB3FD;
    margin: 1px;
    display: inline-block; /* Đảm bảo phần tử hiển thị đúng */
    box-sizing: border-box; /* Tính toán kích thước chính xác */
	white-space: nowrap;
}
.button_theloai {
	display: inline-block; /* Đảm bảo phần tử hiển thị đúng */
    box-sizing: border-box; /* Tính toán kích thước chính xác */
	white-space: nowrap;
    background-color: #d1d4ca; /* Nền tối */
    color: #fff; /* Chữ màu sáng */
	font-size: 12px;
    font-weight: bold; /* Chữ dày */
    padding: 3px 6px;
	margin: 5px;
    border: 2px;
    border-radius: 5px;
    border-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Tăng độ đổ bóng để viền nổi bật hơn */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hiệu ứng chuyển đổi khi hover */
    cursor: pointer;
}

.button_theloai:hover {
    background-color: #fff; /* Đổi màu khi di chuột */
	color: #86ad86;
}

.img-rounded {
    height: 154px;
    object-fit: cover;
    border-radius: 5px; /* Bo tròn các góc */
	border: 3px;
	border-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Tăng độ đổ bóng để viền nổi bật hơn */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hiệu ứng chuyển đổi khi hover */
}

.img-rounded:hover {
    transform: scale(1.8); /* Hiệu ứng zoom in khi hover */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); /* Tăng thêm độ đổ bóng khi hover để viền nổi bật hơn */
}

.rating-container {
	all: unset;  
    display: flex !important;;                 /* Sử dụng flexbox để đặt phần tử ngang nhau */
    align-items: center !important;;           /* Căn giữa các phần tử theo chiều dọc */
    justify-content: flex-start !important;;   /* Đảm bảo các phần tử được căn đều từ bên trái */
    gap: 18px;                     /* Khoảng cách giữa số lần và hình ảnh */
    padding: 5px;
    border: 1px solid #ccc;        /* Viền cho container */
    border-radius: 5px;            /* Bo tròn các góc viền */
    background-color: #f9f9f9;     /* Nền nhạt */
    max-width: 200px;              /* Đặt giới hạn chiều rộng nếu cần */
    white-space: nowrap !important;;           /* Đảm bảo không xuống dòng */
}

.sosao-image {
all: unset;  
  margin: 4px auto;
  height: 18px;
  clear: both;
  display: inline-block !important;; 
}

.solan {
	all: unset;  
    display: inline-block !important;;          /* Đảm bảo số lần nằm trên 1 hàng */
    padding: 2px 8px;              /* Tạo khoảng trống xung quanh số lần */
    font-weight: bold;             /* Làm đậm chữ */
    background-color: #fff;        /* Nền trắng cho số lần */
    border-radius: 3px;            /* Bo tròn góc viền số lần */
    white-space: nowrap !important;;           /* Không xuống dòng nếu quá dài */
}

.sao-image {
  background-repeat: no-repeat;
  background-position: center left;
  margin: 4px auto;
  height: 18px; /* Thay đổi chiều cao ở đây */
  width: auto; /* Thêm chiều rộng nếu cần */
  clear: both;
  background-size: contain; /* Thử tiếp tục với contain */
}

a {
    color: #8B4513; /* Màu nâu cho chữ */
    text-decoration: none; /* Bỏ gạch chân liên kết */
    transition: color 0.3s ease; /* Hiệu ứng chuyển màu cho chữ */
}

a:hover {
    color: #D2B48C; /* Màu nâu nhạt khi hover */
}
.chuthuong {
			text-transform: lowercase;
            
        }
.viethoachu {
			
            text-transform: capitalize; /* Viết hoa chữ cái đầu tiên của mỗi từ */
        }
/* Thiết lập layout cho màn hình nhỏ (mobile) */
@media (max-width: 768px) {
  .col-xs-12 {
    width: 100%;
}
  .col-xs-7 {
    width: 70%;
}

.col-xs-3 {
    width: 30%;
}

    .img-rounded {
        height: 154px; /* Chiều cao cố định nhỏ hơn trên màn hình nhỏ */
        max-width: 108px; /* Giảm kích thước chiều rộng hơn nữa */
    }

}

/* Hiển thị tốt trên màn hình rất nhỏ (smartphone) */
@media (max-width: 576px) {
 .col-xs-12 {
    width: 100%;
}
 .col-xs-7 {
    width: 63%;
}

.col-xs-3 {
    width: 36%;
}
    .img-rounded {
        height: 154px; /* Chiều cao cố định nhỏ hơn trên màn hình nhỏ */
        max-width: 90px; /* Giảm kích thước chiều rộng hơn nữa */
    }
#list-page {
    text-align: center;
    font-size: 18px;
}
.list>.row {
	margin: 1px;
}
#list-page .list>.row>div {
    padding-left: 1px;
    padding-right: 1px
}
#list-page .list>.row>div>div>.author {
    font-size: 18px;
    display: block;
	text-align: center;
    overflow: hidden;
	font-family: tacgiavn;
    text-overflow: ellipsis;
	
}
.totalchuong {text-align: center;}

.img-rounded {
        height: 160px; /* Chiều cao cố định nhỏ hơn trên màn hình nhỏ */
        max-width: 80px; /* Giảm kích thước chiều rộng hơn nữa */
}
#list-page .list>.row>div>div>.truyen-title {
    font-weight: bold;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
	font-family: nguechngoac;
}
}
/* =====================
     Pagination (matches RenderPagination in .cs)
  ===================== */
  .pagination-container { display: flex !important; align-items: center !important; justify-content: center !important; flex-wrap: wrap !important; gap: 6px !important; margin: 15px 0 !important; }
  
  .page-btn, .page-number, .current-page, .page-btn-disabled {
    padding: 6px 10px !important;
    border: 1px solid #DAA520 !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    transition: all .2s !important;
    cursor: pointer !important;
  }
  
  .page-btn, .page-number { background: #ececc7 !important; color: #6b5a32 !important; border-color: #DAA520 !important; }
  .page-btn:hover, .page-number:hover { background: #bcbf9b !important; border-color: #B8860B !important; }
  .current-page { background: #b9ad90 !important; color: #fff !important; border-color: #B8860B !important; cursor: default !important; }
  .page-btn-disabled { background: #F5F5F5 !important; color: #999 !important; border-color: #CCC !important; cursor: not-allowed !important; }
  
  .goto-container { text-align: center !important; margin-top: 10px !important; width: 100% !important; display: block !important; }
  .page-input { padding: 5px 10px !important; border: 1px solid #DAA520 !important; border-radius: 4px !important; width: 100px !important; font-size: 12px !important; margin-right: 5px !important; text-align: center; }
  .goto-btn { padding: 5px 12px !important; border: 1px solid #B8860B !important; border-radius: 4px !important; background: #b9bd90 !important; color: #fff !important; font-weight: 700 !important; cursor: pointer !important; font-size: 12px !important; transition: background .2s !important; }
  .goto-btn:hover { background: #A52A2A !important; }
  
  .flex-center { display: flex; justify-content: center; }
  .flex-align-center { display: flex; align-items: center; }
  
  /* Optional page-numbers (static text block under pagination) */
  .page-numbers { font-size: .95rem; color: #555; }
  .pagination-wrapper {
    clear: both;
    width: 100%;
    margin-top: 20px;
    text-align: center;
}
/* Khối sidebar chung */
.sidebar-block {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f1f3ee;
    border: 2px solid #ddd;
    border-radius: 5px;
}

/* Tiêu đề khối */
.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ccc;
    color: #333;
}

/* Danh sách truyện */
.truyen-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.truyen-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.truyen-thumb img {
    width: 50px;
    height: 65px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #ccc;
}

.truyen-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Tên truyện trong sidebar */
.sidebar-block .truyen-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0066cc;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 2px;
    transition: color .25s ease, transform .25s ease, text-shadow .25s ease, background-size .25s ease;
    
    /* Gạch chân trượt khi hover */
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
}

/* Hover/focus: đổi màu, trượt nhẹ sang phải, gạch chân xuất hiện */
.sidebar-block .truyen-title:hover,
.sidebar-block .truyen-title:focus-visible {
    color: #004a99;
    transform: translateX(2px);
    text-shadow: 0 1px 0 rgba(0,0,0,0.05);
    background-size: 100% 1px;
    outline: none;
}

/* Đồng bộ: hover cả item thì tiêu đề cũng hiệu ứng (khi rê lên ảnh) */
.sidebar-block .truyen-item:hover .truyen-title {
    color: #004a99;
    transform: translateX(2px);
    background-size: 100% 1px;
}


.truyen-stars img {
    height: 14px;
    margin-bottom: 2px;
}

.truyen-views {
    font-size: 12px;
    color: #777;
}
.truyen-meta {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

.truyen-meta .icon {
    margin-right: 3px;
}
/* Áp dụng riêng cho ảnh nhỏ trong sidebar */
.sidebar-block .truyen-thumb img {
    width: 50px;
    height: 65px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #ccc;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-origin: left center; /* điểm xoay ở cạnh trái */
}

/* Hiệu ứng nghiêng sang trái khi hover */
.sidebar-block .truyen-thumb img:hover {
    transform: perspective(400px) rotateY(-15deg) scale(1.05);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
}
.img-ebook {
    display: block;          /* biến ảnh thành block để margin auto hoạt động */
    margin-left: auto;       /* căn giữa ngang */
    margin-right: auto;      /* căn giữa ngang */
    margin-bottom: 18px;      /* khoảng cách với phần bên dưới */
    margin-top: 18px;
}

