
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: #f3f4f6;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.container-custom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(90deg, #60a5fa, #a855f7, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass-effect {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.22);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-bar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #a855f7);
    color: #fff;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.brand-text {
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: #d1d5db;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 9px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 2px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 470px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-link {
    display: block;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.76) 34%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%);
    max-width: 1280px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    color: #93c5fd;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(2.4rem, 5.8vw, 5.8rem);
    line-height: 1.03;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #d1d5db;
}

.hero-meta span,
.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.hero-button,
.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 12px 22px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #a855f7);
    font-weight: 800;
    box-shadow: 0 20px 50px rgba(168, 85, 247, 0.35);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

.quick-search {
    margin-top: -34px;
    position: relative;
    z-index: 8;
}

.search-panel {
    padding: 18px;
    border-radius: 20px;
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 800;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 12px;
}

.search-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    outline: 0;
    padding: 13px 15px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.section-block {
    padding: 64px 0 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1,
.content-card h2 {
    margin: 0;
    color: #fff;
}

.section-heading h2 {
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.2;
}

.slim-heading {
    align-items: center;
}

.slim-heading h2 {
    font-size: 1.45rem;
}

.text-link,
.ranking-head a {
    color: #93c5fd;
    font-weight: 700;
    white-space: nowrap;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px;
}

.small-grid {
    gap: 18px;
}

.movie-card {
    min-width: 0;
}

.movie-card[hidden],
.ranking-card[hidden] {
    display: none;
}

.movie-link {
    display: block;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
    background: rgba(0, 0, 0, 0.32);
}

.play-hover,
.overlay-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.94);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.duration-pill,
.rank-badge {
    position: absolute;
    z-index: 4;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.duration-pill {
    right: 10px;
    top: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.card-body {
    padding: 12px 2px 0;
}

.card-body h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: #60a5fa;
}

.card-meta {
    gap: 8px;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

.card-body p {
    margin: 0 0 9px;
    color: #cbd5e1;
    font-size: 0.86rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 3px 8px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.13);
    font-size: 0.75rem;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.ranking-box {
    position: sticky;
    top: 90px;
    border-radius: 22px;
    padding: 22px;
}

.ranking-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 34px 64px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease;
}

.ranking-list a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.rank-number {
    color: #fca5a5;
    font-weight: 900;
    text-align: center;
}

.ranking-list img {
    width: 64px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.rank-title {
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: #facc15;
    font-size: 0.85rem;
}

.category-home {
    display: grid;
    gap: 48px;
}

.category-strip {
    padding-bottom: 12px;
}

.page-hero {
    padding: 78px 0 12px;
}

.compact-hero {
    padding-bottom: 0;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(2rem, 5vw, 4.6rem);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 1.08rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.category-card {
    border-radius: 24px;
    overflow: hidden;
}

.category-card a {
    display: block;
    padding: 22px;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    border-radius: 12px;
}

.category-card h2 {
    margin: 0 0 8px;
    color: #fff;
}

.category-card p {
    margin: 0 0 14px;
    color: #cbd5e1;
}

.category-card span {
    color: #93c5fd;
    font-weight: 800;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 28px;
}

.filter-chips button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.12);
    padding: 8px 13px;
    cursor: pointer;
}

.filter-chips button.is-active {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #a855f7);
}

.ranking-page-list {
    display: grid;
    gap: 14px;
}

.ranking-card {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.ranking-card a {
    display: grid;
    grid-template-columns: 60px 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.ranking-index {
    color: #fca5a5;
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
}

.ranking-card img {
    width: 180px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.25rem;
}

.ranking-info p {
    margin: 0 0 10px;
    color: #cbd5e1;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: end;
    padding: 56px 0 70px;
}

.detail-bg,
.detail-bg-mask {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px);
    transform: scale(1.08);
    opacity: 0.45;
}

.detail-bg-mask {
    background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.7) 55%, rgba(15, 23, 42, 0.35) 100%);
}

.detail-wrap {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border-radius: 26px;
    padding: 10px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
}

.detail-info h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.06;
}

.detail-line {
    max-width: 800px;
    margin: 0 0 18px;
    color: #e5e7eb;
    font-size: 1.1rem;
}

.detail-tags {
    margin-top: 16px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.25));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.overlay-play {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #a855f7);
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.32);
    font-size: 2rem;
}

.content-card {
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 22px;
}

.content-card h2 {
    margin-bottom: 16px;
}

.content-card p {
    margin: 0 0 14px;
    color: #d1d5db;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.62);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 32px;
    padding: 48px 0 28px;
}

.footer-brand p {
    max-width: 520px;
    color: #9ca3af;
}

.footer-logo {
    margin-bottom: 14px;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-column h3 {
    margin: 0 0 8px;
    color: #fff;
}

.footer-column a {
    color: #9ca3af;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 20px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .ranking-box {
        position: static;
    }
}

@media (max-width: 820px) {
    .container-custom {
        width: min(100% - 24px, 1280px);
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px 10px;
    }

    .hero-carousel {
        height: 64vh;
        min-height: 430px;
    }

    .hero-content {
        bottom: 62px;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
    }

    .hero-prev {
        left: 12px;
    }

    .hero-next {
        right: 12px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-card a {
        grid-template-columns: 48px 112px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-card img {
        width: 112px;
    }

    .ranking-info p {
        display: none;
    }

    .detail-hero {
        min-height: auto;
        padding: 44px 0 44px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .detail-poster {
        max-width: 420px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 2.15rem;
    }

    .hero-meta span,
    .detail-meta span {
        padding: 5px 9px;
        font-size: 0.82rem;
    }

    .movie-grid {
        grid-template-columns: 1fr;
    }

    .ranking-list a {
        grid-template-columns: 28px 54px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .category-covers {
        grid-template-columns: repeat(2, 1fr);
    }
}
