:root {
    --primary-bg: #151515; /* Main background color */
    --secondary-bg: #2D2D2D; /* Secondary background color */
    --text-color: #FFFFFF; /* Text color */
    --border-radius: 25px; /* Default border radius */
    --transition-speed: 0.3s; /* Default transition speed */
}

* {
    margin: 0; /* Remove default margin */
    padding: 0px; /* Remove default padding */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

body {
    background-color: var(--primary-bg); /* Set background color */
    color: var(--text-color); /* Set text color */
    line-height: 1.6; /* Improve readability */
    margin: 0 auto;
    min-height: 100vh; /* Ensure body covers full viewport height */
    font-family: Arial, sans-serif;
    background-color: #000;


}
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  scroll-behavior: auto !important;
  overflow-anchor: none;
}


h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif; /* Set Lato for headers */
    font-weight: 700; /* Use bold weight for headers */
}

h1 {
    font-weight: 400;
    font-size: 16px;
    color: #f2f2f2;
}

h2 {
    font-weight: 700; /* Bold font for h2 */
    font-size: 14px;
    color: #f2f2f2;
}

h3 {
    font-weight: 200; /* Normal weight for h3 */
    font-size: 16px;
    
}

/* Remove underline from all anchor links */
a {
    text-decoration: none;
}



/* Other header elements (h4, h5, h6) can be customized similarly */

.line-divider {
    border: none; /* Remove default styling */
    border-top: 1px solid rgba(255, 255, 255, 0.525); /* Use RGBA for color with opacity */
    margin: 20px; /* Add 10px padding on both ends */
    width: calc(100% - 50px); /* Ensure it fits with padding */
    align-self: center; /* Center the divider */
}


.section-header {
    display: flex; /* Arrange items in a row */
    justify-content: space-between; /* Distribute items */
    align-items: center; /* Align items vertically */
    width: 100%; /* Full width */
    padding: 20px; /* Add padding */
    margin-bottom: 20px; /* Space between header and content */

}

.recent-updates {
    background-color: var(--secondary-bg);
    padding: 10px;
    border-radius: var(--border-radius);
    margin: 10px 0;
}


.section-title {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    padding-left: 20px;
    line-height: 40px;
}
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  scroll-margin: 0 !important;
  overscroll-behavior: contain;
  /* Ensure it doesn't cause overflow */
  max-width: 100%;
  box-sizing: border-box;
}

