* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: #f8f9fa;
    color: #0d0f12;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gradient {
    background: linear-gradient(90deg, #0073e6, #e67300);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    padding: 0.78rem 1.45rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
    border: 1px solid #0073e6;
    background: #0073e6;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 115, 230, 0.25);
}

.btn-primary:hover {
    background: #005bb3;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 91, 179, 0.28);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
}

.card {
    overflow: hidden;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.section-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.2;
    font-weight: 800;
    color: #0d0f12;
}

.site-header {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(222, 226, 230, 0.75);
    backdrop-filter: blur(14px);
    transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.45rem;
    font-weight: 900;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0073e6, #e67300);
    color: #ffffff;
    font-size: 0.78rem;
}

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a.active {
    color: #0073e6;
}

.header-search,
.mobile-search,
.search-panel-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search input,
.mobile-search input,
.search-panel-form input,
.search-page-panel input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    border: 1px solid #dee2e6;
    border-radius: 0.55rem;
    background: #ffffff;
    color: #212529;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 13rem;
    padding: 0.58rem 0.8rem;
}

.header-search button,
.mobile-search button {
    border: none;
    border-radius: 0.55rem;
    background: #0073e6;
    color: #ffffff;
    padding: 0.58rem 0.9rem;
    font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel-form input:focus,
.search-page-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #0073e6;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.14);
}

.mobile-menu-button {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.55rem;
    background: #f1f3f5;
    padding: 0.55rem;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #343a40;
}

.mobile-nav {
    display: none;
    border-top: 1px solid #dee2e6;
    background: #ffffff;
    padding: 0.75rem 1rem 1rem;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav a {
    display: block;
    border-radius: 0.55rem;
    padding: 0.9rem 1rem;
    font-weight: 700;
    color: #495057;
}

.mobile-search {
    margin-top: 0.65rem;
}

.mobile-search input {
    flex: 1;
    padding: 0.7rem 0.8rem;
}

.site-main {
    padding-top: 72px;
}

.hero-carousel {
    position: relative;
    height: min(70vh, 760px);
    min-height: 500px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 4.8rem;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.detail-meta,
.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.hero-kicker {
    margin-bottom: 1.25rem;
}

.hero-kicker span,
.badge,
.year-badge,
.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.hero-kicker span {
    background: rgba(255, 255, 255, 0.14);
    padding: 0.42rem 0.75rem;
    backdrop-filter: blur(10px);
}

.badge {
    padding: 0.42rem 0.8rem;
}

.badge.accent {
    background: #e67300;
    color: #ffffff;
}

.hero-heading {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 4.7rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.hero-heading-alt {
    display: block;
}

.hero-copy p {
    max-width: 670px;
    margin: 0 0 1.6rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 2.9rem;
    height: 2.9rem;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 2.2rem;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    bottom: 2rem;
    left: 50%;
    display: flex;
    gap: 0.45rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 0.55rem;
    height: 0.55rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.search-panel-section {
    margin-top: -2.4rem;
    position: relative;
    z-index: 5;
}

.search-panel,
.search-page-panel,
.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.2rem;
    padding: 1.3rem;
}

.search-panel h2 {
    margin: 0 0 0.3rem;
    font-size: 1.25rem;
}

.search-panel p {
    margin: 0;
    color: #6c757d;
}

.search-panel-form input {
    width: min(38vw, 420px);
    padding: 0.82rem 0.95rem;
}

.section-block {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.white-section {
    background: #ffffff;
}

.gradient-section,
.page-hero {
    background: linear-gradient(135deg, #e7f2ff, #fff2e6);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.section-heading a {
    margin-left: auto;
    color: #0073e6;
    font-weight: 800;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #fff2e6;
    color: #e67300;
    font-weight: 900;
}

.section-icon.primary {
    background: #e7f2ff;
    color: #0073e6;
}

.grid-large,
.movie-grid,
.category-grid,
.category-overview-grid,
.related-grid {
    display: grid;
    gap: 1.25rem;
}

.grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.poster-link,
.movie-card-link,
.category-tile,
.category-overview-card a {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e9ecef;
}

.poster-wrap img,
.movie-wide-cover img,
.list-cover img,
.category-covers img,
.category-overview-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.group:hover img,
.category-tile:hover img,
.category-overview-card:hover img {
    transform: scale(1.08);
}

.year-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    padding: 0.28rem 0.55rem;
}

.play-dot {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: rgba(0, 115, 230, 0.9);
    color: #ffffff;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translateY(0);
}

.poster-info {
    display: flex;
    min-height: 155px;
    flex-direction: column;
    padding: 0.9rem;
}

.poster-info h3,
.movie-wide-info h3,
.list-title,
.category-tile h3,
.category-overview-body h2 {
    margin: 0;
    font-weight: 900;
    color: #0d0f12;
}

.poster-info h3 {
    display: -webkit-box;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 1rem;
    line-height: 1.35;
}

.poster-info p,
.movie-wide-info p,
.list-content p,
.category-tile p,
.category-overview-body p {
    color: #6c757d;
}

.poster-info p {
    display: -webkit-box;
    min-height: 3em;
    margin: 0.55rem 0 0.75rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.88rem;
}

.movie-meta-row {
    margin-top: auto;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.8rem;
}

.movie-wide-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
}

.movie-wide-info {
    position: absolute;
    right: 1.1rem;
    bottom: 1.1rem;
    left: 1.1rem;
    color: #ffffff;
}

.movie-wide-info h3 {
    margin: 0.65rem 0 0.45rem;
    color: #ffffff;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

.movie-wide-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.category-tile {
    padding: 1rem;
}

.category-covers,
.category-overview-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    height: 120px;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.6rem;
    background: #e9ecef;
}

.category-overview-images {
    grid-template-columns: repeat(4, 1fr);
    height: 155px;
}

.category-tile h3,
.category-overview-body h2 {
    margin-bottom: 0.45rem;
    font-size: 1.1rem;
}

.category-tile p,
.category-overview-body p {
    margin: 0;
    font-size: 0.92rem;
}

.category-overview-body {
    padding: 0 1.1rem 1.1rem;
}

.category-overview-body span {
    display: inline-flex;
    margin-top: 1rem;
    color: #0073e6;
    font-weight: 900;
}

.ranking-list {
    display: grid;
    gap: 1rem;
}

.compact-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.movie-card-list {
    position: relative;
    display: grid;
    grid-template-columns: 118px 1fr;
    align-items: stretch;
    min-height: 150px;
}

.rank-number {
    position: absolute;
    z-index: 3;
    top: 0.65rem;
    left: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #e67300;
    color: #ffffff;
    font-weight: 900;
}

.list-cover {
    display: block;
    overflow: hidden;
    background: #e9ecef;
}

.list-content {
    padding: 1rem;
}

.list-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    font-size: 1.05rem;
}

.list-title:hover {
    color: #0073e6;
}

.list-content p {
    display: -webkit-box;
    margin: 0.55rem 0 0.85rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.92rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
}

.small-page-hero {
    padding: 5rem 0 4rem;
}

.page-hero-copy {
    max-width: 760px;
}

.page-hero-copy h1 {
    margin: 0.85rem 0 0.8rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.08;
    font-weight: 900;
    color: #0d0f12;
}

.page-hero-copy p {
    margin: 0;
    color: #495057;
    font-size: 1.08rem;
}

.filter-panel {
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 180px));
    margin-bottom: 1.5rem;
}

