﻿html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #222;
    color: #fff;
    margin: 0;
    padding: 0;
}
/* Navbar styling */
.navbar {
    background: #141414;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0px 0px;
}

    .navbar > .container {
        position: relative;
        top: -10px;
    }

.navbar-brand {
    font-weight: 900;
    color: #FFF;
    font-size: 3rem;
    letter-spacing: -1px;
}

    .navbar-brand:hover {
        color: #FFF;
    }

    .navbar-nav .nav-link {
    margin-right: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
    color: #fff;
    text-decoration: none;
}

    .navbar-nav .nav-link::after {
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background-color: white;
        transition: background-color 0.3s ease;
    }

    .navbar-nav .nav-link:hover::after {
        background-color: #E50914;
    }

    .navbar-nav .nav-link:hover {
        color: #E50914;
    }
/* Header ad */
.header-ad {
    width: 100%;
    background: #000;
    text-align: center;
    padding: 10px;
}

    .header-ad img {
        max-width: 100%;
        height: auto;
    }
/* Category row styling */
.category-row {
    margin: 20px 0;
}

.category-title {
    margin: 0 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.chapter-content, .bookPage {    
    margin-top: 30px!important;
    margin-left:10px;
    margin-right:10px;
    /* Ensure text does not force a horizontal scroll */
    white-space: normal;
    /* Break long words onto the next line if needed */
    word-wrap: break-word;
    /* Modern alternative for better wrapping behavior */
    overflow-wrap: break-word;
    /* typical reading-friendly serif font stack */
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px; /* a good, readable size for body text */
    line-height: 1.6; /* extra spacing between lines helps readability */
    white-space: normal; /* ensures text wraps to next line */
    overflow-wrap: break-word; /* breaks very long words if needed */
    font-size: 18px !important;
}

.chapter-content p{
    font-size:18px!important;
}

.pageTitle {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}
.pageTitle span{
    margin-right:10px;
    font-weight:bold;
    font-size:18px;
}

.pageAd{
    text-align:center;
    width:100%;
    height:450px!important;
}

.carousel-container {
    position: relative;
    margin-top: 10px;
    background-color: #111;
    padding: 10px;
    border-radius: 15px;
}

.carousel-items {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 10px 20px;
}
    /* Hide scrollbar */
    .carousel-items::-webkit-scrollbar {
        display: none;
    }
/* Each item will snap to the start of the container */
.item {
    flex: 0 0 auto;
    margin-right: 10px;
    scroll-snap-align: start;
    width: 200px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

    .item:hover {
        transform: scale(1.05);
    }

    .item img {
        width: 100%;
        height: auto;
        border-radius: 4px;
    }

.ad-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

    .ad-item img {
        max-width: 100%;
        border-radius: 5px;
    }

    .ad-item p {
        color: #ddd;
        font-weight: bold;
    }

.book-title {
    margin-top: 5px;
    text-align: center;
    /* Let the font grow/shrink a little with the viewport.
         0.8 rem ≤ size ≤ 1 rem, pegged to 2 vw in between. */
    font-size: clamp(0.8rem, 2vw, 1rem);
    /* Don’t let the text escape its box. */
    white-space: nowrap; /* stay on one line                */
    overflow: hidden; /* hide overflowed chars           */
    text-overflow: ellipsis; /* replace overflow with “…”       */
    max-width: 100%; /* respect the parent width        */
}

.advertising-title {
    text-align: center;
    margin-top: 5px;
    font-size: 1rem;
}
/* Carousel controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

    .carousel-control.left {
        left: 10px;
    }

    .carousel-control.right {
        right: 10px;
    }

    .carousel-control i {
        font-size: 2rem;
        color: #fff;
    }

.paper{
    background-color:#fff;
    color:#000;   
    padding:0px!important;
    margin-top:30px;
}

.paper strong{
    font-weight:bold;
    font-size:26px;
}


.footer-style {
    border-top: 2px solid rgba(0,0,0,0.3);
    background-color: #141414 !important;
    padding: 20px !important;
    color: #fff;
}


/* make sure the parent is relative */
.item.position-relative {
    position: relative;
}


@media (hover: none) and (pointer: coarse) {
    .carousel-control {
        display: none;
    }
}

@media (min-width: 821px) and (max-width: 1024px) {
    .chapter-content {
        font-size: 42px !important;
    }
}

@media (min-width: 769px) and (max-width: 820px) {
    .navbar-brand {
        font-size: 2rem;
    }
    .chapter-content {
        font-size: 32px !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    .chapter-content {
        font-size: 22px !important;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    .carousel-control.left {
        display: none;
    }

    .carousel-control.right {
        display: none;
    }

    .item {
        width: 33%;
    }

    .ad-item {
        width: 33%;
    }

    .advertising-title{
        font-size: 0.6rem;
    }

    .chapter-content{
        font-size:18px!important;
    }
}