.search-input {
  display: flex;
  align-items: center;
  background: linear-gradient(145deg, #323232, #292929);
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  width: 220px;
  height: 40px;
  box-shadow: inset 3px 3px 5px rgba(0, 0, 0, 0.5), 
              3px 3px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  /* Prevent input from causing overflow */
  max-width: 100%;
  box-sizing: border-box;
}

.search-input:focus-within {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.search-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  outline: none;
  font-size: 16px;
  scroll-margin: 0 !important;
  scroll-padding: 0 !important;
  padding: 5px;
  /* Prevent input from expanding beyond container */
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.search-input img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.search-input img:hover {
    opacity: 1;
}

.search-results-container {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  right: 0; /* Add this to prevent overflow */
  width: auto; /* Change from fixed width */
  max-width: 220px; /* Set max-width instead */
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden; /* Prevent horizontal overflow */
  background-color: #292929;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  box-sizing: border-box;
}

.search-results-container.visible {
    display: block;
}

.search-result-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-card img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0; /* Ensures the image keeps its size */

}
.search-result-card .text-container {
    flex: 1; /* Allows text to take the remaining space */
    min-width: 0; /* Prevents text container from forcing overflow */
    overflow: hidden;
}

.search-result-card h3 {
    font-size: 14px; /* Reduced by 2 points */
    color: var(--text-color);
    margin: 0;
    flex: 1; /* Allows the text to take remaining space */
    min-width: 0; /* Prevents overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." when text is too long */
}
/* 8. Mobile responsive fixes */
@media (max-width: 639px) {
  .search-container {
      width: 180px;
      height: 35px;
      max-width: calc(100vw - 40px); /* Ensure it fits within viewport */
  }
  
  .search-input {
      height: 25px;
      width: 160px;
      max-width: 100%;
  }
  
  .search-input input {
      font-size: 12px;
  }
  
  .search-results-container {
      max-width: 180px;
      left: 0;
      right: auto;
  }
  
  
}

@media (min-width: 391px) and (max-width: 639px) {
  .search-container {
      width: 200px;
      height: 35px;
      max-width: calc(100vw - 40px);
  }
  
  .search-input {
      height: 35px;
      width: 180px;
      max-width: 100%;
  }
  
  .search-input input {
      font-size: 15px;
  }
  
  .search-results-container {
      max-width: 200px;
  }
}

/* end of index */



/* Footer styling */
.footer {
    background-color: #151515; /* Use secondary background */
    padding: 20px; /* Add padding */
    text-align: center; /* Center text */
    width: 100%; /* Full width */
}

/* Footer navigation styling */
.footer-nav {
    display: flex; /* Arrange items in a row */
    gap: 20px; /* Space between items */
    justify-content: center; /* Center items */
    margin-bottom: 20px; /* Adds space between nav items and copyright section */
}

/* Footer buttons styling */
.footer-nav button {
    padding: 10px; /* Add padding */
    background-color: var(--primary-bg); /* Match primary background */
    border: none; /* Remove default border */
    color: var(--text-color); /* Match text color */
    font-size: 16px; /* Standard font size */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Optional: add rounded corners to the buttons */
}

/* Hover effect for footer buttons */
.footer-nav button:hover {
    background-color: var(--secondary-bg); /* Change background on hover */
}

/* Copyright section */
.copyright {
    margin-bottom: 10px; 
    position: flex;
    align-items: center;
    
    
;
}
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background-color: #dddbdb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    opacity: 0; /* Initially hidden */
    transform: translateY(100px); /* Slide down initially */
}

/* Scroll to top button chevron image styling */
.scroll-to-top img {
    width: 15px;
    height: 15px;
    filter: invert(1); /* Adjust icon color for dark backgrounds */
}

/* Hover effect for the button */
.scroll-to-top:hover {
    background-color: #333333;
    transform: scale(1.1); /* Slight zoom on hover */
}

/* Visible state for the button */
.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hidden state for the button */
.scroll-to-top:not(.visible) {
    opacity: 0;
    transform: translateY(20px); /* Slide the button out of view */
}



.load-more {
    display: block;
    font-family: 'Raleway', sans-serif;
    margin: 20px auto;
    padding: 10px 20px;
    background: #2d2d2d; /* Set background to #2d2d2d */
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.load-more:hover,
.load-more:active {
    background-color: #4954d0;
    color: white;
}



/************************** novel html css ******************************/ 


.novel-container {
    display: flex;
    flex-wrap: wrap; /* Allows stacking on smaller screens */
    background-color: #252525;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    order: -1; /* Moves this above the cover banner */
}



/* Cover Section */
.cover-section {
    height: 300px;
    width: 100%;
    position: relative;
}

.cover-banner {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    object-fit: cover;
}

.overlay-chapter-item {
    cursor: pointer;
    pointer-events: auto; /* Make sure this isn't set to 'none' */
    /* other styles */
}
/* Metadata Section */
.chapter-header {
    position: relative;
    margin: -350px auto 20px;
    background: #121212;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.post-header {
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}



.chapter-container {
    display: flex;
    gap: 20px;
    padding: 30px;
}

.left-column {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center; 
    gap: 15px;/* Center align */
}

.novel-cover {
    width: 180px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}


.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Info Table */
.info-table {
width: 100%;
border-collapse: collapse;
background: #1e1e1e;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Info Table Styling */
.info-table td {
padding: 8px 12px;
border: 1px solid #333;
color: #e0e0e0;
}

.info-table tr:nth-child(odd) {
background: #252525;
}

.description-wrapper {
  position: relative;
  max-width: 100%;
}

/* Default collapsed state */
.description {
  position: relative;
  max-width: 100%;
  padding: 15px;
  font-size: 14px;
  line-height: 1.6;
  background: #2d2d2d; /* Dark background */
  color: #ffffff; /* Light text */
  border-radius: 8px;
  overflow: hidden;
  max-height: 150px; /* Default collapsed height */
  transition: max-height 0.3s ease-in-out;
}

/* Hide checkbox */
#toggle-description {
  display: none;
}

/* Expand description when checked */
#toggle-description:checked ~ .description {
  max-height: 1000px; /* Large enough to fit content */
}

