@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400..700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-family: "Inter", sans-serif;
    text-decoration: none;
}

body {
    background-color: black;
    color: white;
}

nav {
    background-color: #23252B;
    width: 100%;
    padding-inline: 4rem;
    position: fixed;
    z-index: 9999;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    padding-block: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    align-content: center;
}

nav li:hover {
    background-color: #0e0f11;
}

nav #logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #FF640A;
    display: flex;
    align-content: center;
    gap: 0.25rem;
    text-wrap: nowrap;
    letter-spacing: -0.1rem;
}

nav #logo img {
    width: 1.5rem;
    height: 1.5rem;
}

nav #logo:hover {
    background-color: inherit;
    color: white;
}

nav #logo:hover img{
    filter: grayscale(100);
}

.hero-background {
    position: absolute;
    height: 120vh;
    width: 100%;
    background-color: #0e0f11;
    z-index: -1;
}

.hero {
    display: flex;
    min-height: 80vh;
    background-size: auto;
    position: relative;
    padding-top: 3rem;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgb(0, 0, 0) 10%, transparent);
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, black 30%, rgba(0, 0, 0, 0.183) 90%, transparent, rgba(0, 0, 0, 0.858));
}

.hero-desc {
    width: 25%;
    z-index: 10;
    margin: auto 5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-desc .hero-episodes {
    color: #A0A0A0;
    font-size: 0.9rem;
}

.hero-desc .hero-infos {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-desc .hero-synopsys{
    line-height: 1.5rem;
}

.hero-desc .hero-btn {
    background-color: #FF640A;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    cursor: pointer;
    width: fit-content;
    color:#0e0f11;
    line-height: 1rem;
}

.hero-desc .hero-btn:hover {
    background-color: #fc7323;
    transition: all 0.3s;
}


.hero-desc .hero-btn .info {
    font-weight: 600;
    font-size: 1.25rem;
}

.hero-desc h2 {
    font-size: 2rem;
}

.carousel-section {
    position: relative;
}

.carousel-section h3 {
    margin: 0 0 0.5rem 4.5rem;
    font-weight: 600;
    font-size: 1.75rem;
}

.carousel {
    display: grid;
    grid-auto-columns: calc(100%/6.3);
    grid-auto-flow: column;
    overflow: auto;
    padding-inline: 4rem;
    gap: 0.75rem;
    overscroll-behavior-x: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

@media (max-width: 1719px) {
    .carousel {
        grid-auto-columns: calc(100%/5);
        gap: 0.25rem;
    }
}

@media (max-width: 920px) {
    .hero-background {
        background-position: top right;
    }
}

@media (max-width: 799px) {
    .carousel {
        grid-auto-columns: calc(100%/4);
        padding-inline: 1rem;
    }

    nav {
        padding-inline: 1rem;
    }

    .carousel-section h3 {
        margin-left: 1rem;
    }

    .hero .hero-desc {
        width: 100%;
        margin: auto 1rem;
    }
}

@media (max-width: 569px) {
    .carousel {
        grid-auto-columns: calc(100%/3);
        gap: 0;
        font-size: 0.85rem;
    }
}

@media (max-width: 479px) {
    .carousel {
        grid-auto-columns: calc(100%/2.05);
    }
}

.carousel-wrapper {
    position: relative;
}

.carousel-wrapper .arrow {
    text-align: center;
    width: 4rem;
    position: absolute;
    transform: translateY(-50%);
    top: 50%;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    z-index: 10;
    user-select: none;
}

.carousel-wrapper .prev-arrow {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 50%, transparent);
}

.carousel-wrapper .prev-arrow:hover {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 70%, transparent);
}

.carousel-wrapper .next-arrow {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.7) 50%, transparent);
}

.carousel-wrapper .next-arrow:hover {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.8) 70%, transparent);
}

.carousel::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

.carousel .card {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0.5rem;
    scroll-snap-align: center;
    color: inherit;
}

a:visited {
    color: inherit;
}

.carousel .card .desc {
    margin-top: 0.6rem;
}

.carousel .card:hover .desc {
    display: none;
    visibility: hidden;
}

.carousel .card:hover {
    padding: 0;
}

.cover {
    display: none;
    position: absolute;
    padding: 0.5rem;
    height: 100%;
    width: 100%;
    background-color: hsla(240, 8%, 7%, 0.95);
}

.carousel .card:hover .cover {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cover .card-rating {
    font-size: 0.9rem;
    color: #DADADA;
}

.cover .card-rating .star {
    color: #d19d00;
}

.cover .card-episodes {
    color: #A0A0A0;
    font-size: 0.9rem;
}

.cover .card-desc {
    max-height: 50%;
    overflow-y: scroll;
    position: relative;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.cover .card-link {
    margin-top: auto;
    width: 2rem;
    height: 2rem;
    align-self: flex-end;
}

.cover .card-link img {
    width: 100%;
}

.carousel .card .card-img {
    object-fit: cover;
    aspect-ratio: 9 / 14;
    width: 100%;
}

.carousel .card:hover .card-img {
    height: 100%;
}

footer {
    padding: 2rem;
    text-align: center;
    color: #3b3b3b;
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 0.5rem;
    z-index: 1000;
}

.loading.hidden, main.hidden {
    display: none;
}

.loading {
    width: 60px;
    aspect-ratio: 2;
    --_g: no-repeat radial-gradient(circle closest-side,#FF640A 90%,#ffffff00);
    background: 
      var(--_g) 0%   50%,
      var(--_g) 50%  50%,
      var(--_g) 100% 50%;
    background-size: calc(100%/3) 50%;
    animation: l3 1s infinite linear;
  }
  @keyframes l3 {
      20%{background-position:0%   0%, 50%  50%,100%  50%}
      40%{background-position:0% 100%, 50%   0%,100%  50%}
      60%{background-position:0%  50%, 50% 100%,100%   0%}
      80%{background-position:0%  50%, 50%  50%,100% 100%}
  }