* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #102033;
    background: #f7fbff;
    line-height: 1.65;
}

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

img {
    display: block;
    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, #2563eb, #06b6d4);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.22);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

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

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

.mobile-menu {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-menu.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.42), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8 52%, #06b6d4);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.42) 48%, rgba(14, 165, 233, 0.28));
}

.hero-track {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
    gap: 54px;
    align-items: center;
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0 -80px;
    z-index: -1;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.42)), var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.25);
    opacity: 0.36;
    transform: scale(1.08);
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hero-copy {
    max-width: 710px;
}

.hero-kicker,
.section-heading span {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(207, 250, 254, 0.95);
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 42px rgba(2, 6, 23, 0.38);
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.detail-meta,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.home-search button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button {
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.25;
    overflow: hidden;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 36px 80px rgba(2, 6, 23, 0.45);
}

.hero-poster::after,
.card-poster::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.72));
    pointer-events: none;
}

.hero-poster img,
.card-poster img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

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

.hero-controls button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.64;
}

.hero-dot.is-active {
    width: 34px;
    opacity: 1;
    background: #ffffff;
}

.quick-search {
    position: relative;
    z-index: 5;
    margin-top: -44px;
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
}

.quick-search h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 4vw, 34px);
}

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

.home-search input,
.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 0 16px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.home-search input:focus,
.filter-field input:focus,
.filter-field select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.content-section {
    padding: 58px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    font-weight: 900;
}

.section-heading p {
    max-width: 760px;
    margin: 10px 0 0;
    color: #64748b;
}

.section-more {
    color: #2563eb;
    background: #e0f2fe;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(14, 165, 233, 0.45);
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.poster-type {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 11px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.card-body h2 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
    line-height: 1.28;
    font-weight: 900;
}

.card-body h2 a:hover {
    color: #2563eb;
}

.card-body p {
    min-height: 46px;
    margin: 10px 0 0;
    color: #64748b;
    font-size: 14px;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span,
.detail-meta span {
    padding: 5px 9px;
    color: #0369a1;
    background: #e0f2fe;
}

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

.movie-card-list {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
}

.movie-card-list .card-poster {
    aspect-ratio: 1 / 1.28;
}

.movie-card-list .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ranking-list-large .movie-card-list {
    grid-template-columns: 180px minmax(0, 1fr);
}

.category-grid,
.category-list-grid {
    display: grid;
    gap: 20px;
}

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

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(37, 99, 235, 0.66)), var(--tile-bg);
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.14);
}

.category-tile {
    min-height: 156px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile span,
.category-card-main span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.category-card-main h2 {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.category-card-main {
    display: block;
    min-height: 220px;
    padding: 28px;
}

.category-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 28px 26px;
}

.category-card-links a {
    border-radius: 999px;
    padding: 7px 10px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.34), transparent 34%), linear-gradient(135deg, #1e3a8a, #0ea5e9);
}

.page-hero-compact {
    padding: 72px 0;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px 170px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.filter-field span {
    display: block;
    margin-bottom: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

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

.detail-hero {
    padding: 72px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 16%, rgba(34, 211, 238, 0.34), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8 56%, #06b6d4);
}

.detail-shell {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    position: relative;
    aspect-ratio: 3 / 4.25;
    overflow: hidden;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 34px 78px rgba(2, 6, 23, 0.4);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
}

.detail-meta {
    margin-top: 20px;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    margin-top: -42px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    color: #2563eb;
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.32);
}

.play-overlay strong {
    font-size: 24px;
}

.detail-article {
    padding: 32px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 900;
}

.detail-article p {
    margin: 0 0 24px;
    color: #475569;
    font-size: 17px;
}

.site-footer {
    margin-top: 72px;
    color: #dbeafe;
    background: #0f172a;
}

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

.footer-inner p {
    max-width: 760px;
    margin: 12px 0 18px;
    color: #94a3b8;
}

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

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

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

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }
}

@media (max-width: 820px) {
    .hero-carousel,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide,
    .detail-shell {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
        padding: 38px 0 88px;
    }

    .hero-poster,
    .detail-poster {
        width: min(320px, 86vw);
        margin: 0 auto;
    }

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

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

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-shell,
    .mobile-menu,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 16px;
    }

    .hero-carousel,
    .hero-track {
        min-height: 700px;
    }

    .hero-copy h1,
    .hero-copy h2,
    .detail-info h1 {
        font-size: 40px;
    }

    .quick-search {
        margin-top: -24px;
        padding: 20px;
    }

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

    .movie-card-list,
    .ranking-list-large .movie-card-list {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .movie-card-list .card-body p,
    .movie-card-list .tag-row {
        display: none;
    }

    .detail-article {
        padding: 22px;
    }
}
