:root {
    --primary: #5409DA;
    --primary-light: #4E71FF;
    --accent: #8DD8FF;
    --accent-light: #BBFBFF;
    --text-dark: #2D3748;
    --text-light: #4A5568;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --gray-light: #EDF2F7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
}

/* Header Styles */
header {
    background: var(--white);
    padding: 0.75rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.75rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

 /* Breadcrumb Styles */
.breadcrumb-container {
  max-width: 1400px;
  margin: 0 auto 1.5rem;
  padding: 0 2rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  color: var(--text-light);
  margin-left: 0.5rem;
}

.breadcrumb-link {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.breadcrumb-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb-icon {
  font-size: 0.9rem;
}

.breadcrumb-current {
  color: var(--text-light);
}

/* Dark Mode Styles */
body.dark .breadcrumb-link {
  color: var(--accent-light);
}

body.dark .breadcrumb-link:hover {
  color: var(--accent);
}

body.dark .breadcrumb-current {
  color: var(--gray-light);
}

body.dark .breadcrumb-item:not(:last-child)::after {
  color: rgba(255, 255, 255, 0.5);
}

/* Mobile Breadcrumb */
@media (max-width: 768px) {
  .breadcrumb-container {
    padding: 0 1rem;
    margin-bottom: 1rem;
  }
  
  .breadcrumb-list {
    font-size: 0.8rem;
    gap: 0.25rem;
  }
  
  .breadcrumb-item:not(:last-child)::after {
    margin-left: 0.25rem;
  }
  
  .breadcrumb-text {
    display: none;
  }
  
  .breadcrumb-link i {
    margin-right: 0;
  }
}


.nav-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    justify-content: center;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--gray-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    width: 300px;
    transition: var(--transition);
}

.search-container:focus-within {
    box-shadow: 0 0 0 2px var(--accent);
}

.search-input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 0.25rem;
    outline: none;
    font-size: 0.9rem;
}

.search-icon {
    color: var(--text-light);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login {
    background: transparent;
    color: var(--primary);
}

.btn-login:hover {
    background: rgba(84, 9, 218, 0.1);
}

.btn-signup {
    background: var(--primary);
    color: white;
}

.btn-signup:hover {
    background: #4a07c0;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
}

.content-container {
    display: flex;
    gap: 2rem;
}

.manga-section {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.view-all {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary);
}

/* Manga Grid */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

.manga-item {
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.manga-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.manga-cover-container {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.manga-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.manga-item:hover .manga-cover {
    transform: scale(1.05);
}

.manga-info {
    padding: 0.75rem;
}

.manga-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manga-chapter {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Most Viewed Section */
.most-viewed {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.most-viewed-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 0.75rem;
}

.most-viewed-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.top-manga-list {
    list-style: none;
}

.top-manga-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.top-manga-item:last-child {
    border-bottom: none;
}

/* Updated Rank Badges */
.rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.rank-1 {
    background: #FFD700;
    color: #8a6d00;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.rank-2 {
    background: #C0C0C0;
    color: #5a5a5a;
    box-shadow: 0 0 0 2px rgba(192, 192, 192, 0.3);
}

.rank-3 {
    background: #CD7F32;
    color: #6a3a00;
    box-shadow: 0 0 0 2px rgba(205, 127, 50, 0.3);
}

.rank-4, .rank-5, .rank-6, 
.rank-7, .rank-8, .rank-9, .rank-10 {
    background: var(--bg-light);
    color: var(--text-light);
    font-weight: 600;
}

/* Medal Icons */
.medal-icon {
    font-size: 0.9rem;
}

.top-manga-cover {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.top-manga-info {
    flex: 1;
    min-width: 0;
}

.top-manga-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-manga-views {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 280px;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 992px) {
    .content-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .most-viewed {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: -1.25rem -1rem;
    }
    
    .nav-container {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-container {
        padding: 0 1rem;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}


/* Dark/Light Mode Toggle Styles */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
  }
  
  .toggle-container {
    position: relative;
    width: 48px;
    height: 24px;
  }
  
  .toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
  }
  
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #5409DA 0%, #4E71FF 100%);
    transition: .4s;
    border-radius: 24px;
  }
  
  .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  
  .toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4E71FF 0%, #8DD8FF 100%);
  }
  
  .toggle-input:checked + .toggle-slider:before {
    transform: translateX(24px);
  }
  
  .toggle-icon {
    font-size: 1rem;
    color: var(--text-light);
  }
  
  .sun-icon {
    color: #FFB347;
  }
  
  .moon-icon {
    color: #BBFBFF;
  }

  /* End Dark/Light mode */

   /* Genre Alphabet Browser */
   .genres-section {
    margin-top: 2.5rem;
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
  }

  .genres-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  }

  .genres-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-left: 1rem;
  }

  .genres-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
  }

  .alphabet-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }

  .alphabet-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-light);
    color: var(--text-light);
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }

  .alphabet-btn:hover {
    background: var(--primary-light);
    color: white;
  }

  .alphabet-btn.active {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
  }

  .genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }

  .genre-card {
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--gray-light);
    text-align: center;
  }

  .genre-card:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }

  .current-letter {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .current-letter::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary), rgba(84, 9, 218, 0.1));
    margin-left: 0.5rem;
  }

  @media (max-width: 768px) {
    .alphabet-nav {
      gap: 0.3rem;
    }
    .alphabet-btn {
      width: 32px;
      height: 32px;
      font-size: 0.85rem;
    }
    .genres-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
  }

  /* End home alphabet */

   /* New & Top Rated Sections */
   .slider-section {
    margin-top: 2.5rem;
  }

  .slider-container {
    position: relative;
  }

  .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
  }

  .slider-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-left: 1rem;
  }

  .slider-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
  }

  .slider-nav {
    display: flex;
    gap: 0.5rem;
  }

  .slider-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
  }

  .slider-btn:hover {
    background: var(--primary-light);
    color: white;
  }

  .slider-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
  }

  .slider-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .slider-item {
    flex: 0 0 160px;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
  }

  .slider-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }

  .slider-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
  }

  .slider-info {
    padding: 0.75rem;
  }

  .slider-manga-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slider-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
  }

  .rating {
    color: #FFB347;
    font-weight: 600;
  }

  @media (max-width: 768px) {
    .slider-item {
      flex: 0 0 140px;
    }
    .slider-cover {
      height: 190px;
    }
  }


  /* end */


   /* Footer Styles */
   .site-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-light);
    padding: 2.5rem 2rem;
    margin-top: 3rem;
  }

  .footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
  }

  .footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
  }

  .footer-logo-icon {
    color: var(--primary);
    font-size: 1.75rem;
  }

  .footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .footer-about {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .footer-social {
    display: flex;
    gap: 1rem;
  }

  .social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
  }

  .social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
  }

  .footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
  }

  .footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
  }

  .footer-links {
    list-style: none;
  }

  .footer-link-item {
    margin-bottom: 0.75rem;
  }

  .footer-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
  }

  .footer-link:hover {
    color: var(--primary);
    transform: translateX(3px);
  }

  .footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
  }

  @media (max-width: 768px) {
    .footer-container {
      grid-template-columns: 1fr;
    }
    
    .footer-column {
      margin-bottom: 1.5rem;
    }
    
    .footer-heading {
      margin-bottom: 1rem;
    }
  }

  /* footer */

   /* Search Genres CTA */
   .genre-cta {
    margin: 3rem auto;
    max-width: 800px;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(84, 9, 218, 0.05) 0%, rgba(78, 113, 255, 0.05) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(84, 9, 218, 0.1);
  }

  .genre-cta-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
  }

  .genre-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(84, 9, 218, 0.2);
  }

  .genre-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(84, 9, 218, 0.3);
  }

  .genre-cta-btn:active {
    transform: translateY(0);
  }

  @media (max-width: 768px) {
    .genre-cta {
      padding: 1.5rem;
      margin: 2rem auto;
    }
    
    .genre-cta-title {
      font-size: 1.3rem;
    }
    
    .genre-cta-btn {
      padding: 0.9rem 2rem;
      font-size: 1rem;
    }
  }

   /* Manga Info Section */
    /* Updated Manga Info Section */
