*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #020617;
    color: #cbd5e1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid rgba(51, 65, 85, 0.75);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #020617;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    box-shadow: 0 18px 40px rgba(148, 163, 184, 0.28);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #94a3b8;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.75);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    gap: 10px;
    flex-wrap: wrap;
}

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.76) 38%, rgba(2, 6, 23, 0.14) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 88px;
    max-width: 760px;
}

.hero-kicker,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #e2e8f0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 19px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 8px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.72);
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #020617;
    background: #ffffff;
}

.btn-primary:hover {
    background: #e2e8f0;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.55);
}

.btn-ghost:hover {
    background: rgba(51, 65, 85, 0.82);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.52);
    font-size: 40px;
    line-height: 1;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(15, 23, 42, 0.82);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.home-search {
    padding-top: 38px;
    padding-bottom: 24px;
}

.search-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.68));
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
}

.search-panel label {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.search-inline {
    display: flex;
    gap: 12px;
}

.search-inline input,
.filter-panel input,
.filter-panel select {
    min-height: 48px;
    border: 1px solid rgba(71, 85, 105, 0.95);
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.96);
    outline: none;
}

.search-inline input {
    flex: 1;
    padding: 0 16px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(130px, 0.6fr));
    gap: 12px;
    margin-bottom: 30px;
    padding: 18px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 0 14px;
}

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

.section-title-row h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
}

.section-title-row a {
    color: #94a3b8;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.92);
    border-radius: 18px;
    background: #1e293b;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(148, 163, 184, 0.85);
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.42);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #334155;
    aspect-ratio: 4 / 3;
}

.movie-card-small .movie-cover {
    aspect-ratio: 16 / 9;
}

.movie-card-large .movie-cover {
    aspect-ratio: 16 / 9;
}

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

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

.cover-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), transparent);
    transition: opacity 0.25s ease;
}

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

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #020617;
    background: rgba(255, 255, 255, 0.92);
    font-size: 28px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.meta-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
}

.meta-chip {
    left: 12px;
    top: 12px;
    padding: 4px 9px;
}

.rank-badge {
    right: 12px;
    top: 12px;
    min-width: 36px;
    height: 32px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.92);
    color: #020617;
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: #e2e8f0;
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 320px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 18px;
    scrollbar-width: none;
}

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

.spotlight-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.spotlight-side {
    display: grid;
    gap: 18px;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
    border-color: rgba(148, 163, 184, 0.86);
}

.category-tile span,
.category-overview-card strong {
    position: relative;
    z-index: 2;
    display: block;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.category-tile em,
.category-overview-card em {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 10px;
    color: #94a3b8;
    font-style: normal;
    font-size: 14px;
}

.category-overview-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transition: transform 0.5s ease;
}

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

.category-overview-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.34));
}

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

.page-main {
    min-height: 70vh;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px 20px;
}

.compact-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.compact-hero h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.compact-hero p {
    max-width: 760px;
    margin: 0;
    color: #94a3b8;
    font-size: 18px;
}

.empty-state {
    display: none;
    color: #94a3b8;
    text-align: center;
    padding: 38px;
}

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

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
}

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

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 28px;
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.85);
    border-radius: 24px;
    background: #1e293b;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.48);
}

.detail-poster img {
    aspect-ratio: 4 / 3;
    height: 100%;
    object-fit: cover;
}

.detail-intro h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: 19px;
}

.detail-meta,
.detail-tags {
    margin-bottom: 18px;
}

.player-section {
    padding-top: 22px;
    padding-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.92);
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 32px 90px rgba(2, 6, 23, 0.6);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-mask {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #020617;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.player-mask span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #020617;
    background: rgba(255, 255, 255, 0.94);
    font-size: 40px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
    transition: transform 0.25s ease;
}

.player-mask:hover span {
    transform: scale(1.06);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-content article {
    padding: 24px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
}

.detail-content h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: #cbd5e1;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(51, 65, 85, 0.75);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner strong {
    color: #ffffff;
}

.footer-inner p {
    margin: 6px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 14px;
    color: #94a3b8;
}

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

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

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

    .hero-content {
        left: 20px;
        bottom: 84px;
    }

    .hero-control {
        width: 44px;
        height: 44px;
        font-size: 34px;
    }

    .hero-prev {
        left: 12px;
    }

    .hero-next {
        right: 12px;
    }

    .filter-panel,
    .spotlight-layout,
    .detail-hero,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .section-wrap,
    .page-hero,
    .detail-hero,
    .breadcrumb {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

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

    .hero-actions,
    .search-inline {
        flex-direction: column;
    }

    .featured-grid,
    .archive-grid,
    .rank-list,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .scroll-row {
        grid-auto-columns: minmax(240px, 82vw);
    }

    .player-mask span {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}