/* View More & View Less buttons */
.view-more,
.view-less {
  display: block;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-align: center;
  padding: 8px;
  border-radius: 4px;
  margin-top: 5px;
  transition: background 0.3s;
}

.view-more:hover,
.view-less:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Show "View More" by default */
.view-less {
  display: none;
}

/* Toggle visibility when expanded */
#toggle-description:checked ~ .view-more {
  display: none;
}

#toggle-description:checked ~ .view-less {
  display: block;
}


.description p {
    margin-bottom: 15px; /* Space between paragraphs */
}

/* Chapter List Section */
.chapter-section {
    background: #121212;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bookmark-btn {
    padding: 10px 16px;
    background: #ff9900;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s ease-in-out;
}

.bookmark-btn:hover {
    background: #cc7a00;
}
.stars {
  display: inline-block;
  font-size: 20px;
  cursor: pointer;
}

.star {
  color: #ddd;
  transition: color 0.2s;
  font-size: 20px;
}

.star:hover,
.star.active {
  color: #ffcc00;
}

.search-bar {
    width: 100%;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    margin-bottom: 20px;
}

.social-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.social-btn {
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    
}

.facebook { background: #3b5998; }
.twitter { background: #1DA1F2; }
.reddit { background: #FF4500; }


/************************* CHapter List ***************************/


  /* Your existing styles */
  .chapter-list-container {
    max-height: 350px;
    overflow-y: auto;
}

.chapter-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.chapter-item {
    width: 100%;
    padding: 20px;
    background: #1e1e1e;
    border: none;
    border-radius: 4px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    position: relative;
}

.chapter-item:hover {
    background: #252525;
}

.chapter-number {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-time {
    white-space: nowrap;
    font-size: 0.9em;
    color: #aaa;
}

.chapter-item.locked {
    opacity: 0.8;
    border-left: 3px solid #ff6b35;
}

.lock-icon {
    color: #ff6b35;
    font-size: 1rem;
    margin-left: 10px;
}

/* New Chapter Indicator Styles */
.new-badge {
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #ff6b35, #ff9500, #ffcc00);
    color: #000;
    font-size: 0.7em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    animation: shimmer 2s infinite;
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background: linear-gradient(45deg, #ff6b35, #ff9500, #ffcc00);
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    }
    25% {
        background: linear-gradient(45deg, #ff9500, #ffcc00, #ff6b35);
        box-shadow: 0 2px 12px rgba(255, 204, 0, 0.6);
    }
    50% {
        background: linear-gradient(45deg, #ffcc00, #ff6b35, #ff9500);
        box-shadow: 0 2px 16px rgba(255, 149, 0, 0.8);
    }
    75% {
        background: linear-gradient(45deg, #ff6b35, #ffcc00, #ff9500);
        box-shadow: 0 2px 12px rgba(255, 107, 53, 0.6);
    }
    100% {
        background: linear-gradient(45deg, #ff9500, #ff6b35, #ffcc00);
        box-shadow: 0 2px 8px rgba(255, 149, 0, 0.4);
    }
}

/* Alternative pulsing effect */
.new-badge.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Glow effect variant */
.new-badge.glow {
    animation: glow 2s infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 204, 0, 0.8), 0 0 30px rgba(255, 149, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
}

/* Enhanced Chapter Overlay Styles - Orange Theme */
.chapter-list-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 50%;
    max-width: 600px;
    height: 100%;
    background: rgba(26, 26, 26, 0.98);
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
    border-left: 2px solid #ffcc00;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.chapter-list-overlay.active {
    right: 0;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ffcc00;
}

.overlay-header h2 {
    font-size: 1.8rem;
    color: #ffcc00;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 204, 0, 0.2);
    border: 2px solid #ffcc00;
    color: #ffcc00;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #ffcc00;
    color: #1a1a1a;
    transform: rotate(90deg);
}

.overlay-section {
    margin-bottom: 30px;
}

.overlay-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 204, 0, 0.3);
    color: #ffcc00;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.overlay-section h3 i {
    background: rgba(255, 204, 0, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #ffcc00;
}

.overlay-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overlay-chapter-list.boxed {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 10px;
    background: rgba(45, 45, 45, 0.3);
}

.overlay-chapter-list.boxed::-webkit-scrollbar {
    width: 6px;
}

.overlay-chapter-list.boxed::-webkit-scrollbar-track {
    background: rgba(45, 45, 45, 0.3);
    border-radius: 3px;
}

.overlay-chapter-list.boxed::-webkit-scrollbar-thumb {
    background: rgba(255, 204, 0, 0.5);
    border-radius: 3px;
}

.overlay-chapter-list.boxed::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 204, 0, 0.7);
}

.overlay-chapter-item {
    background: rgba(45, 45, 45, 0.6);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(100, 100, 100, 0.2);
}

.overlay-chapter-item:hover {
    background: rgba(255, 204, 0, 0.1);
    transform: translateX(5px);
    border-color: rgba(255, 204, 0, 0.4);
}

.overlay-chapter-item.current {
    background: rgba(255, 204, 0, 0.2);
    border: 2px solid #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.chapter-indicator {
    background: rgba(255, 204, 0, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    color: #ffcc00;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.overlay-chapter-item.current .chapter-indicator {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #1a1a1a;
    border-color: #ffcc00;
}

.chapter-text {
    flex-grow: 1;
    color: #e5e5e5;
}

.chapter-text .title {
    font-weight: 600;
    margin-bottom: 5px;
}

.chapter-text .date {
    font-size: 0.85rem;
    opacity: 0.8;
    color: #b3b3b3;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chapter-list-overlay {
        width: 65%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .chapter-list-overlay {
        width: 85%;
        max-width: none;
    }
}

@media (max-width: 650px) {
    .chapter-list-overlay {
        width: 100%;
        max-width: 100%;
    }
}

/* Floating Navigation Enhancement - Orange Theme */
.floating-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(26, 26, 26, 0.95);
    padding: 12px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.floating-nav.hide {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
}

.floating-nav.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.floating-nav button {
    background: rgba(255, 204, 0, 0.2);
    border: 1px solid rgba(255, 204, 0, 0.3);
    color: #ffcc00;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-nav button:hover {
    background: rgba(255, 204, 0, 0.3);
    transform: translateY(-3px);
    border-color: #ffcc00;
}

.floating-nav button.active {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #1a1a1a;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.7);
    border-color: #ffcc00;
}

/* Overlay backdrop */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}
/***************** End of Chapter.html ********************/



/* Video Ad Modal Styles */
.ad-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  z-index: 10000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.ad-modal.show {
  display: flex;
}

.ad-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ad-header {
  padding: 15px 20px;
  background: #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
}

.ad-title {
  color: #fff;
  font-size: 1.1rem;
}

.ad-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.ad-close:hover {
  opacity: 1;
}

.video-container {
  position: relative;
  width: 100%;
  height: 450px;
  background: #000;
}

.video-js {
  width: 100% !important;
  height: 100% !important;
}

.ad-status {
  padding: 15px 20px;
  background: #1a1a1a;
  text-align: center;
  color: #fff;
}

.ad-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #333;
  border-top: 2px solid #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ad-error {
  color: #ff6b6b;
}

.ad-success {
  color: #51cf66;
}

.retry-button {
  background: #ff6b35;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
  font-size: 1rem;
  transition: background 0.2s;
}

.retry-button:hover {
  background: #e55a2b;
}

/* Responsive Design */
@media (max-width:639px) {
  .ad-container {
      width: 95%;
      margin: 20px;
  }

  .video-container {
      height: 300px;
  }

  .chapter-item {
      padding: 15px;
  }

  .novel-title {
      font-size: 1.5rem;
  }
}

/* Loading states */
.loading-chapters {
  text-align: center;
  padding: 40px;
  color: #aaa;
}

.error-message {
  text-align: center;
  padding: 20px;
  color: #ff6b6b;
  background: #2a1a1a;
  border-radius: 4px;
  margin: 20px 0;
}

.success-message {
  text-align: center;
  padding: 15px;
  color: #51cf66;
  background: #1a2a1a;
  border-radius: 4px;
  margin: 10px 0;
  border-left: 4px solid #51cf66;
}




@media (max-width:639px) {
    .novel-container {
        flex-direction: column; /* Stack left and right columns */
        align-items: center;
    }

    .left-column {
        flex: none;
        width: 100%;
    }

    .novel-cover {
        width: 100%;
        max-width: 300px; /* Keep image a reasonable size */
    }

    .right-column {
        width: 100%;
    }

}




.ads-section {
position: relative;
margin: 0 auto 20px; /* Adjusted margin for better alignment */
background: #121212; /* Dark background color */
border-radius: 8px; /* Rounded corners */
overflow: hidden; /* Ensure content stays within the boundaries */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow around the element */
padding: 20px; /* Add padding inside for content spacing */
}

@media (max-width:639px) {
.ads-section {
margin: 0 15px 20px; /* Adjust margin for smaller screens */
padding: 15px; /* Slightly smaller padding for better space on mobile */
}
}


.novel-container {
    display: flex;
    flex-wrap: wrap; /* Allows stacking on smaller screens */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.warp {
    width: 95%;
    max-width: 1200px;
    margin:  auto;

}

/* Cover Section */
.cover-section {
    height: 500px;
    width: 100%;
    position: relative;
}

.cover-banner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(5px);
}


/* Metadata Section */
.novel-header {
    position: relative;
    margin: -350px auto 20px;
    background: #121212;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.post-header {
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}



.chapter-container {
    display: flex;
    gap: 20px;
    padding: 30px;
}

.left-column {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center; 
    gap: 15px;/* Center align */
}

.novel-cover {
    width: 180px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}


.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 14px;
}

/* Info Table */
.info-table {
width: 100%;
border-collapse: collapse;
background: #1e1e1e;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Info Table Styling */
.info-table td {
padding: 8px 12px;
border: 1px solid #333;
color: #e0e0e0;
}

.info-table tr:nth-child(odd) {
background: #252525;
}


/* Chapter List Section */
.chapter-section {
    background: #121212;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bookmark-btn {

position: relative; /* Needed for absolute positioning of the blob */
background: #ffca28;
color: #fff;
padding: 10px 20px;
font-size: 14px;
font-weight: bold;
border: none;
border-radius: 8px;
cursor: pointer;
overflow: visible; /* Prevents blob overflow */


}

.bookmark-btn:hover {
    background: #cc7a00;
}
.novel-stars{
  font-size: 14px;
 
}
.stars {
  display: inline-block;
  font-size: 24px;
  cursor: pointer;
}

.star {
  color: #ddd;
  transition: color 0.2s;
}

.star:hover,
.star.active {
  color: #ffcc00;
}

.search-bar {
    width: 100%;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    margin-bottom: 20px;
}

.social-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.social-btn {
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    
}

.facebook { background: #3b5998; }
.twitter { background: #1DA1F2; }
.reddit { background: #FF4500; }

.chapter-list-container {
max-height: 350px; /* Limits the visible height to display 10 chapters */
overflow-y: auto;  /* Allows vertical scrolling */
}

.chapter-list {
display: grid;
gap: 2px;
}

.chapter-item {
width: 100%;
padding: 20px;
background: #1e1e1e;
border: none;
border-radius: 4px;
color: #fff;
text-align: left;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
}
.chapter-item:hover {
background: #252525;
}

.chapter-number {
    flex-grow: 1; /* Allows title to take up available space */
}

.chapter-time {
    white-space: nowrap; /* Prevents the time from wrapping to the next line */
    font-size: 0.9em; /* Slightly smaller font to avoid overwhelming text */
    color: #aaa; /* Optional: Make the timestamp slightly less prominent */
}




@media (max-width:639px) {
    .novel-container {
        flex-direction: column; /* Stack left and right columns */
        align-items: center;
    }

    .header {
      width: 100%;
    }

    .left-column {
        flex: none;
        width: 100%;
    }

    .novel-cover {
        width: 100%;
        max-width: 300px; /* Keep image a reasonable size */
    }

    .right-column {
        width: 100%;
    }
}

.chapter-list {
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}







/* 
  BASE VARIABLES (applied for screens between 371px and 570px)
  This is our base design:
  Font: 14px, Padding: 20px, Margin: 20px/40px 
*/

  
  /* =========================
     CAROUSEL & CONTAINER STYLES
  ========================= */
  
  /* Swiper Container */
  .swiper-container {
    position: relative;
    width: 100%;
    height: 350px; /* fixed height */
    overflow: hidden;
  }
  
  /* Swiper Wrapper */
  .swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease-in-out;
  }
  
  /* Swiper Slide */
  .swiper-slide {
    position: relative;
    flex-shrink: 0; /* prevents slide from shrinking */
    width: 100%;
    height: 350px; /* fixed height */
    overflow: hidden;
    display: flex;
    align-items: center;
    background: transparent;
  }
  
  /* Slide Content */
  .deslide-item {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: var(--padding-left);
    color: #fff;
  }
  
  /* Cover Layer */
  .deslide-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }
  
  /* Image Container – image always fills its container */
  .deslide-cover-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* forces the image to cover container */
    opacity: 0.6;
  }
  
  /* Content within the slide */
  .deslide-item-content {
    position: relative;
    z-index: 2;
    text-align: left;
    width: 80%;
    margin-left: var(--margin-left);
    margin-top: var(--margin-top);
  }
  
  /* Text & Element Styles */
  .desi-sub-text {
    font-size: var(--font-size);
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 5px;
    padding-bottom: 15px;
  }
  
  .desi-head-title {
    font-size: calc(var(--font-size) + 10px);
    font-weight: bold;
    margin-bottom: 10px;
    white-space: normal;
    padding-bottom: 15px;
  }
  
  .sc-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 15px;
  }
  
  .scd-item {
    font-size: var(--font-size);
    margin-right: 15px;
  }
  
  .scd-item i {
    margin-right: 5px;
  }
  
  .status-slider {
    background-color: #ffcc00;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
  }
  
  .tick {
    display: flex;
    align-items: center;
  }
  
  .tick-item {
    background-color: #fff;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 5px;
  }
  
  .desi-description {
    font-size: var(--font-size);
    line-height: 1.6;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }
  
  .desi-buttons {
    display: flex;
    align-items: center;
    position: relative;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: var(--font-size);
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .btn-primary {
    background-color: #ffcc00;
    color: #000;
    margin-right: 10px;
  }
  
  .btn-primary:hover {
    background-color: #e6b800;
  }
  
  .btn-secondary {
    background-color: #fff;
    color: #000;
  }
  
  .btn-secondary:hover {
    background-color: #e6e6e6;
  }
  
  /* Navigation & Pagination */
  .swiper-pagination {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 10px;
    z-index: 10;
  }
  
  .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #fff;
    opacity: 0.6;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.3s ease;
  }
  
  .swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #ffcc00;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    position: absolute;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
  }
  
  .swiper-button-next {
    top: calc(50% - 50px);
  }
  
  .swiper-button-prev {
    top: calc(50% + 10px);
  }
  
  /* =========================
     BREAKPOINTS
  ==========================*/
  
  /* 1. Max-width: 370px (Extra Small Devices)
     Decrease sizes by roughly 1pt.
  */
  @media (max-width: 639px) {
    :root {
      --font-size: 12px;
      --padding-left: 10px;
      --margin-left: 10px;
      --margin-top: 30px;
    }
    .search-container {
        width: 180px;
        height: 35px;

    }
    .search-container,
.header {
  overscroll-behavior: contain;
  scroll-margin: 0 !important;
}
    .search-input input{
        font-size: 12px;
    }

    .search-input {
        height: 25px;
        width: 160px;

    }
    .section-header {
        padding: 5px

    }

    .section-title {
        font-size: 12px;
    }
    .swiper-slide {
      background-color: transparent !important;
    }
    .deslide-cover-img {
        height: 310px;

    }
    .swiper-container {
        height: 310px
     }
   
    .sc-detail,
    .desi-description {
      display: none;
    }
    .deslide-item {
      padding-left: var(--padding-left);
    }
    .deslide-item-content {
      max-width: 100%;
      margin-left: var(--margin-left);
      margin-top: var(--margin-top);
    }
    .desi-head-title {
      font-size: calc(var(--font-size) + 10px);
      white-space: normal;
    }
    /* Use vertical pagination for mobile */
    .swiper-pagination {
      display: flex !important;
      flex-direction: column;
      gap: 10px;
    }
    .swiper-button-next,
    .swiper-button-prev {
      display: none !important;
    }
  }
  
  /* 2. Screens between 371px and 570px (Base Design) */
  @media (min-width: 391px) and (max-width: 639px) {
    :root {
      --font-size: 15px;
      --padding-left: 20px;
      --margin-left: 20px;
      --margin-top: 40px;
    }
    .search-container {
    width: 200px;
    height: 35px;

}
.search-input input{
    font-size: 15px;
}

.search-input {
    height: 35px;
    width: 180px;

}
.section-header {
    padding: 20px

}

.section-title {
    font-size: 14px;
}
    .swiper-slide {
      background-color: transparent !important;
      height: 350px
    }
    .deslide-cover-img {
        height: 350px;

    }

    
    .swiper-container {
        height: 350px
     }
    .sc-detail,
    .desi-description {
      display: none;
    }
    .deslide-item {
      padding-left: var(--padding-left);
    }
    .deslide-item-content {
      max-width: 100%;
      margin-left: var(--margin-left);
      margin-top: var(--margin-top);
    }
    .desi-head-title {
      font-size: calc(var(--font-size) + 10px);
      white-space: normal;
    }
    .swiper-pagination {
      display: flex !important;
      flex-direction: column;
      gap: 10px;
    }
    .swiper-button-next,
    .swiper-button-prev {
      display: none !important;
    }
  }
  
  /* 3. Screens between 571px and 970px (Increase sizes by ~1pt) */
  @media (min-width: 640px) and (max-width: 1024px) {
    :root {
      --font-size: 15px;
      --padding-left: 21px;
      --margin-left: 21px;
      --margin-top: 41px;
    }
    .swiper-slide {
        background-color: transparent !important;
        height: 370px
      }
    .deslide-cover-img {
        height: 370px;

    }
    .swiper-container {
        height: 370px
     }
    .desi-head-title {
      font-size: calc(var(--font-size) + 10px);
    }
    /* Hide mobile pagination when arrows are visible */
    .swiper-pagination {
      display: none !important;
    }
    .swiper-button-next,
    .swiper-button-prev {
      display: flex !important;
    }

  }
  
  /* 4. Screens between 971px and 1200px (Increase sizes by ~2pt relative to base) */
  @media (min-width: 1024x) and (max-width: 1200px) {
    :root {
      --font-size: 16px;
      --padding-left: 22px;
      --margin-left: 22px;
      --margin-top: 42px;
    }

    .swiper-slide {
        background-color: transparent !important;
        height: 390px
      }
    .deslide-cover-img {
        height: 390px;

    }
    .swiper-container {
        height: 390px
     }
    .desi-head-title {
      font-size: calc(var(--font-size) + 10px);
    }
    .swiper-pagination {
      display: none !important;
    }
    .swiper-button-next,
    .swiper-button-prev {
      display: flex !important;
    }
  }
  
  /* For screens wider than 1200px, you may continue with the 1200px settings or adjust further */
  @media (min-width: 1201px) {
    :root {
      --font-size: 16px;
      --padding-left: 22px;
      --margin-left: 22px;
      --margin-top: 42px;
    }
    .swiper-pagination {
      display: none !important;
    }
    .swiper-button-next,
    .swiper-button-prev {
      display: flex !important;
    }
  }


  .comment-indent {
    margin-left: 1.5rem;
    border-left: 2px solid #333;
}
textarea {
    min-height: 40px;
    max-height: 120px;
    transition: height 0.2s ease;
}
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: #1a1a1a;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    transition: opacity 0.3s ease;
}

