/* General Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #000000;
}

}

/* Header Styling */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
}

/* Navbar (contains sidebar toggle) */
.navbar {
    background-color: transparent;
    display: flex;
    align-items: center;
}

/* Sidebar Toggle (Hamburger) */
.bars {
    margin-left: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 101; /* Ensure it’s on top */
    display: flex;
    flex-direction: column;
}

.bar1, .bar2, .bar3 {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

/* Bars transform to X when open */
.bars.open .bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.bars.open .bar2 {
    opacity: 0;
}

.bars.open .bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Header Extras (Magnifying Glass & Login Button) */
.header-extras {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    top: 1em;
    right: 1em;
}

/* Magnifying Glass Icon */
.css-icon-search {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    position: relative;
    border-radius: 100%;
    cursor: pointer;
}

.css-icon-search::before {
    content: "";
    display: inline-block;
    position: absolute;
    right: -7px;
    bottom: -3px;
    background: white;
    width: 10px;
    height: 2px;
    transform: rotate(45deg);
}

/* Login Button */
.login {
    background-color: blue;
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 15px;
    transition: opacity 0.3s ease;
}

.login:hover {
    opacity: 0.8;
}

.login:active {
    opacity: 0.4;
}

/* Sidebar / Side Menu */
.side-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background-color: #2a2c31;
    transform: translateX(-350px); /* Default: hidden */
    overflow-y: auto;
    gap: 1em;
    z-index: 5;
    transition: transform 500ms ease;
    padding: 1em;
}

.side-menu.open {
    transform: translateX(0); /* Visible when open */
}

@media only screen and (max-width: 860px) {
    .side-menu {
        width: 300px;
    }
}

/* Close Button */
.close-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #4a4b51;
    border-radius: 20px;
    width: 110px;
    padding: 0.8em 0;
    margin: 2em 0 0 1em;
    line-height: 12px;
    color: #fff;
    font-weight: 500;
    gap: 0.3em;
    cursor: pointer;
}

/* Link Styling */
.nav-list .item a {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Maintain the item's original color */
    transition: color 0.3s ease; /* Smooth color transition */
}

.nav-list .item a:hover {
    color: #f0f0f0; /* Hover effect for a slight lightening */
}

/* Sidebar List Styling */
.nav-list {
    display: flex;
    flex-direction: column;
    margin-top: 0.5em;
    margin-bottom: 1em;
}

.item {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    padding: 1em;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Sidebar Item Hover Effect */
.item:hover {
    background255, 255, 255, 0.1); /* Add a subtle background color on hover */
    border-radius: 8px;
}


/* Genre List */
.genre-list {
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
}

.genre-item {
    padding: 6px 15px;
    width: 49%;
    margin-right: 1%;
    cursor: pointer;
}

