body.is-dark a {
  color: #e4e4e4;
  transition: color 0.3s ease;
}

.novel-title {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #2160c4;
  text-decoration: none;
  transition: color 0.2s;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  
}

body.is-dark input::placeholder {
color: #e4e4e4;
}
body .has-text-info{
color: #ffe08a!important;
}
@media (max-width: 1025px) {
body .has-text-info,body .has-text-warning{
  color: #ffe08a!important;
  font-size: 1.3rem;
}
.language-toggle .fa-globe-asia{
  font-size: 1.3rem;
}
}
.dark-mode-toggle {
cursor: pointer;
}
.hero-body {
padding: 2rem 1.5rem;
}
.card {
height: 100%;
display: flex;
flex-direction: column;
}
.card-content {
flex-grow: 1;
padding: 0.75rem;
display: flex;
flex-direction: column;
}
.novel-card .card-image {
width: 100%;
height: auto;
position: relative;
overflow: hidden;
}
.novel-card .image {
width: 100%;
height: 180px;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
overflow: hidden;
}
.novel-card .image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
background: #fff;
}
.novel-card .card-content {
flex-grow: 1;
padding: 0.75rem;
display: flex;
flex-direction: column;
}
.novel-card .title {
font-size: 1.1rem;
margin-bottom: 0.4rem;
line-height: 1.3;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.novel-card .subtitle {
font-size: 0.85rem;
line-height: 1.3;
margin-bottom: 0.5rem;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
color: #666;
}
.novel-card .progress {
position: absolute;
top: 10px;
right: 10px;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.9);
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 0.8rem;
z-index: 2;
}
.novel-card .status {
position: absolute;
top: 10px;
left: 10px;
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.7rem;
z-index: 2;
}
.ongoing {
background-color: #23d160;
color: white;
}
.completed {
background-color: #ffdd57;
color: #363636;
}
.novel-card .cultivation-level {
position: absolute;
top: 10px;
right: 10px;
background: #ff9f43;
color: #fff;
padding: 0.3rem 0.8rem;
border-radius: 4px;
font-size: 0.7rem;
font-weight: bold;
z-index: 2;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.section-title {
margin-bottom: 1.5rem;
position: relative;
display: flex;
align-items: center;
}
.section-title::after {
content: '';
flex-grow: 1;
height: 1px;
background-color: #dbdbdb;
margin-left: 1rem;
margin-right: 0;
}
section:not(.genres-section):not(.announcement-section):not(.recent-updates-section) .section-title::after {
display: none;
}

body.is-dark .section-title::after {
background-color: #333;
}
.genre-card {
height: 100px;
display: flex;
align-items: center;
justify-content: center;
background-size: cover;
background-position: center;
border-radius: 6px;
color: white;
font-weight: bold;
text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
transition: transform 0.3s;
}
.genre-card:hover {
transform: scale(1.05);
}
.announcement-card {
border-left: 4px solid #3273dc;
}
body.is-dark {
background-color: #1a1a1a;
color: #e4e4e4;
}
body.is-dark .navbar {
background-color: transparent !important;
border-bottom: 1px solid #2c2c2c;
}
body.is-dark .navbar-item, 
body.is-dark .navbar-link {
color: #f5f5f5 !important;
}
body.is-dark .navbar-item:hover,
body.is-dark .navbar-link:hover {
background-color: #2a2a2a !important;
color: #ffffff !important;
}
body.is-dark .navbar-dropdown {
background-color: #1a1a1a;
border-top: 1px solid #333;
}
body.is-dark .navbar-dropdown .navbar-item:hover {
background-color: #2a2a2a;
}
body.is-dark .card {
background-color: #1e1e1e;
color: #f5f5f5;
}
body.is-dark .title,
body.is-dark .subtitle {
color: #f5f5f5;
}
body.is-dark .completed {
background-color: #ffdd57;
color: #1a1a1a;  /* Darker text for better contrast on yellow background */
}
body.is-dark .novel-card .subtitle {
color: #d4d4d4;  /* Lighter gray for better readability */
}
body.is-dark .card-footer-item {
color: #e4e4e4;  /* Brighter text for footer items */
}
body.is-dark .section-title {
color: #f5f5f5;  /* Bright white for section titles */
}
body.is-dark .tabs a {
color: #d4d4d4;  /* Lighter color for tab text */
}
body.is-dark .tabs li.is-active a {
color: #7cb3ff;  /* Brighter blue for active tab */
border-bottom-color: #7cb3ff;
}
body.is-dark .button.is-light {
background-color: #333;
color: #f5f5f5;
}
body.is-dark .button.is-primary {
background-color: #375a7f;
}
body.is-dark .button.is-primary.is-outlined {
background-color: transparent;
border-color: #375a7f;
color: #f5f5f5;
}
body.is-dark .section-title::after {
background-color: #333;
}
body.is-dark input.input {
background-color: #2a2a2a;
color: #f5f5f5;
border-color: #444;
}
body.is-dark .footer {
background-color: #1a1a1a;
color: #f5f5f5;
}

/* Skeleton loading styles */
.skeleton {
animation: skeleton-loading 1s linear infinite alternate;
border-radius: 4px;
}
.skeleton-image {
height: 180px;
background-color: #e2e2e2;
}
.skeleton-title {
height: 20px;
margin-bottom: 10px;
width: 80%;
background-color: #e2e2e2;
}
.skeleton-text {
height: 14px;
margin-bottom: 8px;
background-color: #e2e2e2;
}
.skeleton-text:last-child {
width: 60%;
}

@keyframes skeleton-loading {
0% {
  opacity: 0.7;
}
100% {
  opacity: 1;
}
}

/* Dark mode skeleton */
body.is-dark .skeleton-image,
body.is-dark .skeleton-title,
body.is-dark .skeleton-text {
background-color: #333;
}
.footer a {
  color: #4a4a4a;
}
body.is-dark .footer a {
color: #e4e4e4;
}
.footer a {
color: #4a4a4a;
}

.lazyload,
.lazyloading {
opacity: 0;
}
.lazyloaded {
opacity: 1;
transition: opacity 300ms;
}

/* Màu sắc biểu tượng thanh điều hướng */
.navbar-item .icon.has-text-primary {
color: hsl(171, 100%, 41%) !important;
}
.navbar-item .icon.has-text-info {
color: hsl(204, 86%, 53%) !important;
}
.navbar-item .icon.has-text-warning {
color: hsl(48, 100%, 67%) !important;
}
.navbar-item .icon.has-text-danger {
color: hsl(348, 100%, 61%) !important;
}
.navbar-item .icon.has-text-success {
color: hsl(141, 71%, 48%) !important;
}

/* Tối ưu hóa kiểu thanh điều hướng */
.navbar {
box-shadow: none;
border-bottom: 1px solid #f5f5f5;
}

.navbar-item {
transition: all 0.3s ease;
color: #4a4a4a;
font-weight: bold;
}

.navbar-item:hover {
color: #3273dc;
background-color: transparent !important;
}

.navbar-item .icon {
margin-right: 0.5rem;
}

/* Ghi đè kiểu thanh tìm kiếm */
.search-wrapper {
position: relative;
margin: 0 1rem;
}

.search-wrapper .control {
width: 100%;
}

.search-wrapper .input {
width: 100%;
height: 2.5em;
padding: 0.5em 1em 0.5em 2.5em;
border: 1px solid #dbdbdb;
border-radius: 50px;
background-color: #f5f5f5;
transition: all 0.3s ease;
font-size: 0.95rem;
}

.search-wrapper .input:focus {
border-color: #3273dc;
background-color: white;
box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.15);
}