.tf1-manga-info {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  padding: 2.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
}


.tf1-cover-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 0 0 320px; /* Increased from 260px */
}

.tf1-cover-container {
  position: relative;
  height: 420px; /* Increased from 360px */
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tf1-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tf1-cover-container:hover .tf1-cover-img {
  transform: scale(1.03);
}

.tf1-cover-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tf1-details {
  flex: 1;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
}

.tf1-description-container {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 1rem;
  margin-bottom: 1.5rem;
}

.tf1-description-container::-webkit-scrollbar {
  width: 6px;
}

.tf1-description-container::-webkit-scrollbar-track {
  background: rgba(84, 9, 218, 0.05);
  border-radius: 3px;
}

.tf1-description-container::-webkit-scrollbar-thumb {
  background: rgba(84, 9, 218, 0.2);
  border-radius: 3px;
}

.tf1-description-container::-webkit-scrollbar-thumb:hover {
  background: rgba(84, 9, 218, 0.3);
}

.tf1-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.tf1-alt-title {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-style: italic;
  opacity: 0.8;
}

.tf1-meta-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  align-items: center;
}

.tf1-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.tf1-rating {
  color: #FF9F1C;
}

.tf1-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.tf1-genre-tag {
  background: rgba(84, 9, 218, 0.1);
  color: var(--primary);
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.tf1-author {
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tf1-author i {
  color: var(--primary-light);
}

.tf1-description {
  line-height: 1.8;
  color: var(--text-light);
  max-width: 800px;
  font-size: 1rem;
}

.tf1-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto; /* Pushes buttons to bottom */
}

.tf1-action-btn {
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-size: 0.95rem;
  border: none;
}

.tf1-primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(84, 9, 218, 0.3);
}

.tf1-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(84, 9, 218, 0.4);
}

.tf1-secondary-btn {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(84, 9, 218, 0.15);
}

.tf1-secondary-btn:hover {
  background: rgba(84, 9, 218, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 992px) {
  .tf1-manga-info {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .tf1-cover-section {
    flex: 0 0 auto;
    align-items: center;
  }
  
  .tf1-cover-container {
    width: 280px;
    height: 380px;
  }
  
  .tf1-title {
    font-size: 2rem;
  }
  
  .tf1-actions {
    margin-top: 2rem;
  }
}

@media (max-width: 576px) {
  .tf1-cover-container {
    width: 220px;
    height: 320px;
  }
  
  .tf1-title {
    font-size: 1.6rem;
  }
  
  .tf1-actions {
    flex-direction: column;
  }
  
  .tf1-action-btn {
    justify-content: center;
    width: 100%;
  }
}

/* Chapters Section */
.chapters-section {
  margin-top: 3rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.chapters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.chapters-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  padding-left: 1rem;
}

.chapters-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.chapters-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-label {
  font-weight: 500;
  color: var(--text-light);
}

.sort-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  border: none;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.sort-btn.active {
  background: var(--primary);
  color: white;
}

.sort-btn:not(.active):hover {
  background: rgba(84, 9, 218, 0.1);
}

.search-chapters {
  display: flex;
  align-items: center;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.search-chapters:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}

.chapter-search {
  border: none;
  background: transparent;
  padding: 0.25rem 0.5rem;
  outline: none;
  font-size: 0.9rem;
  width: 180px;
}

.chapters-list-container {
  max-height: 600px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-light);
}

.chapters-list {
  display: flex;
  flex-direction: column;
}

.chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  transition: var(--transition);
}

.chapter-item:last-child {
  border-bottom: none;
}

.chapter-item:hover {
  background: rgba(84, 9, 218, 0.03);
}

.chapter-item.read {
  background: rgba(84, 9, 218, 0.03);
  position: relative;
}

.chapter-item.read::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}

.chapter-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chapter-number {
  font-weight: 600;
  color: var(--text-dark);
}

.chapter-title {
  font-size: 0.9rem;
  color: var(--text-light);
}

.chapter-date {
  font-size: 0.8rem;
  color: var(--text-light);
  opacity: 0.8;
}

.chapter-actions {
  display: flex;
  gap: 0.75rem;
}

.read-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.read-btn:hover {
  background: #4a07c0;
}

.chapter-item.read .read-btn {
  background: var(--gray-light);
  color: var(--text-light);
}

.chapter-item.read .read-btn:hover {
  background: #e2e8f0;
}

