:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-soft: #e0f2fe;
    --accent: #059669;
    --accent-soft: #ecfdf5;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #f8fafc 100%);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 68px;
    padding: 0 24px;
    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-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 22px rgba(2, 132, 199, 0.28);
    font-size: 14px;
}

.brand-text {
    font-size: 22px;
    color: var(--ink);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--primary);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: #334155;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.page-main {
    padding-top: 68px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72vh;
    padding: 88px 24px 72px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    max-width: 620px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-weight: 700;
}

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

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 18px 34px rgba(2, 132, 199, 0.35);
}

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

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    z-index: 8;
    right: clamp(20px, 6vw, 72px);
    bottom: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    cursor: pointer;
    font-size: 22px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

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

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

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

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

.container-tight {
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 24px;
}

.section-stack {
    display: grid;
    gap: 80px;
}

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

.section-heading h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

.section-more {
    color: var(--primary);
    font-weight: 800;
}

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

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

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.poster-card .movie-cover {
    aspect-ratio: 3 / 4;
}

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

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

.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.92);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.35);
}

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

.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 20px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a {
    transition: color 0.2s ease;
}

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

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

.movie-meta {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    justify-content: space-between;
}

.tag-row {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 8px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}

.gradient-panel {
    padding: clamp(28px, 5vw, 48px);
    border-radius: 32px;
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.page-title {
    padding: 128px 24px 42px;
    background: linear-gradient(135deg, #eff6ff, #ffffff 56%, #ecfdf5);
    border-bottom: 1px solid var(--line);
}

.page-title-inner {
    max-width: 1280px;
    margin: 0 auto;
}

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

.category-card {
    min-height: 210px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.7);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.category-count {
    margin-top: 22px;
    color: var(--primary);
    font-weight: 900;
}

.filter-panel {
    margin-bottom: 30px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: end;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.filter-search label,
.filter-selects label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-weight: 800;
    font-size: 14px;
}

.filter-search input,
.filter-selects select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #f8fafc;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-search input:focus,
.filter-selects select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.filter-selects {
    display: flex;
    gap: 12px;
}

.filter-count {
    min-width: 130px;
    color: var(--muted);
    font-weight: 800;
    text-align: right;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 120px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--soft-shadow);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
}

.ranking-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.ranking-thumb img {
    height: 100%;
    object-fit: cover;
}

.ranking-copy h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

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

.ranking-meta {
    color: #64748b;
    font-weight: 800;
    white-space: nowrap;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

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

.player-start {
    position: absolute;
    inset: 0;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 38px rgba(2, 132, 199, 0.42);
    font-size: 26px;
}

.player-message {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.detail-card,
.sidebar-card {
    padding: clamp(24px, 4vw, 34px);
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.detail-card {
    margin-top: 24px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb a {
    color: var(--primary);
}

.detail-copy h1 {
    margin-bottom: 18px;
}

.detail-meta span {
    background: #f1f5f9;
    color: #334155;
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2,
.sidebar-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-section p {
    margin: 0 0 14px;
    color: #334155;
}

.sidebar-card {
    position: sticky;
    top: 92px;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: #f8fafc;
}

.related-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

.related-thumb img {
    height: 100%;
    object-fit: cover;
}

.related-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.35;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-main p {
    max-width: 540px;
    color: #94a3b8;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

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

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-column a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

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

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

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

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

    .sidebar-card {
        position: static;
    }
}

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

    .menu-button {
        display: inline-flex;
    }

    .hero,
    .hero-content {
        min-height: 78vh;
    }

    .hero-content {
        padding-top: 96px;
        align-items: flex-end;
    }

    .hero-controls {
        display: none;
    }

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

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

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

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

    .filter-count {
        text-align: left;
    }

    .ranking-item {
        grid-template-columns: 42px 94px 1fr;
    }

    .ranking-meta {
        grid-column: 2 / -1;
    }
}

@media (max-width: 560px) {
    .nav-inner {
        padding: 0 16px;
    }

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

    .container,
    .container-tight {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-title {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .ranking-item {
        grid-template-columns: 1fr;
    }

    .ranking-thumb {
        width: 100%;
    }
}
