/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #0c0c0c;
    color: white;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to right, black, darkred);
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    text-decoration: none;
}

/* Anime Details Section */
.anime-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

/* Poster and Description Side by Side */
.anime-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    max-width: 1200px;
    width: 100%;
    padding: 15px;
    margin: auto;
}

/* Anime Poster Section */
.series-poster {
    text-align: center;
    flex: 1;
}

.series-poster img {
    width: 150px;
    border-radius: 10px;
}

.series-title {
    font-size: 22px;
    margin-top: 5px;
    font-weight: bold;
}

/* Play Button */
.play-latest-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: red;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    transition: background 0.3s;
    width: fit-content;
    margin: auto;
}

.play-latest-button:hover {
    background: darkred;
}

/* Anime Info */
.series-info {
    flex: 2;
    max-width: 750px;
    background: rgba(20, 20, 20, 0.9);
    padding: 15px;
    border-radius: 12px;
    line-height: 1.6;
    text-align: justify;
}

/* Overview Section - Reduced Gap */
.series-info .overview {
    font-size: 16px;
    font-weight: normal;
    color: #ddd;
    margin-bottom: 5px; /* Reduced gap */
}

/* Genres & Languages - Adjusted Spacing */
.series-genres-languages {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    gap: 3px; /* Reduced spacing */
}

.series-genres,
.series-language {
    display: flex;
    gap: 5px; /* Reduced space between label & answer */
    font-weight: bold;
    align-items: center;
}

.series-genres p,
.series-language p {
    margin: 0;
    font-size: 14px;
    color: #ddd;
    font-weight: normal;
    display: inline;
}

/* Duration & Year */
.series-duration-year {
    display: flex;
    justify-content: flex-start;
    font-size: 16px;
    margin-bottom: 5px;
    gap: 8px;
}

/* Enlarged Rating */
.series-rating {
    font-size: 26px;
    font-weight: bold;
    color: #ffcc00;
    margin-top: 5px;
}

/* ✅ Remove Mobile Right Side Overflow */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    overflow-x: hidden;
    width: 100%;
}

/* ✅ Default Logo Styling */
.logo {
    height: 80px;
    width: auto;
    display: flex;
    justify-content: center; /* Centers the logo horizontally */
    align-items: center;
    margin: auto; /* Ensures perfect centering */
}

/* ✅ Center Logo in Mobile View */
@media (max-width: 768px) {
    header {
        display: flex;
        justify-content: center; /* Centers everything inside the header */
        align-items: center;
        text-align: center;
    }

    .logo {
        height: 70px;
        max-width: 100%;
    }

    /* Adjust Anime Header */
    .anime-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 15px;
        padding: 10px;
        width: 100%;
    }

    /* Responsive Poster */
    .series-poster img {
        width: 80%;
        max-width: 150px;
    }

    /* Responsive Info Box */
    .series-info {
        text-align: left;
        max-width: 100%;
        padding: 20px;
        font-size: 15px;
    }

    .series-info .overview {
        max-height: 100px; /* Set maximum height (adjust this value if needed) */
        overflow-y: auto; /* Enable vertical scrollbar only when content exceeds max-height */
        padding-right: 5px; /* Adds slight space for the scrollbar so text doesn't touch the edge */
        
        /* Webkit specific style for a smoother scrollbar on iOS/Android */
        -webkit-overflow-scrolling: touch;
    }

    .series-genres-languages {
        font-size: 14px;
    }

    .series-rating {
        font-size: 22px;
    }

    .play-latest-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}