.search-wrapper .icon {
position: absolute;
left: 1em;
top: 50%;
transform: translateY(-50%);
color: #7a7a7a;
width: 1em;
height: 1em;
pointer-events: none;
transition: color 0.3s ease;
}

.search-wrapper .input:focus + .icon {
color: #3273dc;
}

/* Thanh tìm kiếm chế độ tối */
body.is-dark .search-wrapper .input {
background-color: #2a2a2a;
border-color: #2a2a2a;
color: #e4e4e4;
}

body.is-dark .search-wrapper .input:focus {
border-color: #375a7f;
background-color: #333;
box-shadow: 0 0 0 0.125em rgba(55, 90, 127, 0.25);
}

body.is-dark .search-wrapper .input:focus + .icon {
color: #375a7f;
}

.language-selector {
display: flex;
align-items: center;
padding: 0.5rem;
color: #4a4a4a;
transition: all 0.3s ease;
}

.language-selector .icon {
color: #3273dc;
margin-right: 0.5rem;
font-size: 1rem;
}

.language-selector:hover {
background-color: #f5f5f5;
}

body.is-dark .language-selector {
color: #e4e4e4;
}

body.is-dark .navbar-dropdown {
background-color: #1a1a1a;
border-top: 1px solid #333;
}

body.is-dark .navbar-dropdown .navbar-item:hover {
background-color: #2a2a2a;
}

body.is-dark .card {
background-color: #1e1e1e;
color: #f5f5f5;
}

body.is-dark .title,
body.is-dark .subtitle {
color: #f5f5f5;
}

body.is-dark .button.is-light {
background-color: #333;
color: #f5f5f5;
}

body.is-dark .button.is-primary {
background-color: #375a7f;
}

body.is-dark .button.is-primary.is-outlined {
background-color: transparent;
border-color: #375a7f;
color: #f5f5f5;
}

body.is-dark .section-title::after {
background-color: #333;
}

body.is-dark input.input {
background-color: #2a2a2a;
color: #f5f5f5;
border-color: #444;
}

body.is-dark .footer {
background-color: #1a1a1a;
color: #f5f5f5;
}

a {
transition: color 0.3s ease;
}

a:hover {
color: #2160c4;
}

.card-footer-item {
color: #4a4a4a;
font-weight: 500;
}

.card-footer-item:hover {
color: #3273dc;
background-color: rgba(50, 115, 220, 0.05);
}

body.is-dark .navbar-link:hover,
body.is-dark .navbar-link.is-active {
background-color: #2c2c2c !important;
color: #ffffff !important;
}