.download-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-light);
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.download-btn:hover {
  background: var(--primary);
  color: white;
}

.chapters-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  border: none;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover {
  background: var(--primary);
  color: white;
}

.page-numbers {
  display: flex;
  gap: 0.5rem;
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-light);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn.active {
  background: var(--primary);
  color: white;
}

.page-btn:not(.active):hover {
  background: rgba(84, 9, 218, 0.1);
}

.page-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .chapters-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }
  
  .search-chapters {
    width: 100%;
  }
  
  .chapter-search {
    width: 100%;
  }
  
  .chapter-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  
  .chapter-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 576px) {
  .chapters-pagination {
    flex-wrap: wrap;
  }
  
  .page-numbers {
    order: 1;
    width: 100%;
    justify-content: center;
    margin: 0.5rem 0;
  }
}

/* Comments Section */
.comments-section {
  margin-top: 3rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comments-title i {
  color: var(--primary-light);
}

.sort-comments {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

.sort-select {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--text-dark);
}

/* Comment Form */
.comment-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.comment-avatar {
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.comment-input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gray-light);
  padding: 0.5rem 0;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.comment-input:focus {
  border-bottom-color: var(--primary);
}

.comment-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn-cancel {
  background: none;
  border: none;
  color: var(--text-light);
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-cancel:hover {
  background: var(--gray-light);
}

.btn-comment {
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-comment:disabled {
  background: var(--gray-light);
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-comment:not(:disabled):hover {
  background: #4a07c0;
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment {
  display: flex;
  gap: 1rem;
}

.comment.reply {
  margin-left: 2.5rem;
  position: relative;
}

.comment.reply::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-light);
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  font-size: 0.95rem;
}

.comment-time {
  font-size: 0.8rem;
  color: var(--text-light);
}

.comment-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--gray-light);
}

.like-btn:hover {
  color: var(--primary);
}

.dislike-btn:hover {
  color: #f56565;
}

.report-btn {
  padding: 0.25rem;
}

.replies-toggle {
  margin-top: 0.75rem;
}

.show-replies-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.show-replies-btn:hover {
  background: rgba(84, 9, 218, 0.1);
}

.replies-container {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reply-form {
  margin-top: 0.5rem;
}

.load-more-btn {
  display: block;
  margin: 2rem auto 0;
  background: var(--gray-light);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.load-more-btn:hover {
  background: var(--primary);
  color: white;
}

.load-more-btn i {
  margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .comment.reply {
    margin-left: 1.5rem;
  }
  
  .comment-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 576px) {
  .comment {
    gap: 0.75rem;
  }
  
  .avatar-placeholder {
    width: 32px;
    height: 32px;
  }
  
  .comment-buttons {
    justify-content: space-between;
  }
}





/* Manga Reader */
.c-manga-reader {
    position: relative;
    padding: 1rem 0;
}

/* Breadcrumb */
.c-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.c-breadcrumb-item {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.c-breadcrumb-item:hover {
    color: var(--primary);
}

.c-breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 500;
}

.c-breadcrumb-divider {
    color: var(--text-light);
}

/* Reader Controls */
.c-reader-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.c-control-btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--gray-light);
    border: none;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.c-control-btn:hover {
    background: var(--primary);
    color: white;
}

.c-chapter-selector {
    flex: 1;
    max-width: 300px;
}

.c-chapter-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-light);
    background: var(--white);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
}

/* Reader Container */
.c-reader-container {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.c-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 1rem 0;
}

.c-manga-page {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

/* Mobile Navigation */
.c-mobile-nav-overlay {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    padding: 1rem;
    z-index: 1000;
}

.c-mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.c-mobile-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.c-mobile-nav-btn:hover {
    transform: scale(1.1);
}

/* Settings Modal */
.c-settings-modal, .c-chapters-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.c-settings-content, .c-chapters-content {
    background: var(--white);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.c-settings-header, .c-chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.c-close-settings, .c-close-chapters {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light);
    cursor: pointer;
}

.c-setting-group {
    margin-bottom: 1.5rem;
}

.c-setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.c-radio-group {
    display: flex;
    gap: 1.5rem;
}

.c-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.c-checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-light);
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

/* Chapters Modal */
.c-chapters-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.c-chapter-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--gray-light);
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.c-chapter-item:hover {
    background: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .c-reader-controls {
        display: none;
    }
    
    .c-mobile-nav-overlay {
        display: block;
    }
    
    .c-page-container {
        padding: 0;
    }
    
    .c-manga-page {
        border-radius: 0;
    }
}


/* Bookmark Page Styles */
.bk-container {
  max-width: 1400px;
  margin: 2rem auto;

}

.bk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.bk-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  padding-left: 1rem;
}

.bk-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.bk-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.bk-sort {
  position: relative;
}

.bk-sort-btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--gray-light);
  border: none;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
  min-width: 200px;
  justify-content: space-between;
}

.bk-sort-btn:hover {
  background: rgba(84, 9, 218, 0.1);
}

.bk-sort-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  display: none;
}

.bk-sort-dropdown.show {
  display: block;
}

.bk-sort-option {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bk-sort-option:hover {
  background: rgba(84, 9, 218, 0.05);
}

.bk-sort-option.active {
  color: var(--primary);
  font-weight: 500;
}

.bk-sort-option.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary);
}

.bk-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--gray-light);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.bk-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bk-stat-icon {
  color: var(--primary-light);
}

/* Bookmark Grid */
.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.bk-item {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  border: 2px solid transparent;
}

.bk-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.bk-item.read {
  border-color: var(--primary-light);
}

.bk-item.unread {
  border-color: var(--accent);
}

.bk-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(84, 9, 218, 0.03);
  border-bottom: 1px solid var(--gray-light);
}

.bk-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
}

.bk-status.read {
  background: rgba(84, 9, 218, 0.1);
  color: var(--primary);
}

.bk-status.unread {
  background: rgba(78, 216, 255, 0.1);
  color: var(--primary-light);
}

.bk-time {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.bk-time-icon {
  color: var(--primary-light);
}

.bk-content {
  display: flex;
  padding: 1rem;
  gap: 1rem;
}

.bk-cover {
  width: 80px;
  height: 110px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.bk-info {
  flex: 1;
  min-width: 0;
}

.bk-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dark);
  padding-left: 0;
}

