body {
    font-family: Arial, sans-serif;
    background-color: #1c0f13; 
    color: #e2e2e2; 
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #637385; 
    padding: 10px;
}

.Logo {
    width: 120px;
    cursor: pointer;
}

.navbar h1 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 3em;
    color: #e2e2e2; 
}

.navbar .icon {
    margin-left: auto;
    color: #e2e2e2; 
    font-size: 2em; 

}

.main-container {
    display: flex;
    width: 100%;
}

.content {
    flex-grow: 1;
    padding: 20px;
    max-width: 100vw;
    overflow-x: hidden; 
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 350px;
    width: 100%;
}

.search-container input {
    padding: 8px;
    padding-right: 20px; 
    width: 100%;
    border: none;
    border-radius: 5px;
    outline: none;
    background-color: #637385;
    color: #e2e2e2;
    font-size: 1.2em;
}

.search-container input::placeholder {
    color: #e2e2e2;
}

.section {
    margin-bottom: 30px;
    position: relative; 
}

.section-title {
    text-align: start;
    margin: 15px 0;
    font-weight: bold; 
    font-size: 2em;
    letter-spacing: 1px; 
    color: #b7cece; 
}

.anime-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    width: 100%;
}

.anime-card {
    background-color: #637385; 
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 calc((100% - 9vw) / 6); 
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    scroll-snap-align: start;
    min-width: 100px; 
}

.anime-card img {
    width: 100%;
    height: 400px; 
    object-fit: cover;
}

.anime-card h3 {
    margin: 8px 0;
    font-size: 1.2em;
    white-space: nowrap; 
    overflow: hidden;    
    text-overflow: ellipsis; 
    color: #e2e2e2; 
}

.anime-card p {
    margin: 8px;
    font-size: 0.8em;
    white-space: nowrap; 
    overflow: hidden;    
    text-overflow: ellipsis; 
    color: #e2e2e2; 
}

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

.anime-card .type,
.anime-card .rating {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px;
    border-radius: 5px;
    font-size: 0.7em;
    color: #e2e2e2; 
}

.anime-card .type {
    top: 5px;
    left: 5px;
}

.anime-card .rating {
    top: 5px;
    right: 5px;
}

.bookmark-icon {
    position: absolute;
    top: 10px; 
    right: 10px; 
    font-size: 1.5em;
    color: gray;
    cursor: pointer;
}

.bookmarked {
    color: gold;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1;
}

.arrow-left {
    left: 0;
}

.arrow-right {
    right: 0;
}

.popup-message {
    display: none;
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    background-color: #444;
    color: #fff;
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1000;
    font-size: 1.5em;
    text-align: center;
}
.popup-message.show {
    display: block;
    opacity: 1;
}

/* Custom scrollbar styles */
.anime-list::-webkit-scrollbar {
    height: 8px; 
}

.anime-list::-webkit-scrollbar-track {
    background: #1c1c1c; 
    border-radius: 10px;
}

.anime-list::-webkit-scrollbar-thumb {
    background: #555; /* Color of the scrollbar thumb */
    border-radius: 10px;
}

.anime-list::-webkit-scrollbar-thumb:hover {
    background: #888; /* Color of the scrollbar thumb when hovered */
}

#loading-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.tv-container {
    position: relative;
    width: 210px;
    height: 210px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tv-icon {
    position: relative;
    font-size: 150px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px; 

}

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


@media (max-width: 768px) {
    .navbar h1 {
        font-size: 1em;
    }

    .content {
        margin-left: 0;
    }

    .search-bar input {
        max-width: 90%;
    }

    .anime-list {


        gap: 10px;
    }

    .anime-card img {
        width: 100%;
        height: 150px; 
    }

    .anime-card {
        flex: 0 0 calc((100% - 40px) / 4); 
        border-radius: 10px;
    }

    .section {
        margin-top: 5px;
        position: relative; 
    }
    .section-title {
        font-size: 1.7em;
        margin: 0px;
    }
}

@media (max-width: 480px) {
    .navbar h1 {
        display: flex;
        align-items: center;
        font-size: 1.9em;
    }

    .Logo {
        width: 70px;
        cursor: pointer;
    }

    .navbar .icon {
        margin-left: auto;
        color: #e2e2e2; 
        font-size: 1.7em; 
    
    }

    .search-bar input {
        max-width: 70%;
    }

    .anime-card {
        flex: 0 0 calc((100% - 20px) / 4); 
    }
    .anime-card h3 {
        font-size: 0.7em;
    }
    .anime-card p {
        margin: 4px;
        font-size: 0.8em;
        white-space: nowrap; 
        overflow: hidden;    
        text-overflow: ellipsis; 
        color: #e2e2e2; 
    }
    .anime-card img {
        width: 100%;
        height: 100px;
    }

    .section {
        margin-bottom: 5px;
        position: relative; 
    }
    .section-title {
        font-size: 1.5em;
        margin: 5px;
    }

    /* Custom scrollbar styles */
.anime-list::-webkit-scrollbar {
    height: 4px; 
}

}