body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.site-logo {
    display: flex;
    align-items: center;
}

/* Emoji Logo Styling */
.site-logo .emoji-logo {
    font-size: 1em; /* Larger emoji for desktop */
    line-height: 1; /* Adjust vertical alignment */
    margin-right: 10px;
}

header h1 {
    margin: 0;
}

header h1 a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5em; /* Desktop site name font size (max 24px) */
    white-space: nowrap;
}
/* Apply the drop-shadow to the new wrapper */
header .site-name-wrapper .site-name-shadow-container {
    /* Filter shadow is applied to the entire element's shape, including stroke */
    filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.7)); /* Horizontal, Vertical, Blur, Color */
    display: inline-block; /* Crucial for filter to apply correctly to inline content */
}


header .site-name-wrapper a {
    font-size: 1.4em; /* Adjust as needed */
    text-decoration: none;
    font-weight: bold; /* Keep it bold */
    display: inline-block; /* Crucial for background-clip and animation to work correctly */
    white-space: nowrap; /* Prevent text from wrapping if it's long */

    /* Animated Gradient Background */
    /* Define a wider background than the text itself to allow for animation */
    background-image: linear-gradient(to right, #FFA500 0%, #FFD700 30%, #FF4500 70%, #FFA500 100%);
    background-size: 300% auto; /* Make the background three times wider than the text */
    -webkit-background-clip: text; /* Clip the background to the text shape */
    background-clip: text;
    -webkit-text-fill-color: transparent; /* Make the text transparent so the background shows through */
    color: transparent; /* Fallback for browsers that don't support -webkit-text-fill-color */


    /* Animation */
    animation: slideGradient 8s linear infinite; /* Name, duration, timing function, repetition */
}

/* Keyframes for the gradient animation (no change) */
@keyframes slideGradient {
    0% {
        background-position: 0% 0%; /* Start with the background at its initial position */
    }
    100% {
        background-position: 100% 0%; /* Move the background across its full width to create the sliding effect */
    }
}

/* Main Navigation (for desktop) */
header nav {
    display: block;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* Hamburger Menu for Mobile */
.hamburger-menu {
    display: none;
    font-size: 2em;
    cursor: pointer;
    color: #fff;
    z-index: 1001;
    padding: 5px;
}

/* Overlay for mobile menu */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.overlay.active {
    display: block;
    opacity: 1;
}


/* Main container layout */
.container {
    display: flex;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar (for desktop) */
.sidebar {
    width: 200px;
    padding: 20px;
    background-color: #eee;
    margin-right: 20px;
    border-radius: 8px;
    /* No shadows */
}

.sidebar h3 {
    margin-top: 0;
    color: #555;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #007bff;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* Mobile Sidebar (slide-in menu) */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -70%; /* Start off-screen */
    width: 70%; /* Max 70% of screen width */
    max-width: 300px;
    height: 100%;
    background-color: #fff;
    z-index: 999;
    transition: left 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none; /* Hidden initially, JS will unhide/hide */
}

.mobile-sidebar.open {
    left: 0;
    display: block;
}

.mobile-sidebar h3 {
    margin-top: 0;
    color: #555;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.mobile-sidebar ul {
    list-style: none;
    padding: 0;
}

.mobile-sidebar ul li {
    margin-bottom: 15px;
}

.mobile-sidebar ul li a {
    text-decoration: none;
    color: #007bff;
    display: block;
    padding: 5px 0;
}

.mobile-sidebar ul li a:hover {
    text-decoration: underline;
}

.close-btn {
    font-size: 2em;
    color: #333;
    cursor: pointer;
    text-align: right;
    margin-bottom: 20px;
    padding: 5px;
}


/* Main content area */
.content {
    flex-grow: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    /* No shadows */
}

h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Manga Grid for listing pages (used for All Manga and Popular Manga) */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.manga-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 10px;
    /* No shadows */
}

.manga-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.manga-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #ddd;
    /* No shadows */
}

.manga-card h3 {
    font-size: 1.1em;
    margin: 10px 5px;
    color: #007bff;
}

.manga-card h3:hover {
    text-decoration: underline;
}

/* Manga Detail Page */
.manga-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.manga-thumbnail img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    /* No shadows */
}

.manga-info {
    flex-grow: 1;
}

.manga-info h2 {
    margin-top: 0;
    font-size: 2em;
    border-bottom: none;
}

.manga-info p {
    margin-bottom: 5px;
}

.manga-info strong {
    color: #555;
}

/* Genre Tags Styling */
.genre-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-tag {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9em;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.genre-tag:hover {
    background-color: #0056b3;
    text-decoration: none;
}


.chapter-list {
    list-style: none;
    padding: 0;
}

.chapter-list li {
    background-color: #f0f8ff;
    border: 1px solid #cceeff;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-list li a {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.chapter-list li a:hover {
    text-decoration: underline;
}

.chapter-status {
    font-size: 0.8em;
    color: #666;
    background-color: #e9e9e9;
    padding: 3px 8px;
    border-radius: 3px;
}

/* Chapter Reader Page */
.chapter-navigation {
    text-align: center;
    margin-bottom: 20px;
}

.chapter-navigation a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin: 0 10px;
}

.chapter-navigation a:hover {
    background-color: #0056b3;
}

.chapter-images {
    text-align: center;
}

.chapter-images img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
    /* No shadows */
    border-radius: 5px;
}

footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 20px;
    background-color: #333;
    color: #fff;
}


/* Breadcrumbs Styling */
.breadcrumbs {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 0.9em;
    color: #666;
    border-bottom: 1px solid #eee;
}

