* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #111827;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 58%, #f0f9ff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.18);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #0ea5e9;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
    transform: scale(1.08);
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    font-weight: 700;
    font-size: 15px;
}

.desktop-nav a {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.92);
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.54) 45%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 0 72px;
    color: #ffffff;
}

.hero-content-inner {
    max-width: 760px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.22);
    backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    max-width: 780px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-actions,
.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.button-primary,
.button-secondary,
.hero-search button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.hero-search button {
    color: #ffffff;
    background: #0ea5e9;
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.28);
}

.button-primary:hover,
.hero-search button:hover {
    transform: translateY(-2px) scale(1.02);
    background: #0284c7;
}

.button-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.button-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(220px, 440px) auto;
    gap: 12px;
    margin-top: 28px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0 18px;
    color: #111827;
    background: rgba(255, 255, 255, 0.94);
    outline: 0;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.carousel-arrow.prev {
    left: 24px;
}

.carousel-arrow.next {
    right: 24px;
}

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

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

.carousel-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

main {
    min-height: 60vh;
}

.section {
    padding: 52px 0;
}

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.1;
}

.section-heading p {
    margin: 0;
    color: #64748b;
}

.section-heading span {
    flex: 0 0 86px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.card-cover {
    position: relative;
    height: 256px;
    margin: 0;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-compact .card-cover {
    height: 214px;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 60%);
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-year,
.card-region {
    position: absolute;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 700;
}

.card-year {
    top: 10px;
    right: 10px;
}

.card-region {
    left: 10px;
    bottom: 10px;
}

.card-play {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 46px;
    opacity: 0;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.48));
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: scale(1.05);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 10px;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.card-meta span,
.tag-list span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 188px;
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 48px rgba(37, 99, 235, 0.26);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.category-card span {
    font-weight: 800;
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #e0f2fe;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 0.7fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.filter-panel select {
    appearance: none;
    cursor: pointer;
}

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

.horizontal-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.horizontal-card a {
    display: grid;
    grid-template-columns: 148px 1fr;
    min-height: 180px;
}

.horizontal-card img {
    width: 148px;
    height: 100%;
    object-fit: cover;
}

.horizontal-card div {
    padding: 18px;
}

.horizontal-card h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
}

.horizontal-card p {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: #64748b;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 78px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-number {
    color: #0ea5e9;
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 86px;
    height: 118px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-item p {
    margin: 0 0 10px;
    color: #64748b;
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #0284c7;
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
}

.player-panel,
.detail-panel,
.info-panel {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(0, 0, 0, 0.72));
}

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

.player-start {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 30px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #0ea5e9;
    box-shadow: 0 18px 42px rgba(14, 165, 233, 0.38);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.player-start:hover {
    background: #0284c7;
}

.detail-title {
    padding: 26px;
}

.detail-title h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-title p {
    margin: 0 0 16px;
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
}

.detail-content {
    padding: 28px;
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 22px;
    color: #334155;
    font-size: 17px;
    line-height: 1.95;
}

.info-panel {
    position: sticky;
    top: 100px;
    padding: 22px;
}

.info-panel img {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 18px;
}

.info-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #64748b;
}

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

.site-footer {
    margin-top: 56px;
    color: #cbd5e1;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.8;
}

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

.footer-grid a:not(.footer-brand) {
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

.is-hidden {
    display: none !important;
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: 20px;
    color: #64748b;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

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

@media (max-width: 1080px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

    .info-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .nav-bar {
        min-height: 66px;
    }

    .brand,
    .footer-brand {
        font-size: 21px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        padding-bottom: 58px;
    }

    .hero-content p {
        font-size: 16px;
    }

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

    .carousel-arrow {
        display: none;
    }

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

    .card-cover {
        height: 220px;
    }

    .category-grid,
    .horizontal-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card a {
        grid-template-columns: 120px 1fr;
        min-height: 150px;
    }

    .horizontal-card img {
        width: 120px;
    }

    .rank-item {
        grid-template-columns: 48px 72px 1fr;
    }

    .rank-item .button-primary {
        grid-column: 2 / -1;
        width: 100%;
    }

    .rank-item img {
        width: 72px;
        height: 100px;
    }

    .detail-title,
    .detail-content {
        padding: 20px;
    }
}

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

    .card-cover {
        height: 190px;
    }

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .section {
        padding: 38px 0;
    }
}
