* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fafaf9;
    color: #292524;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

.nav-wrap {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #0c4a6e;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #059669);
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.22);
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 10px;
    color: #57534e;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #0369a1;
    background: #f0f9ff;
}

.nav-search {
    display: flex;
    align-items: center;
    width: min(310px, 28vw);
    border: 1px solid #d6d3d1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.nav-search input,
.mobile-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    background: transparent;
}

.nav-search button,
.mobile-panel button {
    border: 0;
    color: #ffffff;
    background: #0284c7;
    padding: 10px 14px;
}

.mobile-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #57534e;
    font-size: 24px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid #e7e5e4;
    background: #ffffff;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 10px 0;
    color: #44403c;
    font-weight: 600;
}

.mobile-panel form {
    display: flex;
    border: 1px solid #d6d3d1;
    border-radius: 12px;
    overflow: hidden;
}

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

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #075985);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 92%);
    color: #ffffff;
}

.hero-kicker {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-summary {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.btn-primary,
.btn-ghost,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
    padding: 12px 24px;
    color: #ffffff;
    background: #0284c7;
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover,
.section-link:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.btn-ghost {
    padding: 12px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.62);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
}

.hero-dot.is-active {
    width: 28px;
    background: #ffffff;
}

.section {
    padding: 54px 0;
}

.section-alt {
    background: #f5f5f4;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    color: #1c1917;
}

.section-link {
    min-height: 38px;
    padding: 8px 14px;
    color: #ffffff;
    background: #0284c7;
    white-space: nowrap;
}

.rail-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rail-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #f5f5f4;
    color: #44403c;
    font-size: 24px;
    transition: background 0.2s ease;
}

.rail-button:hover {
    background: #e7e5e4;
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.movie-rail .movie-card {
    flex: 0 0 288px;
    scroll-snap-align: start;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
}

.poster-year {
    right: 10px;
    top: 10px;
    padding: 5px 8px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 38px;
    height: 30px;
    background: #0284c7;
}

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: #1c1917;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #0284c7;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #57534e;
    line-height: 1.7;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #78716c;
    font-size: 13px;
}

.movie-meta span,
.movie-tags span {
    display: inline-flex;
    border-radius: 8px;
    background: #f5f5f4;
    padding: 4px 8px;
}

.movie-tags {
    margin-top: 12px;
}

.movie-tags span {
    color: #0369a1;
    background: #f0f9ff;
    font-size: 12px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.featured-card a {
    position: relative;
    display: block;
    min-height: 280px;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.featured-card:hover img {
    transform: scale(1.06);
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.featured-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 10px;
    padding: 24px;
    color: #ffffff;
}

.featured-content strong {
    font-size: 24px;
}

.featured-content span {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.featured-content em {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-style: normal;
}

.featured-content em span {
    border-radius: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ranking-list span {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: #0284c7;
    font-weight: 900;
}

.ranking-list strong {
    color: #1c1917;
}

.ranking-list small {
    color: #78716c;
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background: linear-gradient(120deg, #0284c7, #0369a1 48%, #059669);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 4vw, 48px);
}

.page-hero p {
    width: min(780px, 100%);
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

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

.category-covers img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    background: #0f172a;
}

.category-card h2 {
    margin: 0 0 10px;
    color: #1c1917;
}

.category-card p {
    margin: 0 0 18px;
    color: #57534e;
    line-height: 1.8;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
}

.input-field,
.toolbar select {
    width: 100%;
    border: 1px solid #d6d3d1;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus,
.toolbar select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.empty-state {
    display: none;
    border-radius: 16px;
    background: #ffffff;
    padding: 38px;
    text-align: center;
    color: #78716c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-state.is-visible {
    display: block;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 22px 0;
    color: #78716c;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #0284c7;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.78fr);
    gap: 30px;
    align-items: start;
}

.detail-card,
.side-card {
    border-radius: 16px;
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-card h1 {
    margin: 22px 0 12px;
    color: #1c1917;
    font-size: clamp(30px, 4vw, 44px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: #57534e;
}

.detail-meta span {
    border-radius: 9px;
    padding: 6px 10px;
    background: #f5f5f4;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.3));
    z-index: 4;
}

.player-cover.is-hidden {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0284c7;
    box-shadow: 0 16px 34px rgba(2, 132, 199, 0.32);
    font-size: 34px;
    padding-left: 5px;
}

.player-cover strong {
    font-size: 22px;
}

.detail-tags span {
    color: #0369a1;
    background: #f0f9ff;
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #1c1917;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #44403c;
    line-height: 1.9;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-list a {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 12px;
    padding: 8px;
    background: #fafaf9;
}

.side-list img {
    width: 72px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    background: #0f172a;
}

.side-list strong {
    display: block;
    color: #1c1917;
    line-height: 1.4;
}

.side-list span {
    color: #78716c;
    font-size: 13px;
}

.site-footer {
    margin-top: 70px;
    background: #1c1917;
    color: #d6d3d1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    padding-top: 42px;
    padding-bottom: 34px;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 16px;
}

.site-footer p {
    margin: 0;
    color: #a8a29e;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: #d6d3d1;
}

.footer-links a:hover {
    color: #38bdf8;
}

.footer-bottom {
    border-top: 1px solid #292524;
    padding-top: 20px;
    padding-bottom: 24px;
    text-align: center;
}

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

    .mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .movie-grid-four,
    .movie-grid-three,
    .featured-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 720px) {
    .container-custom {
        padding: 0 14px;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.28));
    }

    .section {
        padding: 38px 0;
    }

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

    .movie-grid-four,
    .movie-grid-three,
    .featured-grid,
    .related-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .ranking-list a {
        grid-template-columns: 46px 1fr;
    }

    .ranking-list small {
        grid-column: 2;
    }

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

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

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

    .detail-card,
    .side-card {
        padding: 18px;
    }
}