.bk-title::before {
  display: none;
}

.bk-chapter {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.bk-progress {
  width: 100%;
  height: 6px;
  background: var(--gray-light);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.bk-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 3px;
}

.bk-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
}

.bk-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-light);
  justify-content: flex-end;
}

.bk-action-btn {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}

.bk-read-btn {
  background: var(--primary);
  color: white;
}

.bk-read-btn:hover {
  background: #4a07c0;
}

.bk-remove-btn {
  background: var(--gray-light);
  color: var(--text-light);
}

.bk-remove-btn:hover {
  background: #e2e8f0;
}

/* Pagination */
.bk-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.bk-page-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-page-btn.active {
  background: var(--primary);
  color: white;
}

.bk-page-btn:not(.active):hover {
  background: rgba(84, 9, 218, 0.1);
}

.bk-page-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--text-light);
}

/* Empty State */
.bk-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
}

.bk-empty-icon {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.bk-empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.bk-empty-text {
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.bk-empty-btn {
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: white;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.bk-empty-btn:hover {
  background: #4a07c0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Responsive */
@media (max-width: 992px) {
  .bk-grid {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .bk-header {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .bk-controls {
      width: 100%;
      justify-content: space-between;
  }
  
  .bk-sort {
      flex: 1;
      min-width: 200px;
  }
  
  .bk-stats {
      flex: 1;
      justify-content: center;
  }
}

@media (max-width: 576px) {
  .bk-grid {
      grid-template-columns: 1fr;
  }
  
  .bk-pagination {
      flex-wrap: wrap;
  }
}



/* History Page Styles */
.history-container {
  max-width: 1400px;
  margin: 2rem auto;

}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.history-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  padding-left: 1rem;
}

.history-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.history-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.history-filter {
  position: relative;
}

.history-filter-btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--gray-light);
  border: none;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
  min-width: 180px;
  justify-content: space-between;
}

.history-filter-btn:hover {
  background: rgba(84, 9, 218, 0.1);
}

.history-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  display: none;
}

.history-filter-dropdown.show {
  display: block;
}

.history-filter-option {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-filter-option:hover {
  background: rgba(84, 9, 218, 0.05);
}

.history-filter-option.active {
  color: var(--primary);
  font-weight: 500;
}

.history-filter-option.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary);
}

.history-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--gray-light);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.history-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.history-stat-icon {
  color: var(--primary-light);
}

.history-clear-btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(245, 101, 101, 0.1);
  border: none;
  color: #f56565;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.history-clear-btn:hover {
  background: rgba(245, 101, 101, 0.2);
}

/* Timeline View */
.history-timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 3rem;
}

.history-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: var(--gray-light);
}

.history-date-group {
  position: relative;
  margin-bottom: 2rem;
}

.history-date {
  position: sticky;
  top: 1rem;
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10;
  margin-left: -1.5rem;
  margin-bottom: 1rem;
}

.history-date-icon {
  color: var(--primary);
  font-size: 1.1rem;
}

.history-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding-left: 1.5rem;
}

.history-item {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  border-left: 3px solid var(--primary-light);
}

.history-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(84, 9, 218, 0.03);
  border-bottom: 1px solid var(--gray-light);
}

.history-time {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.history-time-icon {
  color: var(--primary-light);
}

.history-content {
  display: flex;
  padding: 1rem;
  gap: 1rem;
}

.history-cover {
  width: 80px;
  height: 110px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-item-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dark);
}

.history-chapter {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.history-progress {
  width: 100%;
  height: 6px;
  background: var(--gray-light);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.history-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 3px;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
}

.history-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-light);
  justify-content: flex-end;
}

.history-action-btn {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}

.history-read-btn {
  background: var(--primary);
  color: white;
}

.history-read-btn:hover {
  background: #4a07c0;
}

.history-remove-btn {
  background: var(--gray-light);
  color: var(--text-light);
}

.history-remove-btn:hover {
  background: #e2e8f0;
}

.history-bookmark-btn {
  background: rgba(255, 179, 71, 0.1);
  color: #FFB347;
}

.history-bookmark-btn:hover {
  background: rgba(255, 179, 71, 0.2);
}

/* Reading Insights */
.history-insights {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.history-insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.history-insights-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.history-insights-period {
  font-size: 0.9rem;
  color: var(--text-light);
}

.history-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.history-insight-card {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.history-insight-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.history-insight-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Empty State */
.history-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
}

.history-empty-icon {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.history-empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.history-empty-text {
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.history-empty-btn {
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: white;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.history-empty-btn:hover {
  background: #4a07c0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Responsive */
@media (max-width: 992px) {
  .history-items {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .history-header {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .history-controls {
      width: 100%;
      justify-content: space-between;
  }
  
  .history-filter {
      flex: 1;
      min-width: 180px;
  }
  
  .history-stats {
      flex: 1;
      justify-content: center;
  }
  
  .history-clear-btn {
      width: 100%;
      justify-content: center;
  }
}

@media (max-width: 576px) {
  .history-items {
      grid-template-columns: 1fr;
  }
  
  .history-insights-grid {
      grid-template-columns: 1fr;
  }
}

/* Browse Page Styles */
.br-container {
  max-width: 1400px;
  margin: 2rem auto;
}

/* Sort Controls */
.br-sort-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
  align-items: center;
}

.br-sort-group {
  position: relative;
}

.br-sort-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-right: 0.5rem;
}

.br-sort-btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--gray-light);
  border: none;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
  min-width: 160px;
  justify-content: space-between;
}

.br-sort-btn:hover {
  background: rgba(84, 9, 218, 0.1);
}

.br-sort-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  display: none;
}

.br-sort-dropdown.show {
  display: block;
}

.br-sort-option {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.br-sort-option:hover {
  background: rgba(84, 9, 218, 0.05);
}

.br-sort-option.active {
  color: var(--primary);
  font-weight: 500;
}

.br-sort-option.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary);
}

/* Comic Grid */
.br-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.br-comic-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.br-comic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.br-comic-card.expanded {
  grid-column: span 2;
}

.br-comic-cover-container {
  position: relative;
  padding-top: 140%;
  overflow: hidden;
}

.br-comic-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.br-comic-card:hover .br-comic-cover {
  transform: scale(1.03);
}

.br-comic-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.br-comic-content {
  padding: 1rem;
}

.br-comic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.br-comic-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.br-comic-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 179, 71, 0.1);
  color: #FFB347;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.br-comic-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.br-comic-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.br-comic-expand-btn {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  border: none;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.br-comic-expand-btn:hover {
  background: rgba(84, 9, 218, 0.1);
}

