* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: #212529;
    background: #f8f9fa;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: min(100% - 2rem, 88rem);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #212529;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-mark {
    color: #486581;
    display: inline-flex;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: #495057;
    font-weight: 500;
}

.desktop-nav a,
.nav-dropdown button {
    border: 0;
    color: inherit;
    background: transparent;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
    color: #486581;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.75rem);
    width: 12rem;
    padding: 0.5rem 0;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.65rem 1rem;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.header-search {
    display: flex;
    align-items: center;
    width: min(22rem, 32vw);
    border: 1px solid #dee2e6;
    border-radius: 0.85rem;
    background: #ffffff;
    overflow: hidden;
}

.header-search input,
.mobile-panel input,
.live-filter input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0.75rem 0.9rem;
    color: #212529;
}

.header-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #6c757d;
    padding: 0.7rem 0.9rem;
}

.mobile-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: #f1f3f5;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-toggle span {
    width: 1.25rem;
    height: 2px;
    background: #343a40;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid #e9ecef;
    background: #ffffff;
    padding: 1rem;
}

.mobile-panel.is-open {
    display: grid;
    gap: 0.6rem;
}

.mobile-panel form {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.mobile-panel button {
    border: 0;
    background: #486581;
    color: #ffffff;
    padding: 0 1rem;
}

.mobile-panel a {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #495057;
    background: #f8f9fa;
}

.hero {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
    color: #ffffff;
    background: #243b53;
}

.hero-track {
    position: relative;
    min-height: 80vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.94) contrast(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(36, 59, 83, 0.64), rgba(15, 23, 42, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 50rem;
    padding: 7rem 0 6rem;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d9e2ec;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 1.25rem 0 1rem;
    font-size: clamp(2.5rem, 7vw, 5.85rem);
    line-height: 0.98;
    font-weight: 650;
    letter-spacing: -0.06em;
}

.hero p {
    width: min(100%, 43rem);
    color: #edf2f7;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.85rem;
    border: 0;
    border-radius: 0.65rem;
    padding: 0.7rem 1.35rem;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: #486581;
    box-shadow: 0 15px 30px rgba(36, 59, 83, 0.25);
}

.btn-primary:hover {
    background: #334e68;
    transform: translateY(-1px);
}

.btn-light {
    color: #243b53;
    background: #ffffff;
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
    width: 2.2rem;
    background: #ffffff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.25);
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 1.3rem;
}

.hero-next {
    right: 1.3rem;
}

.section {
    padding: clamp(3rem, 7vw, 5rem) 0;
}

.section-soft {
    background: linear-gradient(180deg, #f8f9fa, #ffffff);
}

.section-white {
    background: #ffffff;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -0.04em;
    color: #212529;
}

.section-desc {
    margin-top: 0.7rem;
    max-width: 42rem;
    color: #6c757d;
    line-height: 1.8;
}

.more-link {
    flex: 0 0 auto;
    color: #486581;
    font-weight: 600;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.35rem;
}

.movie-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid #edf2f7;
    border-radius: 0.9rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-card:hover {
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #d9e2ec;
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.055);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.58));
    opacity: 0.86;
}

.movie-badge {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    z-index: 2;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #243b53;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
}

.movie-card-body {
    padding: 1rem;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3rem;
    margin-bottom: 0.55rem;
    color: #212529;
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3rem;
    margin: 0 0 0.8rem;
    color: #6c757d;
    font-size: 0.92rem;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #868e96;
    font-size: 0.82rem;
}

.tag-list {
    margin-top: 0.75rem;
}

.tag-list span,
.meta-pill {
    border-radius: 999px;
    background: #f1f3f5;
    color: #486581;
    padding: 0.25rem 0.55rem;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 12rem 1fr;
}

.movie-card-horizontal .movie-cover {
    aspect-ratio: 4 / 3;
    height: 100%;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 13rem;
    border-radius: 1rem;
    background: #243b53;
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(36, 59, 83, 0.18), rgba(15, 23, 42, 0.86));
}

.category-card span {
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 1rem;
    z-index: 2;
}

