* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    background: #0d0d0f;
}


body {
    min-height: 100vh;

    background: #0d0d0f;

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


img {
    display: block;
    max-width: 100%;
}

.main-header {
    position: sticky;

    top: 0;

    z-index: 1000;

    width: 100%;
    height: 68px;

    background:
        rgba(13,13,15,0.95);

    backdrop-filter:
        blur(12px);

    border-bottom:
        1px solid
        rgba(255,255,255,0.05);
}


.header-container {
    width: 90%;
    max-width: 1600px;
    height: 100%;

    margin: auto;

    display: flex;
    align-items: center;
}


.site-logo {
    display: flex;
    align-items: center;

    margin-right: 45px;

    color: white;

    text-decoration: none;

    font-size: 20px;
    font-weight: 900;

    letter-spacing: 1px;
}


.site-logo span {
    margin-right: 5px;

    color: #8b5cf6;
}


.main-nav {
    display: flex;

    align-items: center;

    gap: 28px;

    flex: 1;
}


.main-nav a {
    color: #a1a1aa;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition: 0.2s;
}


.main-nav a:hover,
.main-nav a.active {
    color: white;
}


.header-actions {
    display: flex;

    gap: 10px;
}


.search-open,
.mobile-menu-button {
    width: 42px;
    height: 42px;

    border: none;

    background: transparent;

    color: white;

    cursor: pointer;

    font-size: 18px;
}


.search-open:hover,
.mobile-menu-button:hover {
    background: #1c1c21;
}


.mobile-menu-button {
    display: none;
}

.hero-carousel {
    position: relative;

    width: 100%;
    height: 620px;

    overflow: hidden;

    background: #0d0d0f;
}


#hero-slides {
    width: 100%;
    height: 100%;
}


.hero-slide {
    position: absolute;

    inset: 0;

    background-size: cover;
    background-position: center;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
}


.hero-slide.active {
    opacity: 1;
    visibility: visible;
}


.hero-shadow {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(13,13,15,0.98) 0%,
            rgba(13,13,15,0.85) 30%,
            rgba(13,13,15,0.30) 65%,
            rgba(13,13,15,0.05) 100%
        ),
        linear-gradient(
            0deg,
            #0d0d0f 0%,
            transparent 40%
        );
}


.hero-content {
    position: absolute;

    z-index: 5;

    left: 8%;
    top: 50%;

    transform:
        translateY(-50%);

    max-width: 580px;
}


.hero-tag {
    display: inline-block;

    margin-bottom: 14px;

    color: #8b5cf6;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.4px;
}


.hero-content h1 {
    margin-bottom: 15px;

    font-size:
        clamp(42px, 5vw, 72px);

    line-height: 1;
}


.hero-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 18px;

    color: #d4d4d8;

    font-size: 14px;
}


.hero-content p {
    margin-bottom: 27px;

    color: #d4d4d8;

    line-height: 1.6;

    font-size: 15px;
}


.hero-buttons {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;
}


.hero-watch,
.hero-details {
    min-height: 46px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0 22px;

    color: white;

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
}


.hero-watch {
    background: #8b5cf6;
}


.hero-watch:hover {
    background: #7c3aed;
}


.hero-details {
    background:
        rgba(255,255,255,0.12);

    backdrop-filter: blur(8px);
}


.hero-details:hover {
    background:
        rgba(255,255,255,0.20);
}

.hero-arrow {
    position: absolute;

    z-index: 20;

    top: 50%;

    transform:
        translateY(-50%);

    width: 45px;
    height: 70px;

    border: none;

    background:
        rgba(0,0,0,0.35);

    color: white;

    font-size: 42px;

    cursor: pointer;

    opacity: 0;

    transition: 0.3s;
}


.hero-carousel:hover
.hero-arrow {
    opacity: 1;
}


.hero-prev {
    left: 20px;
}


.hero-next {
    right: 20px;
}


.hero-dots {
    position: absolute;

    z-index: 20;

    left: 50%;
    bottom: 30px;

    transform:
        translateX(-50%);

    display: flex;

    gap: 8px;
}


.hero-dot {
    width: 8px;
    height: 8px;

    border: none;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.4);

    cursor: pointer;

    transition: 0.3s;
}


.hero-dot.active {
    width: 28px;

    background: #8b5cf6;
}