/* Expanded View */
.br-comic-details {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--gray-light);
  background: var(--bg-light);
}

.br-comic-card.expanded .br-comic-details {
  display: block;
}

.br-details-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

.br-comic-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.br-info-group {
  margin-bottom: 0.5rem;
}

.br-info-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.br-info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
}

.br-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.br-genre-tag {
  background: rgba(84, 9, 218, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
}

.br-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.br-stat-item {
  background: var(--white);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.br-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.br-stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.br-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.br-action-btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}

.br-read-btn {
  background: var(--primary);
  color: white;
  flex: 1;
}

.br-read-btn:hover {
  background: #4a07c0;
}

.br-bookmark-btn {
  background: var(--gray-light);
  color: var(--text-dark);
}

.br-bookmark-btn:hover {
  background: #e2e8f0;
}

/* Responsive */
@media (max-width: 992px) {
  .br-grid {
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .br-comic-card.expanded {
      grid-column: span 1;
  }
  
  .br-details-grid {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .br-sort-controls {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .br-sort-group {
      width: 100%;
  }
  
  .br-sort-btn {
      width: 100%;
  }
}

@media (max-width: 576px) {
  .br-grid {
      grid-template-columns: 1fr;
  }
}

/* Notification System */
.notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-width: 90%;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
}

.notification {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  animation: slideIn 0.3s forwards;
  position: relative;
}

.notification.hide {
  animation: slideOut 0.3s forwards;
}

.notification-success {
  border-left: 4px solid #10B981;
}

.notification-error {
  border-left: 4px solid #EF4444;
}

.notification-warning {
  border-left: 4px solid #F59E0B;
}

.notification-info {
  border-left: 4px solid var(--primary-light);
}

.notification-header {
  display: flex;
  align-items: center;
  padding: 15px;
  gap: 12px;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-success .notification-icon {
  color: #10B981;
}

.notification-error .notification-icon {
  color: #EF4444;
}

.notification-warning .notification-icon {
  color: #F59E0B;
}

.notification-info .notification-icon {
  color: var(--primary-light);
}

.notification-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

.notification-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.notification-close:hover {
  color: var(--text-dark);
}

.notification-progress {
  height: 4px;
  width: 100%;
  background: rgba(0,0,0,0.05);
}

.notification-progress-bar {
  height: 100%;
  width: 100%;
  animation: progressBar 5s linear forwards;
}

.notification-success .notification-progress-bar {
  background: linear-gradient(to right, #10B981, #6EE7B7);
}

.notification-error .notification-progress-bar {
  background: linear-gradient(to right, #EF4444, #FCA5A5);
}

.notification-warning .notification-progress-bar {
  background: linear-gradient(to right, #F59E0B, #FCD34D);
}

.notification-info .notification-progress-bar {
  background: linear-gradient(to right, var(--primary-light), var(--accent-light));
}

@keyframes slideIn {
  to {
      transform: translateX(0);
      opacity: 1;
  }
}

@keyframes slideOut {
  to {
      transform: translateX(120%);
      opacity: 0;
  }
}

@keyframes progressBar {
  from {
      width: 100%;
  }
  to {
      width: 0%;
  }
}

.rev {
  text-decoration: none;
  color: var(--text-dark);
}


/* Tags Section Styles - Vertical */
.tf1-tags-container {
  margin: 1.5rem 0;
}

.tf1-tags-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.tf1-tags-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 120px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-light);
}

.tf1-tag {
  background: rgba(84, 9, 218, 0.08);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  transition: var(--transition);
  border: 1px solid rgba(84, 9, 218, 0.1);
  height: fit-content;
  text-decoration: none;
}

.tf1-tag:hover {
  background: rgba(84, 9, 218, 0.15);
  transform: translateY(-1px);
}

/* Custom scrollbar */
.tf1-tags-box::-webkit-scrollbar {
  width: 6px;
}

.tf1-tags-box::-webkit-scrollbar-track {
  background: var(--gray-light);
  border-radius: 3px;
}

.tf1-tags-box::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* Origin Tag Styles */
.tf1-origin-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.tf1-origin-tag .flag {
  margin-right: 0.3rem;
  font-size: 0.9rem;
}

/* Country-specific colors */
.tf1-origin-tag.korean {
  background: linear-gradient(to right, #003478, #CD2E3A);
}

.tf1-origin-tag.japanese {
  background: linear-gradient(to right, #BC002D, white);
  color: #BC002D;
}

.tf1-origin-tag.chinese {
  background: linear-gradient(to right, #DE2910, #FFDE00);
  color: #DE2910;
}

.tf1-origin-tag.unknown {
  background: var(--gray-light);
  color: var(--text-light);
  border: 1px solid var(--gray-light);
}

.translators-chap {
  background-color: var(--gray-light);
  padding: 8px 7px;
  border-radius: 8px;
  font-size:10px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile Navigation Styles */
@media (max-width: 1140px) {
  /* Hide desktop nav elements on mobile */
  .nav-container {
    display: none;
  }
  
  /* Mobile menu button */
  .mobile-menu-btn {
    display: flex;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    z-index: 1001;
  }
  
  /* Mobile menu overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile menu container */
  .mobile-nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  
  .mobile-nav-container.active {
    transform: translateX(0);
  }
  
  /* Mobile menu header */
  .mobile-nav-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
  }
  
  .mobile-nav-logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
  }
  
  .mobile-nav-logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
  }
  
  /* Mobile menu content */
  .mobile-nav-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
  }
  
  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .mobile-nav-link.active {
    background: rgba(84, 9, 218, 0.1);
    color: var(--primary);
    font-weight: 500;
  }
  
  .mobile-nav-link:not(.active):hover {
    background: var(--gray-light);
  }
  
  .mobile-nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
  }
  
  /* Mobile search button */
  .mobile-search-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--gray-light);
    border: none;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 1.5rem;
    width: 100%;
  }
  
  .mobile-search-btn i {
    margin-right: 0.75rem;
  }
  
  /* Mobile user section */
  .mobile-user-section {
    padding: 1rem;
    border-top: 1px solid var(--gray-light);
  }
  
  .mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
  }
  
  .mobile-user-name {
    font-weight: 500;
    color: var(--text-dark);
  }
  
  .mobile-user-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .mobile-user-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
  }
  
  .mobile-user-link:hover {
    background: var(--gray-light);
  }
  
  .mobile-user-link i {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
  }
  
  .mobile-user-link.logout {
    color: #f56565;
  }
  
  /* Hide desktop search on mobile */
  .search-container {
    display: none;
  }
  
  /* Show mobile search button in header */
  .mobile-header-search-btn {
    display: flex;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
  }
}