.filter-panel input,
.filter-panel select,
.search-page-panel input {
    width: 100%;
    padding: 0.85rem 0.95rem;
}

.search-page-panel {
    grid-template-columns: 1fr auto;
    margin-bottom: 1.5rem;
}

.detail-top {
    background: #111827;
}

.breadcrumb-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.78);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.78fr);
    gap: 2rem;
}

.detail-main {
    min-width: 0;
}

.player-card {
    background: #111827;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #0b0f17;
}

.movie-video,
.poster-overlay,
.poster-overlay img {
    width: 100%;
    height: 100%;
}

.movie-video {
    background: #000000;
}

.poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #0b0f17;
    padding: 0;
    color: #ffffff;
}

.poster-overlay img {
    object-fit: cover;
    opacity: 0.72;
}

.poster-overlay.is-hidden {
    display: none;
}

.big-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(4rem, 9vw, 6rem);
    height: clamp(4rem, 9vw, 6rem);
    border-radius: 999px;
    background: rgba(0, 115, 230, 0.92);
    color: #ffffff;
    font-size: clamp(1.4rem, 3vw, 2rem);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.player-message {
    position: absolute;
    inset: auto 1rem 1rem;
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    padding: 0.8rem 1rem;
    text-align: center;
}

.detail-content {
    padding-top: 1.8rem;
}

.detail-content h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.18;
    font-weight: 900;
}

.detail-meta {
    margin-bottom: 1rem;
    color: #6c757d;
}

.detail-meta span {
    border-radius: 999px;
    background: #ffffff;
    padding: 0.42rem 0.75rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.3rem;
}

.tag-pill {
    background: #fff2e6;
    color: #b45a00;
    padding: 0.4rem 0.72rem;
}

.content-box,
.info-card {
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.content-box h2,
.info-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.content-box p {
    margin: 0;
    color: #495057;
    line-height: 1.85;
    white-space: pre-line;
}

.detail-sidebar {
    min-width: 0;
}

.info-card {
    position: sticky;
    top: 96px;
}

.info-card dl {
    margin: 0;
}

.info-card div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #edf2f7;
    padding: 0.72rem 0;
}

.info-card div:last-child {
    border-bottom: none;
}

.info-card dt {
    color: #6c757d;
}

.info-card dd {
    margin: 0;
    color: #0d0f12;
    font-weight: 800;
    text-align: right;
}

.info-card a {
    color: #0073e6;
}

.site-footer {
    margin-top: 3rem;
    background: #111827;
    color: #ced4da;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

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

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

.site-footer p {
    margin: 0;
    color: #adb5bd;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: 0.55rem;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
    color: #868e96;
    font-size: 0.92rem;
}

.movie-card.is-hidden {
    display: none;
}

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 5rem;
    }

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

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .info-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .container-custom {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .site-logo {
        font-size: 1.18rem;
    }

    .logo-mark {
        width: 1.8rem;
        height: 1.8rem;
    }

    .hero-carousel {
        height: 68vh;
        min-height: 520px;
    }

    .hero-control {
        display: none;
    }

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

    .btn-primary,
    .btn-ghost {
        width: 100%;
        max-width: 280px;
    }

    .search-panel,
    .search-page-panel {
        grid-template-columns: 1fr;
    }

    .search-panel-form {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .search-panel-form input {
        width: 100%;
    }

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

    .section-heading a {
        margin-left: 0;
    }

    .section-heading {
        flex-wrap: wrap;
    }

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

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

    .poster-info {
        min-height: 145px;
        padding: 0.75rem;
    }

    .movie-card-list {
        grid-template-columns: 92px 1fr;
        min-height: 126px;
    }

    .list-content {
        padding: 0.75rem;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .small-page-hero {
        padding: 3.5rem 0 3rem;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