.ad-section {
    padding: 30px 5%;
}


.ad-container {
    width: 100%;
    max-width: 1200px;

    margin: auto;

    text-align: center;
}


.ad-container > span {
    display: block;

    margin-bottom: 7px;

    color: #606069;

    font-size: 10px;
}


.ad-placeholder {
    min-height: 100px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #17171b;

    border:
        1px dashed #303037;

    color: #606069;

    font-size: 12px;
}


.ad-mobile {
    display: none;
}

.content-section {
    width: 90%;
    max-width: 1600px;

    margin: auto;

    padding: 40px 0 70px;
}


.section-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 25px;
}


.section-subtitle {
    display: block;

    margin-bottom: 6px;

    color: #8b5cf6;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1px;
}


.section-header h2 {
    font-size: 26px;
}


.see-all {
    color: #b4b4bb;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;
}


.see-all:hover {
    color: #8b5cf6;
}

.episode-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(250px, 1fr)
        );

    gap: 22px;
}


.episode-image {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #17171b;
}


.episode-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: 0.3s;
}


.episode-image:hover img {
    transform: scale(1.05);
}


.play-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0,0,0,0);

    color: white;

    font-size: 30px;

    opacity: 0;

    transition: 0.3s;
}


.episode-image:hover
.play-overlay {
    opacity: 1;

    background:
        rgba(0,0,0,0.45);
}


.episode-badge {
    position: absolute;

    left: 10px;
    bottom: 10px;

    padding: 5px 8px;

    background: #8b5cf6;

    color: white;

    font-size: 10px;
    font-weight: 800;
}


.episode-content {
    padding-top: 11px;
}


.episode-anime-title {
    display: block;

    margin-bottom: 5px;

    color: white;

    text-decoration: none;

    font-size: 15px;
    font-weight: 700;
}


.episode-anime-title:hover {
    color: #a78bfa;
}


.episode-content p {
    margin-bottom: 8px;

    color: #a1a1aa;

    font-size: 12px;
}


.episode-meta {
    display: flex;

    justify-content: space-between;

    color: #71717a;

    font-size: 10px;
}

.popular-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(180px, 220px)
        );

    gap: 22px;

    justify-content: start;
}


.popular-image {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    background: #17171b;
}


.popular-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: 0.3s;
}


.popular-image:hover img {
    transform: scale(1.05);
}


.popular-image:hover
.popular-overlay {
    opacity: 1;

    background:
        rgba(0,0,0,0.45);
}


.popular-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    color: white;

    font-size: 35px;

    opacity: 0;

    transition: 0.3s;
}


.popular-info {
    padding-top: 11px;
}


.popular-title {
    display: block;

    margin-bottom: 6px;

    color: white;

    text-decoration: none;

    font-size: 15px;
    font-weight: 700;
}


.popular-title:hover {
    color: #a78bfa;
}


.popular-info p {
    margin-bottom: 7px;

    color: #a1a1aa;

    font-size: 11px;
}


.popular-info span {
    color: #8b5cf6;

    font-size: 10px;
    font-weight: 700;
}

.search-overlay {
    position: fixed;

    inset: 0;

    z-index: 5000;

    padding-top: 90px;

    display: flex;

    justify-content: center;

    background:
        rgba(0,0,0,0.8);

    backdrop-filter: blur(7px);

    opacity: 0;
    visibility: hidden;

    transition: 0.25s;
}


.search-overlay.active {
    opacity: 1;
    visibility: visible;
}


.search-box {
    width: 90%;
    max-width: 750px;

    height: fit-content;

    background: #17171b;

    border:
        1px solid #303037;
}


.search-top {
    display: flex;

    padding: 15px;

    border-bottom:
        1px solid #29292e;
}


#anime-search {
    flex: 1;

    height: 50px;

    padding: 0 18px;

    border: none;
    outline: none;

    background: #0d0d0f;

    color: white;

    font-size: 16px;
}


.search-close {
    width: 50px;

    margin-left: 10px;

    border: none;

    background: transparent;

    color: #aaa;

    font-size: 20px;

    cursor: pointer;
}


.search-results {
    max-height: 500px;

    overflow-y: auto;
}


.search-message {
    padding: 25px;

    color: #71717a;

    text-align: center;

    font-size: 13px;
}