body.is-dark .navbar-item.has-dropdown:hover .navbar-link,
body.is-dark .navbar-item.has-dropdown.is-active .navbar-link {
background-color: #2c2c2c !important;
color: #ffffff !important;
}

body.is-dark .navbar-dropdown {
background-color: #1a1a1a;
border: 1px solid #2c2c2c;
}

body.is-dark .navbar-dropdown .navbar-item {
color: #e4e4e4 !important;
}

body.is-dark .navbar-dropdown .navbar-item:hover {
background-color: #2c2c2c !important;
color: #ffffff !important;
}

.section:first-of-type {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
.section:first-of-type .columns {
margin-top: 0;
}

.column.is-6-desktop .novel-card {
height: 340px;
}
.column.is-6-desktop .novel-card .title {
font-size: 1.2rem;
-webkit-line-clamp: 1;
}
.column.is-6-desktop .novel-card .subtitle {
-webkit-line-clamp: 1;
}

body.is-dark .novel-card .subtitle {
color: #b5b5b5;
}
body.is-dark .card-footer {
border-top: 1px solid #2c2c2c;
}

.card-content .title:not(.is-spaced)+.subtitle {
margin-top: 0 !important;
}

.section .container .tabs {
margin-bottom: 0;
}
.tabs li a {
cursor: pointer;
padding: 0.5em 1em;
border-bottom: 2px solid transparent;
transition: all 0.3s ease;
}
.tabs li.is-active a {
border-bottom-color: #3273dc;
color: #3273dc;
}
.tab-content .tab-pane {
display: none;
}
.tab-content .tab-pane.is-active {
display: block;
animation: fadeIn 0.5s;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

body.is-dark .tabs li.is-active a {
border-bottom-color: #375a7f;
color: #5c9ce6;
}

.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
padding: 0;
}

.section-title {
margin: 0 !important;
flex: 1;
padding: 0;
display: flex;
align-items: center;
}

/* Only show line for specific sections */
.genres-section .section-title::after,
.announcement-section .section-title::after,
.recent-updates-section .section-title::after {
content: '';
flex-grow: 1;
height: 1px;
background-color: #dbdbdb;
margin-left: 1rem;
margin-right: 0;
}

body.is-dark .genres-section .section-title::after,
body.is-dark .announcement-section .section-title::after,
body.is-dark .recent-updates-section .section-title::after {
background-color: #333;
}

.section-controls {
display: flex;
align-items: center;
z-index: 1;
padding: 0;
margin-left: 0;
}

.section-controls .tabs {
margin: 0 1rem 0 0;
}

.section-controls .tabs ul {
border-bottom: none;
padding-left: 0; /* Remove left padding */
}

.tabs li a {
padding: 0.5em 1em;
border-bottom: 2px solid transparent;
transition: all 0.3s ease;
}

.tabs li.is-active a {
border-bottom-color: #3273dc;
color: #3273dc;
}

body.is-dark .section-title::after {
background-color: #333;
}

body.is-dark .tabs li.is-active a {
border-bottom-color: #375a7f;
color: #5c9ce6;
}

@media screen and (max-width: 768px) {
.section-header {
  flex-direction: column;
  align-items: flex-start;
}

.section-controls {
width: 100%;
  margin-top: 1rem;
}

.section-title {
  width: 100%;
}

.section-title::after {
  margin-right: 0;
}
}

.section-controls .slider-control {
display: flex;
margin-left: 10px;
}
.section-controls .tabs ul {
flex-wrap: nowrap;
/* The tabs need to be scrollable horizontally on mobile */
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
}
.novel-slider {
position: relative;
width: 100%;
overflow: hidden;
}

.novel-slider-container {
width: 100%;
overflow: hidden;
padding-right: 15px;
}

/* Chỉ bật cuộn trên máy tính để bàn */
@media (min-width: 769px) {
.novel-slider-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.novel-slider-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
}

.novel-slider-track {
display: flex;
transition: transform 0.5s ease;
padding: 0;
padding-bottom: 3px;
}

.novel-slider-item {
flex: 0 0 25%;
min-width: 200px;
padding-right: 1.5rem;
box-sizing: border-box;
}

@media screen and (max-width: 768px) {
.novel-slider {
  overflow: hidden;
}

.novel-slider-container {
  overflow: hidden;
  padding-right: 10px;
}

.novel-slider-track {
  padding: 0;
}

.novel-slider-item {
  flex: 0 0 50%;
  min-width: 160px;
  padding-right: 1rem;
}
}

@media screen and (max-width: 480px) {
.novel-slider-item {
  flex: 0 0 80%;
  min-width: 220px;
  padding-right: 1rem;
}
}

/* Sửa căn chỉnh nội dung section */
.section .container {
padding-left: 15px;
padding-right: 15px;
overflow: hidden;
}
  @media screen and (max-width: 768px) {      .novel-slider {        margin: 0 -0.5rem;      }            .novel-slider-track {        padding: 0 0.5rem;      }            .novel-slider-item {        flex: 0 0 50%;        min-width: 160px;        padding: 0 0.5rem;      }            .section .container {        padding-left: 10px;        padding-right: 10px;      }    }        @media screen and (max-width: 480px) {      .novel-slider {        margin: 0 -0.5rem;      }            .novel-slider-item {        flex: 0 0 80%;        min-width: 220px;        padding: 0 0.5rem;      }    }

.section-header {
padding: 0;
margin-bottom: 1rem;
}

.section-title {
margin-bottom: 0.75rem !important;
}
.card {
margin-bottom: 0.75rem;
}

section.section.announcement-section,    
section.section.genres-section,    
section.section.recent-updates-section {      
padding: 1.5rem;
margin-bottom: 0;
}
body.is-dark section.section.announcement-section,
body.is-dark section.section.genres-section,
body.is-dark section.section.recent-updates-section {
background-color: #1e1e1e;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 768px) {
.section {
  padding: 1rem 0;
  margin-bottom: 0;
}

section.section.announcement-section,
section.section.genres-section,
section.section.recent-updates-section {
  padding: 1rem;
  margin-bottom: 0;
}

.section-header {
  margin-bottom: 0.75rem;
}

.section-controls {
  margin-top: 0.5rem;
}
}

.columns {
margin-top: -0.5rem !important;
margin-bottom: -0.5rem !important;
}
.column {
padding: 0.5rem;
}

.novel-slider {
margin-bottom: 0.5rem;
}
.novel-slider-item {
padding: 0.5rem;
}

.recent-updates-section .card {
margin-bottom: 0.5rem;
}

.genres-section .section-title,
.announcement-section .section-title,
.recent-updates-section .section-title {
margin-bottom: 2rem;
padding-bottom: 1rem;
}

body.is-dark .genres-section .section-title,
body.is-dark .announcement-section .section-title,
body.is-dark .recent-updates-section .section-title {
border-bottom-color: #2c2c2c;
}

.section::before,
.section:nth-child(2)::before,
.section:nth-child(3)::before {
display: none;
}

.section .container {
background-color: transparent;
}

body.is-dark .section .container {
background-color: transparent;
}

@media screen and (max-width: 768px) {
.navbar-menu {
position: absolute;
  width: 100%;
  background: inherit;
  box-shadow: 0 8px 16px rgba(10,10,10,.1);
}

.navbar-menu.is-active {
  display: block;
  padding: 0;
}

.navbar-item.has-dropdown {
  padding: 0;
}

.navbar-dropdown {
  display: none;
  position: static;
  padding: 0;
  border: none;
  box-shadow: none;
}

.navbar-item.has-dropdown.is-active .navbar-dropdown {
  display: block;
}

.navbar-item.has-dropdown:hover .navbar-dropdown {
  display: block;
}

.navbar-dropdown .navbar-item {
  padding-left: 1.5rem;
}

.search-wrapper {
  margin: 0.5rem;
  width: auto;
}

.search-wrapper .input {
  width: 100%;
}

.navbar-item.has-dropdown {
  display: block;
  width: 100%;
}

.navbar-link:not(.is-arrowless)::after {
  border-color: currentColor;
  right: 1.125em;
  z-index: 4;
}

.navbar-link {
  padding-right: 2.5em;
}

.container {
  padding: 0 15px;
}
.section .container {
  padding: 0 15px;
}

.novel-slider {
  margin: 0 -15px;
  padding: 0 15px;
  width: calc(100% + 30px);
}

.novel-slider-container {
  padding: 0;
}

.novel-slider-track {
  padding: 0;
}

.novel-slider-item {
  padding: 0 7.5px;
}

.section-header {
  padding: 0;
  margin-bottom: 1rem;
}

.section-controls {
  width: 100%;
  margin-top: 0.5rem;
}

.section-controls .tabs {
  margin-bottom: 0;
}

.section-controls .tabs ul {
  padding: 0;
  margin: 0;
}
}

body.is-dark .navbar-menu {
background-color: #1a1a1a;
border-bottom: 1px solid #2c2c2c;
}

body.is-dark .navbar-dropdown {
background-color: #1a1a1a;
}

body.is-dark .navbar-item.has-dropdown:hover .navbar-link {
background-color: #2c2c2c;
}

.section:nth-child(2) {
position: relative;
overflow: hidden;
}

.section:nth-child(2) .container {
position: relative;
z-index: 1;
background-color: rgba(255, 255, 255, 0.95);
border-radius: 8px;
}

body.is-dark .section:nth-child(2) .container {
background-color: rgba(30, 30, 30, 0.95);
}

.section:nth-child(2).is-loading {
opacity: 0.7;
pointer-events: none;
}

.section:nth-child(2).is-loading::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
}