.toast.info {
background-color: #1a1a1a;
color: white;
}
.toast.error {
background-color: #ff4444;
color: white;
}
.toast.warning {
background-color: #ffbb33;
color: black;
}
/* Add to your auth UI styles */
input[type="submit"] {
  transition: background-color 0.3s ease;
}

.login-success {
  background-color: #4CAF50 !important;
  color: white !important;
}

.login-error {
  background-color: #f44336 !important;
  color: white !important;
}








/* Index Page CSS */

.novel-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    max-width: max-content;
    gap: 10px;
    padding: 20px;
    min-height: 200px;
}

.novel-card {
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
    background-color: #2d2d2d;
    transition: transform var(--transition-speed);
    position: relative;
    font-family: var(--font-body);
}

.novel-card:hover {
    transform: scale(1.05);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.5);
}

.novelcover-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f3f3; /* Optional: Fallback background */
    border-radius: 5px; /* Optional: Adds rounded corners */
    aspect-ratio: 2 / 3; /* Enforces a consistent aspect ratio (e.g., 2:3) */
}

.novelcover {
    width: 100%;
    height: 100%; /* Ensures the image fills the container */
    object-fit: cover; /* Ensures the image covers the container without distortion */
    background-color: #f0f0f0;
}

.novel-info {
    padding: 10px;
}