.category-card strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.category-card em {
    display: block;
    color: #d9e2ec;
    font-style: normal;
    line-height: 1.6;
}

.rank-list {
    display: grid;
    gap: 0.85rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 3.5rem 4.75rem 1fr;
    align-items: center;
    gap: 1rem;
    border: 1px solid #edf2f7;
    border-radius: 0.9rem;
    background: #ffffff;
    padding: 0.75rem;
    transition: 0.2s ease;
}

.rank-row:hover {
    border-color: #bcccdc;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.rank-number {
    color: #486581;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
}

.rank-row img {
    width: 4.75rem;
    height: 6.25rem;
    border-radius: 0.65rem;
    object-fit: cover;
    background: #d9e2ec;
}

.rank-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.rank-copy strong {
    overflow: hidden;
    color: #212529;
    font-size: 1.05rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy em,
.rank-copy span {
    overflow: hidden;
    color: #6c757d;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-hero {
    background: linear-gradient(90deg, #486581, #243b53);
    color: #ffffff;
    padding: clamp(3.5rem, 8vw, 5rem) 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #d9e2ec;
    font-size: 0.92rem;
}

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

.page-hero h1 {
    margin: 0;
    max-width: 62rem;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 650;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 50rem;
    margin: 1rem 0 0;
    color: #edf2f7;
    font-size: 1.08rem;
    line-height: 1.8;
}

.live-filter {
    display: flex;
    align-items: center;
    width: min(100%, 32rem);
    margin: 0 0 2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.85rem;
    background: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(20rem, 0.85fr);
    gap: 2rem;
    align-items: start;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem;
    background: #111827;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.22);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.58));
    color: #ffffff;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
    width: 5.5rem;
    height: 5.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #243b53;
    font-size: 2.1rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.detail-panel,
.story-card {
    border: 1px solid #edf2f7;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.detail-cover {
    overflow: hidden;
    border-radius: 0.85rem;
    margin-bottom: 1rem;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #d9e2ec;
}

.detail-meta {
    display: grid;
    gap: 0.75rem;
}

.detail-meta div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 0.75rem;
}

.detail-meta span:first-child {
    color: #868e96;
}

.detail-meta span:last-child {
    color: #212529;
    font-weight: 600;
    text-align: right;
}

.story-card {
    margin-top: 1.5rem;
}

.story-card h2 {
    margin: 0 0 0.8rem;
    color: #212529;
    font-size: 1.45rem;
}

.story-card p {
    margin: 0;
    color: #495057;
    line-height: 1.9;
}

.story-card p + p {
    margin-top: 1rem;
}

.site-footer {
    margin-top: 5rem;
    background: #212529;
    color: #ced4da;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3.5rem 0;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 1rem;
}

.site-footer p {
    margin: 0;
    max-width: 34rem;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 1rem;
}

.site-footer a:not(.footer-brand) {
    display: block;
    color: #ced4da;
    margin: 0.55rem 0;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.1rem 1rem;
    text-align: center;
    color: #adb5bd;
}

.search-results-note {
    margin-bottom: 1.25rem;
    color: #6c757d;
}

.empty-state {
    border: 1px solid #edf2f7;
    border-radius: 1rem;
    background: #ffffff;
    padding: 3rem 1.5rem;
    color: #6c757d;
    text-align: center;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .container-custom {
        width: min(100% - 1.25rem, 88rem);
    }

    .header-inner {
        min-height: 4.25rem;
    }

    .hero,
    .hero-track,
    .hero-slide {
        min-height: 68vh;
    }

    .hero-content {
        padding: 5.5rem 0 5rem;
    }

    .hero-arrow {
        display: none;
    }

    .section-head {
        display: block;
    }

    .more-link {
        display: inline-block;
        margin-top: 0.8rem;
    }

    .movie-grid,
    .movie-grid-three,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .movie-card-body {
        padding: 0.85rem;
    }

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

    .rank-row {
        grid-template-columns: 2.4rem 4rem 1fr;
        gap: 0.7rem;
    }

    .rank-row img {
        width: 4rem;
        height: 5.3rem;
    }

    .rank-copy span {
        display: none;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
