:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
    font-size: 13px;
}

.brand-text {
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #374151;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #334155;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-link,
.mobile-sub-link {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 650;
}

.mobile-link:hover,
.mobile-link.is-active,
.mobile-sub-link:hover {
    color: var(--cyan);
    background: #ecfeff;
}

.mobile-sub-title {
    margin: 8px 12px 4px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.16));
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    margin-bottom: 18px;
    background: var(--blue);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 750;
}

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

.hero p {
    width: min(640px, 100%);
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 30px;
    color: #cbd5e1;
    font-size: 15px;
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 760;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 26px;
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.ghost-button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

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

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 18px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
    padding: 54px 0;
    background: #ffffff;
}

.content-section.section-alt {
    background: #f8fafc;
}

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

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

.section-heading h2,
.page-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.movie-card-cover {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.movie-card.card-large .movie-card-cover {
    height: 320px;
}

.movie-card.card-small .movie-card-cover {
    height: 170px;
}

.movie-card-cover img,
.detail-poster img,
.category-covers img,
.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.image-unavailable {
    opacity: 0;
}

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

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

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 9px;
    color: #ffffff;
    background: var(--blue);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.75);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .movie-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.movie-card-tags span,
.detail-tags span,
.ranking-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
}

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

.movie-card-horizontal .movie-card-cover {
    height: 100%;
    min-height: 150px;
}

.scroll-wrap {
    position: relative;
}

.movie-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 4px 18px;
    scrollbar-width: none;
}

.movie-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-item {
    flex: 0 0 286px;
}

.scroll-button {
    position: absolute;
    top: 40%;
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    color: #334155;
    font-size: 28px;
    cursor: pointer;
}

.scroll-left {
    left: -12px;
}

.scroll-right {
    right: -12px;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.9), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 58%, #082f49);
}

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

.page-title h1 {
    color: #ffffff;
}

.page-title p {
    color: #cbd5e1;
    max-width: 760px;
}

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

.category-tile {
    overflow: hidden;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 180px;
    background: #0f172a;
}

.category-copy {
    padding: 24px;
}

.category-copy h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-copy p {
    margin: 0 0 16px;
    color: var(--muted);
}

.category-copy span,
.text-button {
    color: var(--blue);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(160px, 1fr));
    gap: 14px;
    margin: 28px 0 26px;
    padding: 18px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--ink);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 72px 118px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.ranking-number {
    color: var(--blue);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.ranking-cover {
    height: 76px;
    overflow: hidden;
    background: #0f172a;
    border-radius: 12px;
}

.ranking-copy h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.ranking-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.detail-top {
    background: #0f172a;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
    border: 0;
    cursor: pointer;
    z-index: 2;
}

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

.player-button-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue);
    border-radius: 999px;
    font-size: 28px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.player-overlay strong {
    font-size: 20px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding: 46px 0 32px;
}

.detail-poster {
    overflow: hidden;
    height: 410px;
    background: #0f172a;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 18px;
    color: #64748b;
    font-weight: 700;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.detail-info .lead {
    margin: 0 0 24px;
    color: #334155;
    font-size: 18px;
}

.detail-section {
    margin-top: 22px;
    padding: 22px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.detail-section p {
    margin: 0;
    color: #475569;
}

.related-section {
    padding: 28px 0 60px;
}

.site-footer {
    color: #cbd5e1;
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

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

.footer-about p,
.footer-column p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
}

.footer-column h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 15px;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
}

.footer-column a:hover {
    color: #22d3ee;
}

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

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

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

    .brand-text {
        font-size: 18px;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        justify-content: end;
        padding-bottom: 92px;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-card-cover {
        height: 210px;
    }

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

    .ranking-item {
        grid-template-columns: 52px 86px minmax(0, 1fr);
    }

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

    .detail-poster {
        height: 420px;
    }

    .movie-card-horizontal {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .movie-card-horizontal .movie-card-cover {
        min-height: 148px;
    }
}

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

    .hero h1 {
        font-size: 32px;
    }

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

    .movie-card-cover {
        height: 260px;
    }
}