/* Keep desktop styles for larger screens */
@media (min-width: 1141px) {
  .mobile-menu-btn,
  .mobile-header-search-btn,
  .mobile-nav-container,
  .mobile-menu-overlay {
    display: none;
  }
}

/* Add to your existing modal styles */
.modal-buttons .btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.modal-buttons .btn-primary:hover {
  background: #4a07c0;
}

/* Update your existing comment input styles */
.comment-input, .reply-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gray-light);
  padding: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5; /* Add this */
  font-family: inherit; /* Add this */
  outline: none;
  transition: var(--transition);
  resize: none; /* Prevent manual resizing */
  min-height: 1.5em; /* Minimum height */
}

/* Add this for better textarea expansion */
.comment-input:focus, .reply-input:focus {
  border-bottom-color: var(--primary);
}

/* Search Popup Dark Mode Styles */
  body.dark .search-popup {
    background: rgba(0, 0, 0, 0.9);
  }

  body.dark .search-popup-content {
    background: var(--bg-light);
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow-lg);
  }

  body.dark .search-popup-header {
    border-bottom: 1px solid var(--gray-light);
  }

  body.dark .search-popup-input {
    background: var(--white);
    border-color: var(--gray-light);
    color: var(--text-dark);
  }



  body.dark .search-popup-close {
    color: var(--text-light);
  }

  body.dark .search-popup-close:hover {
    color: var(--text-dark);
  }

  body.dark .search-result-item {
    color: var(--text-dark);
  }

  body.dark .search-result-item:hover {
    background: var(--gray-light);
  }

  body.dark .search-loading {
    color: var(--text-light);
  }

  body.dark .search-empty {
    color: var(--text-light);
  }

  body.dark .search-empty i {
    color: var(--gray-light);
  }

  /* Animation remains the same for both modes */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Search Popup Styles */
        .search-popup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            padding: 20px;
            backdrop-filter: blur(5px);
        }

        .search-popup.active {
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        .search-popup-content {
            background: white;
            border-radius: 12px;
            width: 100%;
            max-width: 800px;
            max-height: 80vh;
            overflow: hidden;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .search-popup-header {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            position: relative;
        }

        .search-popup-input {
            flex: 1;
            padding: 12px 15px;
            border: 2px solid #eee;
            border-radius: 8px;
            font-size: 16px;
            outline: none;
            transition: border-color 0.3s;
        }

        .search-popup-input:focus {
            border-color: #5409DA;
        }

        .search-popup-close {
            background: none;
            border: none;
            font-size: 20px;
            color: #777;
            cursor: pointer;
            margin-left: 10px;
            transition: color 0.3s;
        }

        .search-popup-close:hover {
            color: #333;
        }

        .search-results-container {
            max-height: calc(80vh - 70px);
            overflow-y: auto;
            padding: 10px;
        }

        .search-result-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 6px;
            transition: background 0.3s;
            text-decoration: none;
            color: #333;
        }

        .search-result-item:hover {
            background: #f8f8f8;
        }

        .search-result-thumbnail {
            width: 45px;
            height: 60px;
            border-radius: 4px;
            object-fit: cover;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .search-result-title {
            font-weight: 600;
            font-size: 14px;
            line-height: 1.3;
        }

        .search-loading {
            display: none;
            text-align: center;
            padding: 20px;
            color: #777;
        }

        .search-loading.active {
            display: block;
        }

        .search-empty {
            text-align: center;
            padding: 40px 20px;
            color: #777;
            display: none;
        }

        .search-empty.active {
            display: block;
        }

        .search-empty i {
            font-size: 40px;
            margin-bottom: 15px;
            color: #ddd;
        }

        /* Mobile specific styles */
        @media (max-width: 768px) {
            .search-popup-content {
                max-height: 100vh;
                height: 100vh;
                border-radius: 0;
            }

            .search-results-container {
                max-height: calc(100vh - 70px);
            }

            .search-popup-header {
                padding: 15px;
            }

            .search-popup-input {
                padding: 10px 12px;
                font-size: 15px;
            }

            .search-result-item {
                padding: 8px 10px;
            }

            .search-result-thumbnail {
                width: 40px;
                height: 55px;
                margin-right: 10px;
            }

            .search-result-title {
                font-size: 13px;
            }
        }

        /* Dark mode support */
        .dark-mode .search-popup-content {
            background: #2d3748;
            color: white;
        }

        .dark-mode .search-popup-input {
            background: #4a5568;
            border-color: #4a5568;
            color: white;
        }

        .dark-mode .search-popup-input:focus {
            border-color: #5409DA;
        }

        .dark-mode .search-popup-header {
            border-bottom-color: #4a5568;
        }

        .dark-mode .search-result-item {
            color: white;
        }

        .dark-mode .search-result-item:hover {
            background: #4a5568;
        }

        .dark-mode .search-popup-close {
            color: #cbd5e0;
        }

        .dark-mode .search-popup-close:hover {
            color: white;
        }

         body.dark {
    --text-dark: #E2E8F0;
    --text-light: #A0AEC0;
    --bg-light: #1A202C;
    --white: #2D3748;
    --gray-light: #4A5568;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.3);
    
    background-color: #1A202C;
    color: var(--text-dark);
}

.top-manga-item:last-child {
  width: 100%;
}

body.dark .alphabet-btn.active {
  background-color: var(--primary); /* Use the primary color directly */
    color: white; /* White text for better contrast */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); /* Optional: subtle white glow */
}

body.dark .genre-card.selected {
    background-color: var(--primary); /* Use the primary color directly */
    color: white; /* White text for better contrast */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); /* Optional: subtle white glow */
}
body.dark .current-letter::after {
    background: linear-gradient(to right, var(--primary), rgba(164, 129, 255, 0.2));
    height: 2.5px; /* Slightly thicker line in dark mode */
}
body.dark  .tf1-rating-thanks, .current-letter {
      color: var(--text-light) !important;
}

