/* ================= GLOBAL ================= */

body {
    margin: 0;
    background: #f5f6f8;
    font-family: system-ui, -apple-system, Segoe UI, Roboto;
    color: #111;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= HEADER ================= */

.header {
    height: 70px;
    background: #1f1f1f;
    display: flex;
    align-items: center;
    padding: 0 30px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 999;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
}

.logo img {
    width: 28px;
    margin-right: 8px;
}

.menu {
    margin-left: 40px;
    display: flex;
    gap: 28px;
}

.menu a {
    color: #bbb;
    font-size: 15px;
    transition: .2s;
}

.menu a:hover {
    color: white;
}

.menu a.active {
    color: #ff3b5c;
}

.search {
    margin-left: auto;
}

.search input {
    background: #333;
    border: none;
    padding: 9px 16px;
    border-radius: 20px;
    color: white;
    width: 220px;
    outline: none;
}

/* ================= CONTAINER ================= */

.container {
    max-width: 1280px;
    margin: auto;
    padding: 30px 20px;
}

/* ================= SECTION ================= */

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ================= GRID ================= */

.grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

/* ================= CARD ================= */

.card {
    display: block;
    transition: .25s;
}

/* ================= POSTER ================= */

.poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    background: #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.card:hover img {
    transform: scale(1.05);
}

/* ================= EPISODE BADGE ================= */

.episode {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, .75);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* ================= TITLE ================= */

.title {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================= CAROUSEL ================= */

.carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel .card {
    min-width: 180px;
    scroll-snap-align: start;
}

/* ================= PAGINATION ================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
}

.pagination a.active {
    background: #ff3b5c;
    color: white;
    border: none;
}

/* ================= BOTTOM NAV ================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}

.bottom-nav a {
    font-size: 22px;
    color: #333;
}

/* ================= RESPONSIVE ================= */

@media (max-width:1200px) {

    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media (max-width:900px) {

    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width:768px) {

    .header {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }

    .menu {
        width: 100%;
        margin-top: 10px;
        gap: 18px;
    }

    .search {
        width: 100%;
        margin-top: 10px;
    }

    .search input {
        width: 100%;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .container {
        padding: 20px 15px 80px;
    }

    .carousel .card {
        min-width: 150px;
    }

}

@media (max-width:480px) {

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .poster {
        border-radius: 10px;
    }

    .title {
        font-size: 13px;
    }

}
/* HEADER LAYOUT */

.header {
    height: 70px;
    background: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
}

/* LOGO */

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-right: 40px;
}

.logo img {
    width: 28px;
    margin-right: 8px;
}

/* MENU */

.menu {
    display: flex;
    gap: 28px;
    align-items: center;
}

.menu a {
    color: #bbb;
    font-size: 15px;
}

.menu a:hover {
    color: white;
}

.menu a.active {
    color: #ff3b5c;
}

/* DROPDOWN */

.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    background: white;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    min-width: 160px;
    overflow: hidden;
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
}

.dropdown-menu a:hover {
    background: #f2f2f2;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* SEARCH */

.search input {
    background: #333;
    border: none;
    padding: 9px 16px;
    border-radius: 20px;
    color: white;
    width: 220px;
    outline: none;
}