.section:nth-child(2).is-loading::before {
content: 'Đang tải...';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 3;
font-size: 1.2rem;
color: #3273dc;
}

body.is-dark .section:nth-child(2).is-loading::after {
background: rgba(30, 30, 30, 0.8);
}

body.is-dark .section:nth-child(2).is-loading::before {
color: #5c9ce6;
}

.section:nth-child(3) {
padding-top: 2rem;
}

body.is-dark .section:nth-child(3) {
background-color: rgba(30, 30, 30, 0.95);
}

.section:nth-child(3) .container {
background-color: rgba(255, 255, 255, 0.95);
border-radius: 8px;
padding: 2rem;
}
body.is-dark .section:nth-child(3) .container {
background: none !important;
background-color: transparent !important;
}

body.is-dark .section:nth-child(3) .container[style] {
background: none !important;
background-color: transparent !important;
}

.section:first-of-type .container {
padding: 0 15px;
}

.section:first-of-type .columns {
margin: 0 -7.5px;
}

.section:first-of-type .column {
padding: 0 7.5px;
}

.section:first-of-type .novel-card {
margin: 0;
border-radius: 6px;
}

.section:first-of-type .container {
padding-left: 15px;
padding-right: 15px;
}

.section:first-of-type .columns.is-multiline {
margin-left: -7.5px;
margin-right: -7.5px;
}

