* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg-dark: #08111f;
    --bg-blue: #0f2f66;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.24);
    --card: #ffffff;
    --soft: #f8fafc;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: #f1f5f9;
    line-height: 1.65;
}

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

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

button,
input {
    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, #0f172a, #123c83, #0f172a);
    box-shadow: 0 12px 30px rgba(8, 17, 31, 0.22);
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.42);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
}

.site-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: #bfdbfe;
    transform: translateY(-1px);
}

.top-search {
    position: relative;
    width: min(280px, 28vw);
}

.search-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    outline: none;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 11px 42px 11px 16px;
    backdrop-filter: blur(12px);
    transition: border 0.2s ease, background 0.2s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    border-color: rgba(147, 197, 253, 0.8);
    background: rgba(255, 255, 255, 0.16);
}

.search-submit {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    padding: 9px 12px;
    cursor: pointer;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 18% 10%, rgba(59, 130, 246, 0.72), transparent 36%), linear-gradient(135deg, #06101f, #123c83 48%, #07111f);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

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

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

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(6, 16, 31, 0.96), rgba(7, 17, 31, 0.72) 45%, rgba(7, 17, 31, 0.28)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.hero-slide-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(6, 16, 31, 0.96), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.72fr);
    gap: 42px;
    align-items: center;
    padding: 86px 0 70px;
}

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

.hero-copy p {
    max-width: 780px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.44);
}

.button.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.hero-panel {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.hero-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #172554, #0f172a);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-panel-card {
    position: absolute;
    left: -26px;
    bottom: 34px;
    max-width: 280px;
    border-radius: 22px;
    padding: 18px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.2);
}

.hero-panel-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.hero-panel-card span {
    color: #475569;
    font-size: 13px;
}

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

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #60a5fa;
}

.main-section {
    padding: 64px 0;
}

.main-section.white {
    background: #ffffff;
}

.main-section.soft {
    background: var(--soft);
}

.main-section.gradient {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.05em;
}

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

.section-desc {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.36);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.9), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

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

.poster-meta {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.38);
}

.movie-body {
    padding: 16px;
}

.movie-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.movie-title a:hover {
    color: var(--primary);
}

.movie-line {
    min-height: 46px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
}

.movie-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #475569;
    font-size: 13px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.96), rgba(15, 23, 42, 0.95));
    box-shadow: 0 18px 44px rgba(30, 64, 175, 0.18);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    color: #dbeafe;
    font-size: 14px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    outline: none;
    padding: 12px 14px;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #93c5fd;
    background: #ffffff;
}

.page-hero {
    padding: 78px 0 48px;
    color: #ffffff;
    background: radial-gradient(circle at 18% 10%, rgba(59, 130, 246, 0.58), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #bfdbfe;
    font-size: 14px;
}

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

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

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.rank-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a, #1e40af);
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-number {
    position: absolute;
    left: 7px;
    top: 7px;
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 13px;
    font-weight: 900;
}

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

.rank-info p {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
}

.detail-main {
    background: #ffffff;
}

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

.player-card {
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.32);
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.24));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.big-play {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.45);
    font-size: 30px;
    transform: translateZ(0);
}

.detail-article {
    margin-top: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
}

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

.detail-article p {
    margin: 0 0 18px;
    color: #334155;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.side-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.side-cover {
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.side-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-body {
    padding: 20px;
}

.meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
    color: #475569;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 10px;
}

.meta-list dt {
    color: #94a3b8;
}

.meta-list dd {
    margin: 0;
    text-align: right;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

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

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #08111f, #0f172a);
    padding: 44px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p {
    margin: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

.hidden-by-filter {
    display: none !important;
}

.image-missing {
    opacity: 0;
}

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        min-height: 64px;
        padding: 10px 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding-top: 14px;
    }

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

    .top-search {
        width: calc(100% - 70px);
        order: 2;
    }

    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 58px;
    }

    .hero-panel {
        max-width: 360px;
    }

    .hero-panel-card {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

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

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

    .filter-panel {
        flex-direction: column;
    }
}

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

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
    }

    .top-search {
        width: 100%;
        order: 4;
    }

    .hero-slider,
    .hero-content {
        min-height: 760px;
    }

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

    .rank-item {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .main-section {
        padding: 46px 0;
    }
}
