body.is-dark a {
    color: #e4e4e4;
    transition: color 0.3s ease;
}
@media screen and (max-width: 1023px) {
    body.is-dark .navbar-menu {
      background-color: #1a1a1a;
    }
}
body.is-dark input::placeholder {
  color: #e4e4e4;
}
body .has-text-info{
  color: #ffe08a!important;
}
.navbar-item {
  font-weight: bold;
}
.navbar-item .icon {
  margin-right: 0.5rem;
}
.navbar-item .icon.has-text-info {
  color: hsl(204, 86%, 53%) !important;
}

.navbar-item .icon.has-text-primary {
  color: hsl(171, 100%, 41%) !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;
}
@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;
  }
}
.language-toggle .fa-globe-asia{
  font-size: 1.3rem;
}
@media (max-width: 1024px) {
  body {
      padding-top: 56px;
      padding-bottom: 56px;
  }
}
body.is-dark .button.is-primary {
background-color: #375a7f;
}
.navbar-item img {
  
}
.dark-mode-toggle {
  cursor: pointer;
}
.hero-body {
  padding: 2rem 1.5rem;
}
.card {
  height: 100%;
  display: flex;
}
.card-content {
  flex-grow: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  padding-bottom: 0.5rem;
  min-width: 0;
  overflow: hidden;
}
.novel-grid {
  display: grid;
  gap: 2rem;
}
.novel-card {
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
  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;
  animation: fadeInUp 0.7s;
  min-width: 0;
}
.novel-card .image {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.novel-card .image img {
  width: 100%;
  height: auto;
  max-height: 231px;
  display: block;
}
.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;
  text-overflow: ellipsis;
  white-space: normal;
}

.card-content .title.is-5,
.card-content a .title.is-5 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}
.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:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.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;
  border-radius: 4px;
  font-size: 0.7rem;
  z-index: 2;
}
.ongoing {
  background-color: #23d160;
  color: white;
}
.completed {
  background-color: #ffdd57;
  color: #363636;
}
.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;
}
/* Dark mode styles */
body.is-dark {
  background-color: #1a1a1a;
  color: #e4e4e4;
}
body.is-dark .novel-list-section{
  background-color: #1e1e1e !important;
}.language-selector .icon {
color: #3273dc;
margin-right: 0.5rem;
font-size: 1rem;
}
body.is-dark .navbar {
  background-color: #1a1a1a !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: #e4e4e4;
}

/* Search bar styles */
.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;
}
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 styles */
.language-selector {
  color: #4a4a4a !important;
  cursor: pointer !important;
  text-decoration: none !important;
}
.language-selector:hover {
  color: #3273dc !important;
  text-decoration: none !important;
}
.language-selector .icon {
  color: #3273dc;
}

/* Ensure language switcher container displays correctly */
.navbar-item.has-dropdown {
  position: relative !important;
}

/* Ensure dropdown menu displays correctly */
.navbar-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  min-width: 150px;
}

.navbar-dropdown[style*="display: block"] {
  display: block !important;
}

/* Mobile dropdown menu styles */
@media (max-width: 1024px) {
  .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;
  }
}

.navbar-dropdown .navbar-item {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s ease;
  border: none;
  background: none;
}

.navbar-dropdown .navbar-item:hover {
  background-color: #f8f9fa;
  color: #333;
}
body.is-dark .language-selector {
  color: #f5f5f5 !important;
}
body.is-dark .language-selector:hover {
  color: #5c9ce6 !important;
}
body.is-dark .language-selector .icon {
  color: #5c9ce6;
}
body.is-dark .navbar-dropdown .navbar-item {
  color: #f5f5f5 !important;
}
body.is-dark .navbar-dropdown .navbar-item:hover {
  color: #ffffff !important;
}
body.is-dark {
  background-color: #1a1a1a;
  min-height: 100vh;
}
/* Main content styles */
.main-content {
  width: 100%;
  display: block;
}

/* Container styles */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section styles */
.section {
  padding: 1.5rem 0;
  width: 100%;
}

/* Filter section styles */
.filter-section {
  background-color: #f8f9fa;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e8e8e8;
  width: 100%;
}

.filter-section .container {
  padding: 0 1.5rem;
}

.filter-section .level-left {
  justify-content: flex-start;
}

/* Novel list section styles */
.novel-list-section {
  flex: 1;
  width: 100%;
  padding: 1.5rem 0;
}

.novel-list-section .container {
  padding: 0 1.5rem;
}

@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;
  }
}

@media screen and (max-width: 768px) {
  .novel-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .novel-card {
    height: auto;
    width: 100%;
  }

  .novel-card .title {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .novel-card .subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .novel-card .card-content {
    padding: 0.5rem;
  }

  .novel-card .image {
    height: 160px;
  }
}

@media screen and (max-width: 480px) {
  .novel-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .novel-card .image {
    height: 140px;
  }
}

/* Empty history styles */
.empty-history {
  text-align: center;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(245, 245, 245, 0.7);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  max-width: 450px;
  width: 90%;
  margin: 0 auto;
}

.empty-history i {
  font-size: 4rem;
  margin-bottom: 0;
  opacity: 0.9;
  color: #3e8ed0;
}

.empty-history .title {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  color: #363636;
  font-weight: 600;
}

.empty-history .subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #666;
  max-width: 90%;
  line-height: 1.5;
}