.section:first-of-type .column.is-12.is-6-desktop,
.section:first-of-type .column.is-12.is-6-desktop.is-3-widescreen {
padding: 0 7.5px;
}

@media screen and (max-width: 768px) {
.section-controls .tabs {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding-bottom: 5px;
}

.section-controls .tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.section-controls .tabs ul {
  display: flex;
  flex-wrap: nowrap;
  padding-bottom: 5px;
  margin: 0;
  width: max-content;
}

.section-controls .tabs li {
  flex: 0 0 auto;
  white-space: nowrap;
}

.section-controls .tabs li a {
  padding: 0.5em 1em;
  display: block;
}

.section-controls {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-control {
  flex: 0 0 auto;
  display: flex;
  gap: 5px;
}
}

.novel-card .cultivation-level {
position: absolute;
top: 10px;
right: 10px;
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.7rem;
background-color: rgba(255, 255, 255, 0.9);
color: #333;
font-weight: bold;
z-index: 2;
}
.novel-stats span {
margin-right: 0.9em;
font-size: 0.9rem;
}
.tags:not(:last-child) {
margin-bottom: 0.4rem;
}

.section:first-of-type .novel-card .status {
top: 20px;
}

.section:first-of-type .novel-card .cultivation-level {
top: 20px;
}

.section:first-of-type .columns.is-multiline {
margin-left: -7.5px;
margin-right: -7.5px;
}

/* Novel grid layout */
.novel-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 10px;
width: 100%;
}

@media screen and (max-width: 1200px) {
.novel-grid {
  grid-template-columns: repeat(4, 1fr);
}
}

@media screen and (max-width: 900px) {
.novel-grid {
  grid-template-columns: repeat(3, 1fr);
}
}

@media screen and (max-width: 600px) {
.novel-grid {
  grid-template-columns: repeat(2, 1fr);
}
}

@media screen and (max-width: 400px) {
.novel-grid {
  grid-template-columns: 1fr;
}
}

/* Dark mode styles */
body.is-dark .novel-card {
background-color: #1e1e1e;
color: #f5f5f5;
}

body.is-dark .novel-card .image {
background: #2a2a2a;
}

body.is-dark .novel-card .subtitle {
color: #fff;
}

/* Novel list layout */
.novel-list {
margin-top: 2rem;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 2rem;
}
.novel-card {
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 16px rgba(0,0,0,0.04);
padding: 1.5rem 1.2rem;
display: flex;
gap: 1.2rem;
align-items: flex-start;
transition: box-shadow 0.3s, transform 0.3s;
}
.novel-card:hover {
box-shadow: 0 8px 32px rgba(50,115,220,0.08);
transform: translateY(-2px) scale(1.01);
}
.novel-cover {
width: 90px;
height: 120px;
object-fit: cover;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
background: #f0f4fa;
}

/* Default Novel Cover for Index Page */
.default-novel-cover-index {
width: 90px;
height: 120px;
position: relative;
border-radius: 6px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transform: perspective(800px) rotateY(-3deg);
box-shadow: 
  0 5px 15px rgba(0,0,0,0.3),
  0 0 0 1px rgba(255,255,255,0.1);
background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
}

.cover-background-index {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: 
  var(--cover-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%)),
  repeating-linear-gradient(
    45deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.1) 1px,
    rgba(255,255,255,0.1) 2px
  );
background-size: 200% 200%, 4px 4px;
animation: gradientShift 3s ease infinite;
}

.book-texture-index {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: 
  radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
  radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
z-index: 1;
pointer-events: none;
}

.book-spine-index {
position: absolute;
left: 0;
top: 0;
width: 3px;
height: 100%;
background: linear-gradient(90deg, 
  rgba(0,0,0,0.4) 0%, 
  rgba(0,0,0,0.2) 50%, 
  rgba(0,0,0,0.1) 100%);
z-index: 3;
border-radius: 1px 0 0 1px;
}

.book-pages-index {
position: absolute;
right: 0;
top: 0;
width: 2px;
height: 100%;
background: linear-gradient(90deg, 
  rgba(255,255,255,0.8) 0%, 
  rgba(255,255,255,0.4) 50%, 
  rgba(255,255,255,0.2) 100%);
z-index: 3;
border-radius: 0 1px 1px 0;
}