.breadcrumbs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs li {
    display: inline;
}

.breadcrumbs li + li::before {
    content: "/\00a0";
    padding: 0 5px;
    color: #999;
}

.breadcrumbs li a {
    text-decoration: none;
    color: #007bff;
}

.breadcrumbs li a:hover {
    text-decoration: underline;
}

.breadcrumbs li span {
    font-weight: bold;
    color: #333;
}

.latest-chapter-list {
    list-style: none;
    padding: 0;
}

.latest-chapter-list li {
    background-color: #f0f8ff;
    border: 1px solid #cceeff;
    padding: 8px 15px; /* Reduced vertical padding */
    margin-bottom: 5px; /* Reduced vertical margin between items */
    border-radius: 5px;
    display: flex; /* Use flexbox */
    flex-direction: row; /* Arrange items horizontally */
    justify-content: space-between; /* Space out items (chapter, title, timestamp) */
    align-items: center; /* Vertically align items in the center */
    flex-wrap: wrap; /* Allow items to wrap to the next line on smaller screens */
    gap: 5px; /* Small gap between the flex items */
}

.latest-chapter-list li .chapter-title-link {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    font-size: 1em; /* Slightly reduced font size */
    white-space: nowrap; /* Prevent this part from wrapping */
    flex-shrink: 0; /* Prevent this item from shrinking */
}

.latest-chapter-list li .chapter-title-link:hover {
    text-decoration: underline;
}

.latest-chapter-list li .manga-link {
    font-size: 0.9em; /* Slightly reduced font size */
    color: #555;
    text-decoration: none;
    flex-grow: 1; /* Allow the manga title to take up available space */
    min-width: 80px; /* Ensure it has some minimum width */
}

.latest-chapter-list li .manga-link:hover {
    text-decoration: underline;
}

.latest-chapter-list li .scrape-time {
    font-size: 0.75em; /* Slightly reduced font size */
    color: #777;
    white-space: nowrap; /* Prevent timestamp from wrapping */
    flex-shrink: 0; /* Prevent this item from shrinking */
}

/* Add a media query for very small screens if needed,
   to potentially stack elements if they don't fit horizontally */
@media (max-width: 480px) {
    .latest-chapter-list li {
        flex-direction: column; /* Stack vertically on very small screens */
        align-items: flex-start; /* Align stacked items to the left */
        gap: 2px; /* Smaller gap when stacked */
    }
    .latest-chapter-list li .scrape-time {
        width: 100%; /* Make timestamp take full width */
        text-align: right; /* Keep timestamp aligned to the right */
    }
}





/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    header {
        padding: 3px 3px 3px 3px; /* Adjust these values as desired (e.g., 0.5rem 10px) */
		line-height: 1.2 !important;
    }
	
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .sidebar {
        display: none;
    }

    header nav {
        display: none;
		
    }

    .hamburger-menu {
        display: block;
    }

    .site-logo .emoji-logo {
        font-size: 1em; /* Smaller emoji for mobile */
    }

    header h1 a {
        font-size: 1em; /* Mobile site name font size (max 18px) */
    }

    .mobile-sidebar {
        width: 70%;
        max-width: 280px;
        left: -70%;
    }

    .mobile-sidebar.open {
        left: 0;
    }

    .content {
        margin-left: 0;
        margin-top: 10px;
        width: auto;
    }

    .manga-detail-header {
        flex-direction: column;
        align-items: center;
    }

    .manga-thumbnail img {
        max-width: 150px;
    }
    
    .breadcrumbs {
        padding: 5px 0;
    }

    .breadcrumbs li {
        margin-bottom: 5px;
    }
}












.chapter-navigation {
    text-align: center;
    margin-bottom: 20px;
    display: flex; /* Make it a flex container */
    justify-content: space-between; /* Space out the items */
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px; /* Space between buttons */
}

.chapter-navigation .nav-button {
    display: inline-block;
    padding: 10px 15px; /* Slightly adjusted padding */
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    flex-grow: 1; /* Allow buttons to grow and fill space */
    min-width: 120px; /* Minimum width for readability */
    text-align: center;
    box-sizing: border-box; /* Include padding in width */
}

.chapter-navigation .nav-button:hover {
    background-color: #0056b3;
}

.chapter-navigation .disabled-button {
    background-color: #cccccc; /* Greyed out for disabled */
    color: #666666;
    cursor: not-allowed; /* Indicate it's not clickable */
}

/* Specific styling for previous/next buttons */
.chapter-navigation .prev-button {
    background-color: #28a745; /* Green for Previous */
}

.chapter-navigation .prev-button:hover {
    background-color: #218838;
}

.chapter-navigation .next-button {
    background-color: #ffc107; /* Yellow/Orange for Next */
    color: #333; /* Darker text for better contrast on yellow */
}

.chapter-navigation .next-button:hover {
    background-color: #e0a800;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Adjustments for mobile to stack buttons */
@media (max-width: 500px) { /* Adjust breakpoint if needed */
    .chapter-navigation {
        flex-direction: column; /* Stack buttons vertically */
    }

    .chapter-navigation .nav-button {
        width: 100%; /* Full width on mobile */
        margin: 5px 0; /* Add vertical margin */
    }
}




/* General utility class for hiding elements */
.hidden {
    display: none !important; /* Use !important to ensure it overrides other display properties */
}

/* Style for the "Read more" button */
.read-more-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px; /* Space above the button */
    transition: background-color 0.2s ease;
}

.read-more-btn:hover {
    background-color: #0056b3;
}

/* Optional: Add some margin below the summary paragraphs if they become too close to other elements */
.manga-info p {
    margin-bottom: 10px;
}
