:root{
    --anime-color: 201, 65, 149;
    --show-color: 229, 9, 20;
    --manga-color: 21, 111, 138;
}


/*---------------------------   main ---------------------------*/
main{
    display: flex;
    flex-direction: column;
    gap: 1vh;
    z-index: 1 !important;
    background-image: 
        radial-gradient(circle at 80% 50%, rgba(var(--show-color), 0.25) 0%, transparent 40%);
    background-color: rgb(var(--bg-color));
    overflow-x: hidden;
}

header{
    height: 0 !important;
}
/*----------------------    welcom    ----------------------*/

.welcom_container {
    display: flex;
    height: 100vh;
    min-height: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.welcom {
    flex: 1;
    display: flex;
    position: relative;
}



.welcom_el {
    left: 0;
    top: 0;
    position: absolute;
    min-width: 100%;
    height: 100%;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.welcom_el::after{
    content: '';
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    position: absolute;
    background:linear-gradient(-90deg, rgba(var(--bg-color),0) 80%, rgb(var(--bg-color),1) ),
        linear-gradient(180deg, rgba(var(--bg-color),0), rgba(var(--bg-color),1) 100%) !important;
    z-index: -1;
    pointer-events: none;
}
.welcom_el_img{
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover !important;
    object-position: center !important;
    background-repeat: no-repeat !important;
    z-index: -1 !important;
}
.welcom_el_box {
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
    margin-top: 10%;
    margin-left: 5%;
    align-items: flex-start;
    padding: 1em;
    box-sizing: border-box;
    max-width: 35%;
    min-height: 40%;
    z-index: 4;
}
.welcom_el_box *{
    z-index: 5 !important;
}

.welcom_el_box .btitle {
    font-size: clamp(1.5rem, 3vw, 3em);
    font-weight: bold;
    color: rgb(var(--text-color));
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    overflow: hidden;
    text-align: left !important;
    width: 100%;
}

.welcom_el_box a {
    padding: 0.5em 1em;
    background-color: rgba(var(--primary-color), 0.8);
    border: 1px solid rgb(var(--secondary-color));
    width: fit-content;
    font-weight: bold;
    font-size: clamp(0.8rem, 1.2vw, 1.5em);    
    transition: all 0.3s ease;
    display: flex;
    gap: 0.5em;
    white-space: nowrap;
    align-items: center;
    border-radius: 0.2em;

}

.welcom_el_box p {
    text-align: left;
    width: 100%;
    font-size: clamp(0.8rem, 1vw, 1.2em);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.welcom_el_box a svg {
    width: 1.2em;
    height: 1.2em;
    transition: all 0.3s ease;
}

.welcom_el_box a:hover {
    background-color: rgba(var(--secondary-color), 0.5);
    border-color: rgba(var(--secondary-color), 0.5);
    border-radius: 8px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    gap: 0.5em;
}

.tags a {
    padding: 0 0.5em;
    font-size: clamp(0.6rem, 0.8vw, 1em);
    border: none;
    border-right: 1px solid rgba(var(--secondary-color), 1);
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: transparent;
}

.tags a:last-child {
    border-right: none;
}

.tags a:hover {
    color: rgba(var(--secondary-color), 1);
    background-color: transparent;
}

.redirect_btn {
    display: flex;
    gap: 1em;
    width: 100%;
    margin-top: 2vh;
    flex-wrap: wrap;
}

.redirect_btn a {
    border-radius: 0.5em;
}

.watch_now {
    background-color: rgb(var(--secondary-color)) !important;
    color: rgb(var(--text-color));
}

.welcom_section {
    position: absolute !important;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    min-width: 95%;
    z-index: 2;
    overflow-y: visible !important;
    height: 50% !important;
    display: flex;
    align-items: flex-end;

}


.welcom_section::before,
.welcom_section::after {
    display: none;
}



.welcom_contentcard {
    min-width: max(8vw, 120px) ;
    max-width: 150px ;
    transition: all 0.3s ease;
    border-radius: 0.5em;
    overflow: hidden;
    margin: 0 0;
    height: fit-content;
}

.welcom_contentcard img {
    object-fit: cover ;
    object-position: center;
    width: 100%;
}

.welcom_contentcard_hover {
    transform: scale(1.2) translateY(-10%);
}



/* Responsive adjustments */
@media (max-width: 1024px) {
    
    .welcom_container {
        height: 80vh;
        min-height: 500px;
        max-height: 720px;
    }
    
    .welcom_el_box {
        max-width: 80%;
        margin-top: 15%;
    }
    
    
    .welcom_section {
        bottom: 3vh;
    }  
    .welcom_contentcard {
        min-width: 100px;
        max-width: 100px;
    } 

}

@media (max-width: 768px) {
    .welcom_container {
        height: 70vh;
        min-height: 400px;
    }
    
    .welcom_el_box {
        max-width: 70%;
        margin-top: 15%;
    }
    
    
    .welcom_section {
        bottom: 3vh;
    }
    
}

@media (max-width: 480px) {
    .welcom_container {
        height: 60vh;
        min-height: 450px;
    }
    
    .welcom_el_box {
        max-width: 90%;
        margin-top: 25%;
        padding: 0.5em;
    }
    
    .redirect_btn a {
        padding: 0.3em 0.6em;
        font-size: 0.9rem;
    }
    .welcom_contentcard {
        min-width: 80px;
        max-width: 90px;
    }

}

@media (max-height: 600px) {
    .welcom_container {
        min-height: 600px;
    }
}

/*----------------------    section    ----------------------*/


    .content-block {
      padding: 3rem 0;
      position: relative;
      max-width: 90%;
      min-width: 90%;
      margin: 0 auto;
    }

    .block-header {
      display: flex;
      flex-direction: row-reverse;
      justify-content: space-between;
      align-items: center;
      padding: 0 5%;
      margin-bottom: 1.5rem;
    }

    .block-title {
      font-size: 1.8rem;
      font-weight: 700;
      position: relative;
      color: rgb(var(--secondary-color));
    }

    .block-title::after {
      content: '';
      position: absolute;
      bottom: -8px;
      left: 0;
      width: 60px;
      height: 3px;
      background: rgb(var(--secondary-color));
      border-radius: 3px;
    }

    .slider-controls {
      display: flex;
      gap: 0.8rem;
    }

    .slider-controls button {
      width: 2.8rem;
      height: 2.8rem;
      border-radius: 50%;
      background: rgba(var(--secondary-color), 0.1);
      border: 1px solid rgba(var(--secondary-color), 0.3);
      color: rgb(var(--secondary-color));
      font-size: 1.2rem;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .slider-controls button:hover {
      background: rgb(var(--secondary-color));
      color: white;
      transform: scale(1.1);
    }

    .recommended-slider {
      padding: 1rem 5%;
      overflow: hidden;
      max-width: 90%;
      margin: 0 auto;
    }

    

    

    /* ===== RESPONSIVE ADJUSTMENTS ===== */
    @media (max-width: 1024px) {
      .recommended-slider {
        padding: 1rem 5%;
      }
    }

    @media (max-width: 768px) {
      .block-header {
        align-items: flex-start;
        gap: 1rem;
      }
      
      .content-block{
        max-width: 100%;
      }
    }

    @media (max-width: 480px) {
      .content-block {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
      }
      
      .comments-placeholder {
        padding: 1.5rem;
      }
      
      .block-title {
        font-size: 1.5rem;
      }
    }
    .slider-controls button[disabled] {
        opacity: 0.3;
        cursor: not-allowed;
        transform: none !important;
    }
    
    .slider-controls button[disabled]:hover {
        background: rgba(var(--secondary-color), 0.1) !important;
        color: rgb(var(--secondary-color)) !important;
    }
        @media (max-width: 270px) {
      .block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
      }
    }

/* Watched Episode Cards */
.watchep_ep_list{
    padding-left: 2em;
}
.watched_ep_cadre{
    position: relative;
    height: fit-content !important;
    width: fit-content !important;
}
.watched_ep {
    display: flex;
    width: 22vw;
    height: 9em;
    min-width: 160px;
    max-width: 220px;
    border-radius: 0.5em;
    border: 1px solid rgb(var(--primary-color));
    background-color: rgba(var(--primary-color), 0.2);
    overflow: hidden;
    position: relative;
    background-position: center ;
    background-repeat: no-repeat ;
    background-size: cover ;
    box-shadow: 0px 0px 5px rgba(var(--secondary-color), 0.5);
    scroll-snap-align: start;
    flex-shrink: 0;
    transition: box-shadow 0.3s ease;
}
.watched_ep_img{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-position: center !important;
    background-repeat: no-repeat !important;
    object-fit: cover !important;
}
.watched_ep_cadre:hover .watched_ep {
    box-shadow: 1px 0px 5px 1px rgba(var(--secondary-color), 0.5);
}

.watched_ep .episode_info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: rgba(var(--bg-color), 0.6);
    flex: 1;
    box-sizing: border-box;
    padding: 0.8em;
    gap: 0.3em;
}

.watched_ep .title {
    margin-bottom: auto;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    overflow: hidden;
}

.watched_ep .episode {
    background-color: rgb(95, 165, 95);
    font-size: clamp(0.7rem, 0.9vw, 0.9rem);
    padding: 0.3em 0.5em;
    border-radius: 0.3em;
}

.watched_ep .episode_info > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.watched_ep .ep_onhover {
    position: absolute;
    inset: 0;
    background-color: rgba(var(--bg-color), 0.6);
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.watched_ep .ep_onhover svg {
    width: 2.5em;
    height: 2.5em;
    fill: rgba(var(--secondary-color), 1);
    transition: all 0.3s ease;
}
.watched_ep_cadre .next_episode{
    position: absolute;
    display: flex;
    gap: 0.5em;
    top: 2%;
    right: 2%;
    padding: 0.2em 0.5em;
    opacity: 0;
    pointer-events: none;
    background-color: rgba(var(--primary-color), 1);
    z-index: 4;
    border-radius: 0.5em;
    transform: translateX(50%);
    transition: all 0.3s ease;
}

.watched_ep_cadre .next_episode svg{
    width: 1.2rem;
    height: 1.2rem;
    transition: all 0.3s ease;
}

.watched_ep_cadre .next_episode:hover{
    background-color: rgb(95, 165, 95);
}
.watched_ep_cadre:hover .next_episode{
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translateX(0%);

}

.watched_ep_cadre:hover .watched_ep .ep_onhover {
    opacity: 1;
    pointer-events: all;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .watched_ep {
        min-width: 140px;
        height: 8em;
    }
    
    .slider_btn{
        width: 2em;
        height: 2em;
    }
    .slider_btn svg{
        width: 1.5rem;
        height: 1.5rem;
    }
    .slide_r {
        right: -2em;
    }
    .slide_l {
        left: -2em;
    }
}

@media (max-width: 480px) {
    
    .watched_ep {
        min-width: 120px;
        height: 7em;
    }
    
    .watched_ep .episode_info {
        padding: 0.5em;
    }

    .slider_btn{
        display: none !important;
    }
}



.pagination button{
    padding: 0.5em;
    background-color: rgba(var(--primary-color),0.5);
    border: 1px solid rgb(var(--primary-color));
    border-radius: 0.3em;
    transition: all 0.3s ease;
    align-content: center;
    text-align: center;
    cursor: pointer;
}
.pagination button:hover{
    background-color: rgba(var(--secondary-color),1);
}
.pagination button svg{
    width: 1em;
    height: 1em;
}


.content_list {
    flex: 1;
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 1.5rem);
    padding: 1em;
    box-sizing: border-box;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-y: visible;
}

.content_list::-webkit-scrollbar {
    display: none;
}

.welcom_section .content_list{
    align-items: end;
    padding-top: 3rem;
}