.cover-content-index {
position: relative;
z-index: 2;
text-align: center;
padding: 0.5rem;
color: white;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.book-icon-index {
font-size: 1.5rem;
margin-bottom: 0.5rem;
opacity: 0.9;
animation: float 3s ease-in-out infinite;
color: #ffffff;
}

.novel-title-on-cover-index {
font-size: 0.7rem;
font-weight: bold;
line-height: 1.2;
text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
word-wrap: break-word;
max-width: 100%;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.bookmark-index {
/* Position is now handled in the overflow fix section */
}

.bookmark-ribbon-index {
width: 4px;
height: 15px;
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
border-radius: 0 0 2px 2px;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
position: relative;
}

.bookmark-ribbon-index::before {
content: '';
position: absolute;
top: -4px;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-left: 2px solid transparent;
border-right: 2px solid transparent;
border-bottom: 4px solid #ff6b6b;
}

/* Different bookmark colors for index covers */
.default-novel-cover-index:nth-child(5n+1) .bookmark-ribbon-index {
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.default-novel-cover-index:nth-child(5n+1) .bookmark-ribbon-index::before {
border-bottom-color: #ff6b6b;
}

.default-novel-cover-index:nth-child(5n+2) .bookmark-ribbon-index {
background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.default-novel-cover-index:nth-child(5n+2) .bookmark-ribbon-index::before {
border-bottom-color: #74b9ff;
}

.default-novel-cover-index:nth-child(5n+3) .bookmark-ribbon-index {
background: linear-gradient(135deg, #55a3ff, #2d3436);
}

.default-novel-cover-index:nth-child(5n+3) .bookmark-ribbon-index::before {
border-bottom-color: #55a3ff;
}

.default-novel-cover-index:nth-child(5n+4) .bookmark-ribbon-index {
background: linear-gradient(135deg, #fd79a8, #e84393);
}

.default-novel-cover-index:nth-child(5n+4) .bookmark-ribbon-index::before {
border-bottom-color: #fd79a8;
}

.default-novel-cover-index:nth-child(5n+5) .bookmark-ribbon-index {
background: linear-gradient(135deg, #00b894, #00a085);
}

.default-novel-cover-index:nth-child(5n+5) .bookmark-ribbon-index::before {
border-bottom-color: #00b894;
}

/* Hover effects for index covers */
.default-novel-cover-index:hover {
transform: perspective(800px) rotateY(-5deg) scale(1.05);
box-shadow: 
  0 8px 25px rgba(0,0,0,0.4),
  0 0 0 1px rgba(255,255,255,0.15);
transition: all 0.3s ease;
}

/* Fix bookmark overflow on hover */
.default-novel-cover-index {
overflow: visible;
position: relative;
}

.default-novel-cover-index .bookmark-index {
overflow: visible;
position: absolute;
top: -5px;
right: 12px;
z-index: 5;
}

/* Ensure bookmark stays within bounds during hover */
.default-novel-cover-index:hover .bookmark-index {
top: -5px;
right: 12px;
}

/* Dark mode styles for index covers */
body.is-dark .cover-background-index {
background: 
  var(--cover-gradient-dark, linear-gradient(135deg, #2c3e50 0%, #34495e 100%)),
  repeating-linear-gradient(
    45deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.05) 1px,
    rgba(255,255,255,0.05) 2px
  );
background-size: 200% 200%, 4px 4px;
}

body.is-dark .novel-title-on-cover-index {
color: #ecf0f1;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Additional dark mode fixes for bookmark overflow */
body.is-dark .default-novel-cover-index {
background: transparent;
}

body.is-dark .default-novel-cover-recent {
background: transparent;
}

/* Animations for index covers */
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}

@keyframes float {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-5px); }
}

/* Default Novel Cover for Recent Updates Section */
.default-novel-cover-recent {
width: 80px;
height: 110px;
position: relative;
border-radius: 6px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transform: perspective(800px) rotateY(-3deg);
box-shadow: 
  0 5px 15px rgba(0,0,0,0.3),
  0 0 0 1px rgba(255,255,255,0.1);
background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
}

.cover-background-recent {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: 
  var(--cover-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%)),
  repeating-linear-gradient(
    45deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.1) 1px,
    rgba(255,255,255,0.1) 2px
  );
background-size: 200% 200%, 4px 4px;
animation: gradientShift 3s ease infinite;
}

.book-texture-recent {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: 
  radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
  radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
z-index: 1;
pointer-events: none;
}

.book-spine-recent {
position: absolute;
left: 0;
top: 0;
width: 3px;
height: 100%;
background: linear-gradient(90deg, 
  rgba(0,0,0,0.4) 0%, 
  rgba(0,0,0,0.2) 50%, 
  rgba(0,0,0,0.1) 100%);
z-index: 3;
border-radius: 1px 0 0 1px;
}

.book-pages-recent {
position: absolute;
right: 0;
top: 0;
width: 2px;
height: 100%;
background: linear-gradient(90deg, 
  rgba(255,255,255,0.8) 0%, 
  rgba(255,255,255,0.4) 50%, 
  rgba(255,255,255,0.2) 100%);
z-index: 3;
border-radius: 0 1px 1px 0;
}

.cover-content-recent {
position: relative;
z-index: 2;
text-align: center;
padding: 0.5rem;
color: white;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.book-icon-recent {
font-size: 1.5rem;
margin-bottom: 0.5rem;
opacity: 0.9;
animation: float 3s ease-in-out infinite;
color: #ffffff;
}

.novel-title-on-cover-recent {
font-size: 0.7rem;
font-weight: bold;
line-height: 1.2;
text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
word-wrap: break-word;
max-width: 100%;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.bookmark-recent {
/* Position is now handled in the overflow fix section */
}

.bookmark-ribbon-recent {
width: 4px;
height: 15px;
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
border-radius: 0 0 2px 2px;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
position: relative;
}

.bookmark-ribbon-recent::before {
content: '';
position: absolute;
top: -4px;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-left: 2px solid transparent;
border-right: 2px solid transparent;
border-bottom: 4px solid #ff6b6b;
}

/* Different bookmark colors for recent covers */
.default-novel-cover-recent:nth-child(5n+1) .bookmark-ribbon-recent {
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.default-novel-cover-recent:nth-child(5n+1) .bookmark-ribbon-recent::before {
border-bottom-color: #ff6b6b;
}

.default-novel-cover-recent:nth-child(5n+2) .bookmark-ribbon-recent {
background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.default-novel-cover-recent:nth-child(5n+2) .bookmark-ribbon-recent::before {
border-bottom-color: #74b9ff;
}

.default-novel-cover-recent:nth-child(5n+3) .bookmark-ribbon-recent {
background: linear-gradient(135deg, #55a3ff, #2d3436);
}

.default-novel-cover-recent:nth-child(5n+3) .bookmark-ribbon-recent::before {
border-bottom-color: #55a3ff;
}

.default-novel-cover-recent:nth-child(5n+4) .bookmark-ribbon-recent {
background: linear-gradient(135deg, #fd79a8, #e84393);
}

.default-novel-cover-recent:nth-child(5n+4) .bookmark-ribbon-recent::before {
border-bottom-color: #fd79a8;
}

.default-novel-cover-recent:nth-child(5n+5) .bookmark-ribbon-recent {
background: linear-gradient(135deg, #00b894, #00a085);
}

.default-novel-cover-recent:nth-child(5n+5) .bookmark-ribbon-recent::before {
border-bottom-color: #00b894;
}

/* Hover effects for recent covers */
.default-novel-cover-recent:hover {
transform: perspective(800px) rotateY(-5deg) scale(1.05);
box-shadow: 
  0 8px 25px rgba(0,0,0,0.4),
  0 0 0 1px rgba(255,255,255,0.15);
transition: all 0.3s ease;
}

/* Fix bookmark overflow on hover for recent covers */
.default-novel-cover-recent {
overflow: visible;
position: relative;
}

.default-novel-cover-recent .bookmark-recent {
overflow: visible;
position: absolute;
top: -5px;
right: 12px;
z-index: 5;
}

/* Ensure bookmark stays within bounds during hover */
.default-novel-cover-recent:hover .bookmark-recent {
top: -5px;
right: 12px;
}

/* Dark mode styles for recent covers */
body.is-dark .cover-background-recent {
background: 
  var(--cover-gradient-dark, linear-gradient(135deg, #2c3e50 0%, #34495e 100%)),
  repeating-linear-gradient(
    45deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.05) 1px,
    rgba(255,255,255,0.05) 2px
  );
background-size: 200% 200%, 4px 4px;
}

body.is-dark .novel-title-on-cover-recent {
color: #ecf0f1;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Additional dark mode fixes for recent covers */
body.is-dark .default-novel-cover-recent {
background: transparent;
}
.novel-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.novel-title {
font-size: 1.15rem;
font-weight: bold;
margin-bottom: 0.3rem;
color: #2160c4;
text-decoration: none;
transition: color 0.2s;
}
.novel-title:hover {
color: #375a7f;
}
.novel-meta {
color: #888;
font-size: 0.95rem;
margin-bottom: 0.5rem;
}
.novel-desc {
color: #444;
font-size: 1rem;
margin-bottom: 0.5rem;
line-height: 1.5;

overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.novel-btn {
margin-top: 0.5rem;
align-self: flex-start;
}

@media (max-width: 768px) {
.novel-list {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.novel-card {
  padding: 1rem;
}
.novel-cover {
  width: 80px;
  height: 110px;
}

.novel-title {
  font-size: 1rem;
  line-height: 1.2;
  max-height: 2.4em;
}

.tags {
  max-height: none;
}
}
@media (max-width: 480px) {
.novel-list {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.novel-title {
  font-size: 0.95rem;
  line-height: 1.2;
  max-height: 2.4em;
}

.tags {
  max-height: none;
}
}

/* Dark mode styles */
body.is-dark .novel-card {
background: #1e1e1e;
}
body.is-dark .novel-title {
color: #5c9ce6;
}
body.is-dark .novel-desc {
color: #e4e4e4;
}
body.is-dark .novel-meta {
color: #fff;
}
/* Remove all slider related styles */
.novel-slider,
.novel-slider-container,
.novel-slider-track,
.novel-slider-item {
all: unset;
}
.slider-control {
display: none;
}

/* Tag styles */
.tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 0.5rem;
}
.tag {
padding: 0.3rem 0.8rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
transition: all 0.3s ease;
background: #f0f4fa;
color: #2160c4;
border: none;
}
.tag:hover {
background: #e0e7ff;
transform: translateY(-1px);
}
.tag.is-light {
background: #f0f4fa;
color: #2160c4;
}
.tag.is-light:hover {
background: #e0e7ff;
color: #1d4ed8;
}
.status {
display: inline-flex;
align-items: center;
padding: 0.3rem 0.8rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
}
.status.ongoing {
background: #dcfce7;
color: #15803d;
}
.status.completed {
background: #fef9c3;
color: #854d0e;
}
body.is-dark .tag {
background: #2d3748;
color: #90cdf4;
}
body.is-dark .tag:hover {
background: #2c5282;
color: #bee3f8;
}
body.is-dark .tag.is-light {
background: #2d3748;
color: #90cdf4;
}
body.is-dark .tag.is-light:hover {
background: #2c5282;
color: #bee3f8;
}
body.is-dark .status.ongoing {
background: #065f46;
color: #6ee7b7;
}
body.is-dark .status.completed {
background: #78350f;
color: #fcd34d;
}
@media (max-width: 768px) {
.tag {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}
.status {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}
}
.navbar-link.is-active, .navbar-link:focus, .navbar-link:focus-within, .navbar-link:hover, a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover{
background-color: transparent!important;
}

/* Active language highlighting for desktop navbar */
.navbar-dropdown .navbar-item.is-active {
background-color: #f0f4fa !important;
color: #2160c4 !important;
font-weight: bold;
}

body.is-dark .navbar-dropdown .navbar-item.is-active {
background-color: #1a1a1a !important;
color: #5c9ce6 !important;
font-weight: bold;
}

@media (max-width: 1024px) {
.mobile-header {
  display: flex !important;
  height: 56px;
  background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #eee;
}

/* Mobile header icon styles */
.mobile-header .dark-mode-toggle {
  font-size: 18px;
  color: #fbbf24 !important; /* Yellow color for moon icon */
}

.mobile-header .language-toggle {
  font-size: 18px;
}

.mobile-header .language-toggle .icon {
  font-size: 18px;
  color: #3273dc !important;
}

.mobile-logo {
  height: 32px;
  margin: 0 auto;
  display: block;
}
.mobile-tabbar {
  display: flex !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 1000;
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 6px 0 2px 0;
  color: #888;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 0.2s;
}
.tab-item i {
  font-size: 20px;
  margin-bottom: 2px;
}
.tab-item.is-active,
.tab-item.is-active i {
  color: #2160c4 !important;
  font-weight: bold;
}
.tab-item.is-active span {
  color: #2160c4 !important;
  font-weight: bold;
}
body {
  padding-top: 56px;
  padding-bottom: 56px;
}
.navbar {
  display: none !important;
}
.mobile-lang-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  right: 8px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2000;
  min-width: 120px;
}
.mobile-lang-item {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold !important;
}
.mobile-lang-item.is-active {
  color: #2160c4 !important;
  font-weight: bold !important;
  background: #f0f4fa !important;
}
.mobile-lang-item:hover {
  background: #f0f4fa;
}
}
@media (min-width: 1025px) {
.mobile-header, .mobile-tabbar {
  display: none !important;
}
}

body.is-dark .mobile-header {
background: #23272f !important;
border-bottom: 1px solid #222 !important;
}

/* Dark mode mobile header icon styles */
body.is-dark .mobile-header .dark-mode-toggle {
color: #fbbf24 !important; /* Keep yellow color in dark mode */
}

body.is-dark .mobile-header .language-toggle .icon {
color: #5c9ce6 !important; /* Brighter blue for dark mode */
}

body.is-dark .mobile-tabbar {
background: #23272f !important;
border-top: 1px solid #222 !important;
}
body.is-dark .tab-item,
body.is-dark .tab-item i,
body.is-dark .tab-item span {
color: #b5b5b5 !important;
}
body.is-dark .tab-item:hover,
body.is-dark .tab-item:active {
color: #5c9ce6 !important;
}
body.is-dark .mobile-lang-dropdown {
background: #23272f !important;
border: 1px solid #222 !important;
}
body.is-dark .mobile-lang-item {
color: #b5b5b5 !important;
}
body.is-dark .mobile-lang-item.is-active {
color: #5c9ce6 !important;
background: #1a1a1a !important;
font-weight: bold !important;
}
body.is-dark .mobile-lang-item:hover {
background: #1a1a1a !important;
color: #5c9ce6 !important;
}

.mobile-header .language-toggle .icon {
color: #3273dc !important;
}

body.is-dark .tab-item.is-active,
body.is-dark .tab-item.is-active i,
body.is-dark .tab-item.is-active span {
color: #5c9ce6 !important;
font-weight: bold;
}
  
@media screen and (max-width: 768px) {
.default-novel-cover-recent{
  margin: .2rem auto;
}
.is-narrow{
  text-align: center;
}
}