.novel-title {
    font-size: 14px;
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-chapter-button {
    padding: 4px 4px;
    background: #474747;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    font-size: small;
}

.latest-chapter-button:hover {
    background: #e5e5e5;
}

.story-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8em;
    color: #999;
}

.genre-tags {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.genre-tag {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.4rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.genre-tag.mature {
    background-color: #dc3545;
}

.genre-tag.bl {
    background-color: #007bff;
}

.genre-tag.gl {
    background-color: #28a745;
}

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

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

@media screen and (max-width: 639px) {
    .novel-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
        padding: 7px;
        background-color: #2d2d2d;
    }

    .novel-title {
        font-size: 10px;
        padding: 0px;
    }
    
    .novel-info {
        padding: 5px;
        font-size: 10px;
    }
    
    .latest-chapter-button {
        padding: 4px 4px;
        font-size: 10px;
    }
}

@media screen and (max-width: 420px) {
    .novel-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
        padding: 7px;
        background-color: #2d2d2d;
    }

    .novel-title {
        font-size: 10px;
        padding: 0px;
    }
    
    .novel-info {
        padding: 5px;
        font-size: 10px;
    }
    
    .latest-chapter-button {
        padding: 4px 4px;
        font-size: 10px;
    }
}

/* Pagination Styles */
.pagination-container {
display: flex;
justify-content: center;
align-items: center;
margin: 30px 0;
flex-wrap: wrap;
gap: 10px;
}

.pagination-button {
background-color: #3a3a3a;
color: #fff;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
font-family: var(--font-body);
}

.pagination-button:hover:not(:disabled) {
background-color: #555;
transform: translateY(-2px);
}

.pagination-button.active {
background-color: #ff5e0e;
font-weight: bold;
}

.pagination-button:disabled {
background-color: #555;
cursor: not-allowed;
opacity: 0.5;
}

.pagination-ellipsis {
color: #fff;
padding: 8px 4px;
}

@media screen and (max-width: 570px) {
.pagination-container {
gap: 5px;
}

.pagination-button {
padding: 6px 10px;
font-size: 14px;
}

/* Hide page numbers on very small screens, keep only prev/next */
@media screen and (max-width: 639px) {
.pagination-button:not(.prev):not(.next):not(.active) {
    display: none;
}

.pagination-ellipsis {
    display: none;
}
}
}