.empty-history .button {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: auto;
  min-height: 2.5em;
  line-height: 1.15;
}

.empty-history .button .icon {
  height: 1.5em;
  width: 1.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  position: relative;
  top: -1px;
}

.empty-history .button .icon i {
  font-size: 1rem;
  line-height: 1;
  height: 1em;
  width: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-history .button span {
  display: inline-flex;
  align-items: center;
  height: 100%;
  line-height: inherit;
}

.empty-history .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.is-dark .empty-history {
  background-color: rgba(42, 42, 42, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.is-dark .empty-history i {
  color: #3e8ed0 !important;
}

body.is-dark .empty-history .title {
  color: #f5f5f5;
}

body.is-dark .empty-history .subtitle {
  color: #b5b5b5;
}

@media screen and (max-width: 768px) {
  .empty-history {
    padding: 2rem 1rem;
  }
  
  .empty-history i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
  }
  
  .empty-history .title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .empty-history .subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .empty-history .button {
    padding: 0.5rem 1.25rem;
  }
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  width: 100%;
  overflow: hidden;
}

@media screen and (max-width: 768px) {
  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }
}

.empty-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem 0;
  width: 100%;
}

.reading-progress {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.reading-progress .chapter-title {
  color: #3273dc;
  margin-bottom: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.reading-progress .last-read {
  font-size: 0.8rem;
  color: #888;
}

.clear-history {
  background-color: #ff3860;
  color: white;
  border: none;
  transition: background-color 0.3s;
  margin-left: 0.5rem;
}
.clear-history:hover {
  background-color: #e52a4b;
}
body.is-dark .clear-history {
  background-color: #db365a;
}
body.is-dark .clear-history:hover {
  background-color: #c42e4f;
}

/* Footer styles */
.footer {
  margin: 0;
  padding: 3rem 1.5rem;
  background-color: #f5f5f5;
  width: 100%;
  padding-bottom: 3rem;
}
.footer a {
  color: #4a4a4a;
}
.footer a:hover {
  color: #3273dc;
}
body.is-dark .footer {
  background-color: #1a1a1a;
  color: #f5f5f5;
  border-top: 1px solid #2c2c2c;
}
body.is-dark .footer a {
  color: #e4e4e4;
}
body.is-dark .footer a:hover {
  color: #5c9ce6;
}
body.is-dark .footer .title {
  color: #f5f5f5;
}
body.is-dark .footer .input {
  background-color: #2a2a2a;
  border-color: #2c2c2c;
  color: #f5f5f5;
}
body.is-dark .footer .input:focus {
  border-color: #375a7f;
  box-shadow: 0 0 0 0.125em rgba(55, 90, 127, 0.25);
}

/* Mobile styles */
@media screen and (max-width: 768px) {
  .novel-card .status{
    display: none;
  }
  .card.novel-card {
    height: auto;
  }

  .novel-card .title {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .novel-card .subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .novel-card .card-content {
    padding: 0.5rem;
  }

  .novel-card .image {
    width: 90px;
    height: 120px;
  }

  .reading-progress {
    margin-top: 0.3rem;
  }

  .reading-progress .chapter-title {
    margin-bottom: 0.2rem;
  }
}

body.is-dark .filter-section {
  background-color: #23272e !important;
  border-bottom: 1px solid #222 !important;
}

.filter-section .title {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.novel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.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;
}
@media (max-width: 768px) {
  .novel-cover {
    width: 100%;
    height: 140px;
  }
}
.button.is-medium .icon i {
  font-size: 1.25rem;
}
body.is-dark .empty-bookshelf i {
  color: #ff8585;
}
.button.is-medium .icon i {
  font-size: 1.25rem;
}
.button .icon i {
  font-size: 1rem;
  line-height: 1;
  height: 1em;
  width: 1em;
  display: inline-flex
;
  align-items: center;
  justify-content: center;
}
.button .icon i {
  font-size: 1rem;
  color: inherit;
  margin: 0;
}
a.navbar-item:focus{
      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;
}
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #eee;
  height: 56px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.mobile-logo {
  height: 32px;
  margin: 0 auto;
  display: block;
}

@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-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;
}
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;
}

/* Ensure default-novel-cover-small styles work properly in history page */
.default-novel-cover-small {
  position: relative;
  width: 100px;
  height: 140px;
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .default-novel-cover-small {
    width: 80px;
    height: 112px;
  }
}

.novel-cover-wrapper {
  position: relative;
  width: 100px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}
.novel-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bookmark-small {
  position: absolute;
  top: -5px;
  right: 12px;
  z-index: 5;
}
.bookmark-ribbon-small {
  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-small::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;
}
@media (max-width: 768px) {
  .novel-cover-wrapper {
    width: 80px;
    height: 112px;
  }
}

/* Default Novel Cover for Index Page */
.default-novel-cover-index {
  width: 90px;
  height: 120px;
  position: relative;
  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: hidden;
  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(-3px); }
}