.genre-item:nth-of-type(7n + 1) { color: #d0e6a5; }
.genre-item:nth-of-type(7n + 2) { color: #ffdd95; }
.genre-item:nth-of-type(7n + 3) { color: #fc887b; }
.genre-item:nth-of-type(7n + 4) { color: #ccabda; }
.genre-item:nth-of-type(7n + 5) { color: #abccd8; }
.genre-item:nth-of-type(7n + 6) { color: #d8b2ab; }
.genre-item:nth-of-type(7n) { color: #86e3ce; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-links, .login {
        display: none;
    }

    /* Hide search bar in mobile */
    #search-bar {
        display: none;
    }

    /* Sidebar Menu on Mobile */
    .menu {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 250px;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

    .menu.show {
        transform: translateX(0);
    }
    
    .menu a,
    .menu .login {
        padding: 10px 0;
        font-size: 20px;
        color: white;
        text-align: left;
    }
    
    .menu a:hover {
        color: lightblue;
    }
}


/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Slide section beign */
body {
    background: #000000;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #fff;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: none;
}

/* Global Swiper Styles */
.swiper {
    position: relative;
    display: flex;
    width: 100%;
    height: 600px;
    overflow: hidden;
    z-index: 1;
}

@media screen and (max-width: 1400px) {
    .swiper {
        height: 570px;
    }
}

@media screen and (max-width: 1299px) {
    .swiper {
        height: 500px;
    }
}

@media screen and (max-width: 759px) {
    .swiper {
        height: 350px;
    }
}

/* Ensure all slides are positioned and use opacity for the fade effect */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

/* The currently active slide */
.fade-in {
    opacity: 1;
    z-index: 1;
}

/* The transitioning-out slide */
.fade-out {
    opacity: 0;
    z-index: 0;
}


/* Image Container Styles */
.img-container::before {
    content: "";
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #202125 0, rgba(32, 33, 37, 0.6) 40%, rgba(32, 33, 37, 0) 60%, rgba(32, 33, 37, 0) 80%, #202125 100%);
}

.img-container::after {
    content: "";
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -1px;
    background: linear-gradient(0deg, #202125 0, rgba(32, 33, 37, 0) 50%, #202125 100%);
}

@media screen and (max-width: 759px) {
    .img-container::after {
        background: linear-gradient(0deg, #202125 0, rgba(32, 33, 37, 0) 82%);
    }

    .img-container::before {
        opacity: 0;
    }
}

/* Image Styles */
.img {
    width: 100%;
    height: 100%;
    position: absolute;
    object-fit: cover;
}

@media screen and (max-width: 759px) {
    .img {
        opacity: 0.5;
    }
}

/* Content Container Styles */
.content {
    z-index: 1;
    width: 600px;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    color: #cae962;
    left: 2em;
    bottom: 2em;
    padding-bottom: 3em;
    bottom: 0 !important;
}

@media screen and (max-width: 1200px) {
    .content {
        width 50%;
    }
}

@media screen and (max-width: 759px) {
    .content {
        width: 100%;
        padding-right: 100px;
        box-shadow: none;
        background: rgb(0, 0, 0, 0);
    }
}

@media screen and (max-width: 480px) {
    .content {
        padding-right: 10px;
        left: 10px;
    }
}

/* Rank Styles */
.rank {
    color: #cae962;
    font-size: 14px;
    font-family: "Ubuntu", sans-serif;
    font-weight: bolder;
    text-transform: uppercase;
}

@media screen and (max-width: 1200px) {
    .rank {
        font-size: 1px;
    }
}

@media screen and (max-width: 480px) {
    .rank {
        font-size: 10px;
    }
}

/* Title Styles */
.title {
    font-family: "Ubuntu", sans-serif;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-size: 50px;
}

@media screen and (max-width: 1200px) {
    .title {
        font-size: 30px;
        line-height: 1.1em;
        -webkit-line-clamp: 2;
    }
}

@media screen and (max-width: 759px) {
    .title {
        font-size: 30px;
        line-height: 1.1em;
        -webkit-line-clamp: 2;
        margin-bottom: 5px;
    }
}

@media screen and (max-width: 480px) {
    .title {
        font-size: 25px;
        margin-bottom: 0px;
    }
}

/* Icons Styles */
.icons {
    display: flex;
    gap: 1em;
    font-size: 14px;
    align-items: center;
    margin: 0 1em; /* Add margin to ensure icons do not touch the screen edges */
}

@media screen and (max-width: 759px) {
    .icons {
        display: none;
    }
}

.icon {
    display: flex;
    align-items: center;
    gap: 0.3em;
    color: #fff;
    white-space: nowrap; /* Prevent text from wrapping */
}

.icon-span {
    display: inline-block;
    padding: 3px 4px;
    background: #cae962;
    color: #111;
    border-radius: 5px;
    line-height: 1em;
    font-weight: 600;
    font-size: 12px;
}

/* Description Styles */
.description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Poppins", sans-serif;
    color: #fff;
    font-size: 16px;
    margin: 2em 0;
}

@media screen and (max-width: 1299px) {
    .description {
        line-height: 1.1em;
        -webkit-line-clamp: 2;
    }
}

@media screen and (max-width: 480px) {
    .description {
        font-size: 13px;
        width: 80%;
    }
}

/* Watch Button Styles */
.watch-btn {
    display: flex;
    align-items: center;
    gap: 1em;
}

@media screen (max-width: 320px) {
    .watch-btn {
        flex-wrap: wrap;
    }
}

.watch-link {
    display: flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.7rem 1em;
    background-color: #cae962;
    color: #111;
    font-size: 18px;
    border-radius: 30px;
    font-family: "Ubuntu", sans-serif;
    text-decoration: none;
}

@media screen and (max-width: 1200px) {
    .watch-link {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .watch-link {
        font-size: 12px;
        padding-inline: 1.2rem;
    }
}

.detail-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1em;
    background-color: #4a4b51;
    color: #fff;
    gap: 0.3em;
    font-size: 18px;
    border-radius: 30px;
    font-family: "Ubuntu", sans-serif;
    text-decoration: none;
}

@media screen and (max-width: 1200px) {
    .detail-link {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .detail-link {
        font-size: 12px;
        padding-inline: 1.2rem;
    }
}

/* Fade In/Out Effects */
.fade {
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}


/* Slide section end */
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Trending */ 

.trending {
    display: inline-block;
    font-size: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: bolder;
}

/* Trending cards */
/* General Styles for the Trending Section */
.card-section {
    width: 100%;
    overflow-x: auto; /* Allow horizontal scrolling */
    overflow-y: hidden; /* Hide vertical scrollbar */
    padding: 20px 0; /* Adjust padding as needed */
}

/* Anime Cards Container */
.anime-cards {
    display: flex;
    width: max-content; /* Allow the width to grow with content */
    gap: 20px; /* Space between cards */
    scroll-behavior: smooth; /* Smooth scrolling */
    flex-wrap: nowrap; /* Prevent wrapping of cards */
    justify-content: flex-start; /* Align cards to the start */
    position: relative; /* Ensure correct positioning */
}

/* Individual Card Styling */
.anime-card {
    background-color: #202125; /* Card background color */
    border-radius: 8px; /* Rounded corners */
    overflow: hidden; /* Prevent overflow of content */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Card shadow */
    transition: transform 0.3s ease; /* Transition effect on hover */
    width: 200px; /* Fixed width of each card */
    flex-shrink: 0; /* Prevent cards from shrinking */
    position: relative; /* Relative positioning for inner elements */
    text-align: center; /* Center text in card */
}

/* Hover Effect for Cards */
.anime-card:hover {
    transform: scale(1.05); /* Scale up on hover */
}

/* Card Image Styling */
.anime-card img {
    width: 100%; /* Full width image */
    border-bottom: 2px solid #7354e7; /* Bottom border for the image */
}

/* Description Text Styling */
.description-text {
    color: #FFBADE; /* Description text color */
    font-family: "Poppins", sans-serif; /* Font family */
    font-size: 16px; /* Font size */
    margin: 10px 0; /* Margin above and below text */
}

/* Mobile Responsiveness */
@media screen and (max-width: 480px) {
    .anime-cards {
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
        justify-content: center; /* Center cards */
        gap: 10px; /* Reduce the gap between cards */
    }

    .anime-card {
        width: 40%; /* Make cards smaller on mobile */
        margin-bottom: 10px; /* Margin below each card */
    }

    .description-text {
        font-size: 14px; /* Slightly smaller font for descriptions */
    }
}

/* Scrollbar Styling */
.card-section::-webkit-scrollbar {
    height: 8px; /* Height of the scrollbar */
}

.card-section::-webkit-scrollbar-thumb {
    background-color: #7354e7; /* Color of the scrollbar thumb */
    border-radius: 4px; /* Rounded edges for the thumb */
}

.card-section::-webkit-scrollbar-track {
    background: #121212; /* Color of the scrollbar track */
}

/* Firefox Scrollbar Styling */
.card-section {
    scrollbar-width: thin; /* For Firefox, make scrollbar thin */
    scrollbar-color: #7354e7 #121212; /* Thumb color and track color */
}

/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Latest Episodes */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.card {
    width: calc(16.66% - 14px);
    margin: 0 7px 14px;
    background: #2a2c31;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.poster {
    position: relative;
    width: 100%;
    padding-bottom: 130%;
    overflow: hidden;
}

.image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poster:hover .overlay {
    opacity: 1;
}

.info-left, .info-right {
    position: absolute;
    bottom: 10px;
    z-index: 3;
}

.info-left {
    left: 10px;
}

.info-right {
    right: 10px;
}

.btn, .btn-episode {
    font-size: 12px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    background: #fff;
    color: #111;
    margin-right: 4px;
    transition: background 0.3s;
}

.btn:hover, .btn-episode:hover {
    background: #e0e0e0;
}

.btn-episode {
    background: #7bfcfc;
}

.details {
    color: #aaa;
    font-size: 12px;
    padding: 10px;
    border-radius: 0 0 10px 10px;
}

.name {
    color: #fff;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3em;
}

/* Play button styling */
.play-button {
    position: absolute;
    width: 40px; /* Adjust size as needed */
    height: 40px; /* Adjust size as needed */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0; /* Hide initially */
    transition: opacity 0.5s;
}

.overlay:hover .play-button {
    opacity: 1; /* Show on hover */
}

/* Responsive styles */
@media (max-width: 1024px) {
    .card {
        width: calc(25% - 14px);
    }
}

@media (max-width: 760px) {
    .card {
        width: calc(33% - 14px);
    }
}

@media (max-width: 480px) {
    .card {
        width: calc(50% - 6px);
        margin: 0 3px 6px;
    }
}