.search-result-item {
    display: flex;

    align-items: center;

    gap: 16px;

    padding: 15px;

    color: white;

    text-decoration: none;

    border-bottom:
        1px solid #29292e;
}


.search-result-item:hover {
    background: #202025;
}


.search-result-item img {
    width: 65px;
    height: 92px;

    object-fit: cover;

    flex-shrink: 0;
}


.search-result-item h3 {
    margin-bottom: 7px;

    font-size: 15px;
}


.search-result-item p {
    color: #8b8b94;

    font-size: 12px;
}

@media (max-width: 850px) {

    .main-nav {
        position: absolute;

        top: 68px;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;

        align-items: flex-start;

        gap: 0;

        padding:
            10px 5% 20px;

        background: #151518;
    }


    .main-nav.active {
        display: flex;
    }


    .main-nav a {
        width: 100%;

        padding: 15px 0;
    }


    .mobile-menu-button {
        display: block;
    }


    .hero-carousel {
        height: 520px;
    }


    .hero-content {
        left: 5%;
        right: 5%;

        top: auto;
        bottom: 70px;

        transform: none;
    }


    .hero-content h1 {
        font-size: 38px;
    }


    .hero-content p {
        max-width: 90%;

        font-size: 13px;
    }


    .hero-arrow {
        display: none;
    }


    .hero-shadow {
        background:
            linear-gradient(
                0deg,
                #0d0d0f 0%,
                rgba(13,13,15,0.78) 50%,
                rgba(13,13,15,0.15) 100%
            );
    }

}

@media (max-width: 550px) {

    .site-logo {
        margin-right: auto;

        font-size: 17px;
    }


    .content-section {
        width: 92%;
    }


    .episode-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }


    .popular-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px;
    }


    .ad-desktop {
        display: none;
    }


    .ad-mobile {
        display: inline;
    }


    .ad-placeholder {
        min-height: 70px;
    }


    .section-header h2 {
        font-size: 21px;
    }

}

.continue-section {
    display: none;
}


.continue-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(260px, 1fr)
        );

    gap: 22px;
}


.continue-card {
    min-width: 0;
}

.continue-image {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #17171b;
}


.continue-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: 0.3s;
}


.continue-image:hover img {
    transform: scale(1.04);
}

.continue-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0,0,0,0);

    color: white;

    font-size: 13px;
    font-weight: 700;

    opacity: 0;

    transition: 0.3s;
}


.continue-image:hover
.continue-overlay {
    opacity: 1;

    background:
        rgba(0,0,0,0.45);
}

.progress-track {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 5px;

    background:
        rgba(255,255,255,0.20);
}


.progress-value {
    height: 100%;

    background: #8b5cf6;
}

.continue-info {
    padding-top: 11px;
}


.continue-title {
    display: block;

    margin-bottom: 5px;

    color: white;

    text-decoration: none;

    font-size: 15px;
    font-weight: 700;
}


.continue-title:hover {
    color: #a78bfa;
}


.continue-info p {
    margin-bottom: 7px;

    color: #a1a1aa;

    font-size: 11px;
}


.continue-info span {
    color: #8b5cf6;

    font-size: 10px;
    font-weight: 700;
}

.library-section {
    display: none;
}

.history-section {
    display: none;
}


.history-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.history-item {
    display: flex;

    align-items: center;

    min-height: 100px;

    padding: 10px;

    background: #17171b;

    color: white;

    text-decoration: none;

    transition: 0.2s;
}


.history-item:hover {
    background: #202025;
}

.history-item img {
    width: 135px;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    flex-shrink: 0;

    margin-right: 15px;
}

.history-info {
    flex: 1;
}


.history-info h3 {
    margin-bottom: 5px;

    font-size: 14px;
}


.history-info p {
    margin-bottom: 7px;

    color: #8b8b94;

    font-size: 11px;
}


.history-info span {
    color: #8b5cf6;

    font-size: 10px;

    font-weight: 700;
}


.history-play {
    margin-left: 15px;

    color: #8b5cf6;
}

.clear-history {
    border: none;

    background: transparent;

    color: #71717a;

    cursor: pointer;

    font-size: 12px;
}


.clear-history:hover {
    color: #a78bfa;
}

@media (max-width: 700px) {

    .history-list {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 500px) {

    .history-item img {
        width: 105px;
    }

}