body.dark .user-icon {
  color: var(--text-dark) !important;
}


body.dark .nav-link.active, .tf1-genre-tag, .tf1-tag, .user-icon, .br-genre-tag, .br-stat-value, .text-btn, .btn-login, .show-replies-btn {
    color: var(--text-dark);
}

body.dark .manga-title,
body.dark .slider-manga-title,
body.dark .top-manga-name,
body.dark .most-viewed-title,
body.dark .section-title,
body.dark .slider-title {
    color: var(--text-dark);
}

body.dark .manga-chapter,
body.dark .slider-meta,
body.dark .top-manga-views,
body.dark .history-stat-item span {
    color: var(--text-light);
}

body.dark .search-container,
body.dark .search-chapters,
body.dark .sort-btn,
body.dark .alphabet-btn,
body.dark .genre-card {
    background-color: var(--bg-light);
    border-color: var(--gray-light);
}

body.dark .genre-card:hover {
    background: var(--primary-light);
    color: white;
}

body.dark .theme-toggle .sun-icon {
    color: #FFB347;
}

body.dark .theme-toggle .moon-icon {
    color: #BBFBFF;
}

 .user-menu {
  position: relative;
  display: inline-block;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--gray-light);
  border: none;
  color: var(--text-dark);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.user-btn:hover {
  background: rgba(84, 9, 218, 0.1);
}

.user-icon {
  font-size: 1.25rem;
  color: var(--primary);
}

.dropdown-icon {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  width: 200px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  z-index: 1000;
  display: none;
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.user-btn.active .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(84, 9, 218, 0.05);
  color: var(--primary);
}

.dropdown-item .dropdown-icon {
  width: 18px;
  text-align: center;
  color: var(--text-light);
}

.dropdown-item:hover .dropdown-icon {
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 0.5rem 0;
}

.dropdown-item.logout {
  color: #f56565;
}

.dropdown-item.logout:hover {
  background: rgba(245, 101, 101, 0.1);
}

.dropdown-item.logout .dropdown-icon {
  color: #f56565;
}

/* Mobile styles */
@media (max-width: 768px) {
  .user-dropdown {
    position: fixed;
    top: auto;
    bottom: 60px;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .mobile-menu-btn {
    order: 1;
  }
  
  .user-menu {
    order: 2;
    margin-left: auto;
  }
}

.translators-chap {
  background-color: var(--gray-light);
  padding: 8px 7px;
  border-radius: 8px;
  font-size:10px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

        /* Blurred overlay */
        .signup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(8px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        
        .signup-overlay.active {
            opacity: 1;
            pointer-events: all;
        }
        
        /* Signup modal */
        .signup-modal {
            background: var(--white);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 420px;
            box-shadow: var(--shadow-lg);
            overflow: hidden;
            transform: translateY(20px);
            transition: transform 0.3s ease, opacity 0.3s ease;
            opacity: 0;
        }
        
        .signup-overlay.active .signup-modal {
            transform: translateY(0);
            opacity: 1;
        }
        
        .signup-header {
            padding: 1.5rem;
            text-align: center;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            position: relative;
        }
        
        .signup-header h2 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
        }
        
        .signup-header p {
            font-size: 0.9rem;
            opacity: 0.9;
        }
        
        .close-btn {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: none;
            border: none;
            color: white;
            font-size: 1.25rem;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .close-btn:hover {
            transform: rotate(90deg);
        }
        
        .signup-body {
            padding: 2rem;
        }
        
        /* Google login button */
        .google-btn {
            width: 100%;
            padding: 0.75rem;
            border-radius: var(--radius-md);
            background: var(--white);
            border: 1px solid var(--gray-light);
            color: var(--text-dark);
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }
        
        .google-btn:hover {
            background: var(--gray-light);
            box-shadow: var(--shadow-sm);
        }
        
        .google-icon {
            color: #DB4437;
            font-size: 1.25rem;
        }
        
        .divider {
            display: flex;
            align-items: center;
            margin: 1.5rem 0;
            color: var(--text-light);
            font-size: 0.8rem;
        }
        
        .divider::before, .divider::after {
            content: "";
            flex: 1;
            height: 1px;
            background: var(--gray-light);
        }
        
        .divider::before {
            margin-right: 1rem;
        }
        
        .divider::after {
            margin-left: 1rem;
        }
        
        /* Form styles */
        .form-group {
            margin-bottom: 1.25rem;
        }
        
        .form-label {
            display: block;
            font-size: 0.9rem;
            color: var(--text-dark);
            margin-bottom: 0.5rem;
            font-weight: 500;
        }
        
        .form-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: var(--radius-md);
            border: 1px solid var(--gray-light);
            font-size: 0.95rem;
            transition: var(--transition);
        }
        
        .form-input:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(78, 113, 255, 0.2);
            outline: none;
        }
        
        .password-container {
            position: relative;
        }
        
        .toggle-password {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-light);
            cursor: pointer;
        }
        
        .signup-btn {
            width: 100%;
            padding: 1rem;
            border-radius: var(--radius-md);
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            font-weight: 600;
            border: none;
            cursor: pointer;
            transition: var(--transition);
            margin-top: 0.5rem;
            box-shadow: 0 4px 15px rgba(84, 9, 218, 0.3);
        }
        
        .signup-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(84, 9, 218, 0.4);
        }
        
        .login-link {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.9rem;
            color: var(--text-light);
        }
        
        .login-link a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }
        
        .login-link a:hover {
            text-decoration: underline;
        }
        
        /* Error message */
        .error-message {
            color: #EF4444;
            font-size: 0.85rem;
            margin-top: 0.25rem;
            display: none;
        }
        
        .form-group.error .error-message {
            display: block;
        }
        
        .form-group.error .form-input {
            border-color: #EF4444;
        }
          /* Shared Auth Styles */
  .auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  .auth-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
  
  .auth-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
  }
  
  .auth-overlay.active .auth-modal {
    transform: translateY(0);
    opacity: 1;
  }
  
  .auth-header {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    position: relative;
  }
  
  .auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
  }
  
  .auth-header p {
    font-size: 0.9rem;
    opacity: 0.9;
  }
  
  .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
  }
  
  .icon-circle.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 2px solid #10B981;
  }
  
  /* Form Elements */
  .auth-body {
    padding: 2rem;
  }
  
  .auth-footer {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .auth-btn {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(84, 9, 218, 0.3);
  }
  
  .auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(84, 9, 218, 0.4);
  }
  
  .auth-btn.outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: none;
  }
  
  .text-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    padding: 0.5rem;
  }
  
  .text-btn:hover {
    text-decoration: underline;
  }
  
  .auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
  }
  
  .confirmation-message {
    text-align: center;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

         /* Mobile Theme Toggle - matches desktop style */
.mobile-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
}

