* {
    box-sizing: border-box;
}

:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --blue-50: #eff6ff;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), var(--white));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-900);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-logo-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald-600), #14b8a6);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.32);
    font-size: 13px;
    line-height: 1;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 600;
}

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

.site-nav-links a:hover,
.site-mobile-nav a:hover {
    color: var(--emerald-600);
}

.site-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

.site-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--gray-700);
    border-radius: 99px;
}

.site-mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 16px;
    border-top: 1px solid var(--gray-200);
}

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

.site-mobile-nav a {
    padding: 10px 12px;
    color: var(--gray-700);
    border-radius: 12px;
    font-weight: 600;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--gray-900);
}

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

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

.hero-bg {
    position: absolute;
    inset: -30px;
    background-position: center;
    background-size: cover;
    filter: blur(20px) brightness(0.42);
    transform: scale(1.1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.5), rgba(17, 24, 39, 0.22));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: var(--white);
}

.hero-kicker,
.badge-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.hero-kicker strong,
.badge-accent {
    padding: 6px 14px;
    color: var(--white);
    background: var(--emerald-500);
    border-radius: 999px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 620px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.section-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--emerald-600);
    box-shadow: 0 16px 34px rgba(5, 150, 105, 0.36);
}

.btn-primary:hover {
    background: var(--emerald-700);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.btn-light {
    color: var(--emerald-700);
    background: var(--emerald-50);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease, opacity 0.2s ease;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    font-size: 22px;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    background: rgba(255, 255, 255, 0.52);
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--white);
}

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

.section {
    margin-bottom: 72px;
}

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

.section-title-wrap {
    min-width: 0;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 820px;
    margin: 10px 0 0;
    color: var(--gray-600);
}

.title-line {
    height: 4px;
    flex: 1;
    background: linear-gradient(90deg, var(--emerald-500), rgba(16, 185, 129, 0));
    border-radius: 99px;
}

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

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

.movie-card {
    display: block;
    min-width: 0;
    color: var(--gray-900);
    transition: transform 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
}

.movie-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.movie-card.compact .movie-poster {
    aspect-ratio: 16 / 10;
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.04));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    border-radius: 999px;
}

.score-badge {
    right: 12px;
    top: 12px;
    min-width: 46px;
    height: 30px;
    background: rgba(5, 150, 105, 0.94);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    background: rgba(17, 24, 39, 0.86);
}

.movie-card-body {
    padding: 14px 2px 0;
}

.movie-card h3 {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--emerald-600);
}

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

.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
}

.feature-panel {
    padding: 36px;
    background: linear-gradient(135deg, var(--emerald-50), var(--blue-50));
    border-radius: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

.category-card {
    display: block;
    padding: 26px;
    overflow: hidden;
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0));
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: var(--shadow-md);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0;
    color: var(--gray-600);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin: 28px 0 34px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--gray-800);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.filter-empty {
    display: none;
    padding: 34px;
    color: var(--gray-600);
    text-align: center;
    background: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

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

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

.page-hero {
    padding: 66px 0 34px;
    background: linear-gradient(135deg, var(--emerald-50), var(--white) 45%, var(--blue-50));
    border-bottom: 1px solid var(--gray-200);
}

.page-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: var(--gray-600);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald-700);
    font-weight: 700;
}

.detail-main {
    padding: 42px 0 72px;
    background: var(--gray-50);
}

.detail-card {
    overflow: hidden;
    background: var(--white);
    border-radius: 28px;
    box-shadow: var(--shadow-md);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px;
    color: var(--white);
    text-align: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.26));
    border: 0;
    cursor: pointer;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: var(--emerald-600);
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.38);
    font-size: 28px;
}

.player-overlay strong {
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.2;
}

.player-overlay span:last-child {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.8);
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 5;
    padding: 10px 16px;
    color: var(--white);
    background: rgba(17, 24, 39, 0.9);
    border-radius: 12px;
    transform: translateX(-50%);
}

.detail-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    padding: 32px;
}

.detail-cover {
    overflow: hidden;
    align-self: start;
    background: var(--gray-100);
    border-radius: 22px;
    box-shadow: var(--shadow-md);
}

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

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

.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
    color: var(--gray-600);
}

.detail-meta span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.detail-meta span {
    padding: 6px 12px;
    background: var(--gray-100);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 26px;
}

.detail-tags span {
    padding: 7px 12px;
    color: var(--emerald-700);
    background: var(--emerald-100);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
}

.rank-list {
    display: grid;
    gap: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: 74px 110px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.rank-row img {
    width: 110px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--gray-100);
    border-radius: 14px;
}

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-row p {
    margin: 0;
    color: var(--gray-600);
}

.rank-score {
    min-width: 62px;
    padding: 10px 12px;
    color: var(--white);
    text-align: center;
    background: var(--emerald-600);
    border-radius: 999px;
    font-weight: 900;
}

.site-footer {
    margin-top: auto;
    color: var(--gray-300);
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-logo {
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    max-width: 460px;
    color: var(--gray-300);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a {
    color: var(--gray-300);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    padding: 20px 16px;
    color: var(--gray-500);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

@media (max-width: 820px) {
    .site-nav-links {
        display: none;
    }

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

    .hero {
        height: auto;
        min-height: 560px;
    }

    .hero-content {
        padding: 82px 0 120px;
    }

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

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

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

    .detail-cover {
        max-width: 280px;
    }

    .rank-row {
        grid-template-columns: 52px 86px 1fr;
    }

    .rank-score {
        grid-column: 3;
        width: max-content;
    }

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

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

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

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

    .title-line {
        width: 100%;
        flex: none;
    }

    .feature-panel,
    .detail-body {
        padding: 22px;
    }

    .hero-controls {
        bottom: 22px;
    }

    .rank-row {
        grid-template-columns: 44px 1fr;
    }

    .rank-row img {
        display: none;
    }

    .rank-score {
        grid-column: 2;
    }
}