/* Dark mode specific styles */
body.dark .mobile-theme-toggle {
  border-color: var(--gray-light);
}

/* Ensure icons are visible in both modes */
.mobile-theme-toggle .sun-icon {
  color: #FFB347;
}

.mobile-theme-toggle .moon-icon {
  color: #BBFBFF;
}

    .top-manga-info {
  min-width: 0; /* This is crucial for text truncation to work in flex containers */
}

.top-manga-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%; /* Ensure it takes full width of container */
  display: block; /* Change from default h4 display */
}

/* For mobile specifically */
@media (max-width: 768px) {
  .top-manga-info {
    max-width: 100%;
    overflow: hidden;
  }
  
  .top-manga-name {
    white-space: normal; /* Allow wrapping on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.tf1-action-btn {
    width: 100%;
  }
/* Add to your existing CSS */
.fa-spinner {
  animation: fa-spin 1s infinite linear;
}
@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(359deg); }
}
.tf1-secondary-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Rating System Styles */
.tf1-rating-container {
  margin: 0rem 0;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
}

.tf1-rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.tf1-rating-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  padding-left: 0.75rem;
}

.tf1-rating-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.tf1-rating-stats {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.tf1-average-rating {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.tf1-rating-count {
  font-size: 0.9rem;
  color: var(--text-light);
}

.tf1-rating-stars {
  margin-bottom: 1.5rem;
}

.tf1-star-rating {
  display: inline-flex;
  direction: rtl; /* Right to left for better hover effect */
}

.tf1-star {
  color: var(--gray-light);
  font-size: 1.75rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin: 0 0.15rem;
}

.tf1-star:hover,
.tf1-star:hover ~ .tf1-star,
.tf1-star.active,
.tf1-star.active ~ .tf1-star {
  color: #FFB347; /* Gold color for stars */
}

.tf1-star:hover::before,
.tf1-star.active::before {
  opacity: 1;
}

.tf1-rating-prompt,
.tf1-rating-thanks {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.tf1-rating-thanks {
  color: var(--primary);
  font-weight: 500;
}

.tf1-rating-distribution {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tf1-rating-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tf1-rating-label {
  font-size: 0.85rem;
  color: var(--text-dark);
  width: 30px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tf1-rating-progress {
  flex: 1;
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.tf1-rating-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.tf1-rating-percent {
  font-size: 0.8rem;
  color: var(--text-light);
  width: 30px;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  .tf1-rating-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .tf1-star {
    font-size: 1.5rem;
  }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.modal p {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-danger {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: #c53030;
}

.report-reason-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.report-description {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  min-height: 100px;
  resize: vertical;
}

/* Comment Loading Animation */
.comment-loading {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.comment-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(84, 9, 218, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-comments {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

/* Reply Form Animation */
.reply-form-enter {
  opacity: 0;
  transform: translateY(-10px);
}

.reply-form-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.reply-form-exit {
  opacity: 1;
}

.reply-form-exit-active {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

 .genre-nav-container {
    display: none; /* Hidden by default */
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Navigation Buttons */
.genre-prev-btn,
.genre-next-btn {
    background: var(--gray-100);
    border: none;
    color: var(--text-dark);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.genre-prev-btn:hover,
.genre-next-btn:hover {
    background: var(--gray-200);
}

.genre-prev-btn:disabled,
.genre-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.genre-prev-btn i,
.genre-next-btn i {
    font-size: 0.8rem;
}

   /* Genre Navigation - Add these styles without affecting existing ones */
.genre-nav-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.genre-prev-btn,
.genre-next-btn {
    background: var(--gray-100);
    border: none;
    color: var(--text-dark);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.genre-prev-btn:hover,
.genre-next-btn:hover {
    background: var(--gray-200);
}

.genre-prev-btn:disabled,
.genre-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.genre-prev-btn i,
.genre-next-btn i {
    font-size: 0.8rem;
}

/* Enhance existing genre card selection without overriding */
.genre-card.selected {
    background-color: var(--primary-light);
    color: var(--primary-dark);

}

/* Make sure this doesn't override your existing grid styles */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Keep your existing genre section styles intact */
.genres-section {
    /* Your existing styles remain unchanged */
    margin-top: 2.5rem;
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.genres-header {
    /* Your existing styles remain unchanged */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.genres-title {
    /* Your existing styles remain unchanged */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-left: 1rem;
}

.genres-title::before {
    /* Your existing styles remain unchanged */
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.history-read-btn {
        text-decoration: none;
    }
    .history-filter-option {
        text-decoration: none;
        padding: 0.75rem 1.25rem;
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--text-dark);
    }
    .history-chapter-count {
        margin-left: 10px;
        font-size: 0.9em;
        color: #666;
        background: #f0f0f0;
        padding: 2px 6px;
        border-radius: 10px;
    }


     body.dark .mobile-nav-link {
            color: var(--text-dark);
        }
        @media (max-width: 992px) {
    .tf1-manga-info {
        padding: 0.5rem !important;
    }
}

body.dark .tf1-genre-tag {
    background: rgb(167 137 221 / 10%) !important;
}

body.dark .pagination-btn {
    color: var(--text-light);
}

body.dark .comment-input, .reply-input {
    padding: 9px 5px;
    background-color: #1A202C;
    color: white;
}

body.dark .comment-input, .reply-input:focus {
    border-bottom-color: none !important;
}
