:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --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;
    --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.18);
    --radius-lg: 20px;
    --radius-md: 16px;
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), #ffffff 45%, var(--emerald-50));
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(209, 213, 219, 0.7);
}

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

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

.site-logo span,
.footer-logo span {
    font-size: 24px;
    background: linear-gradient(90deg, var(--emerald-600), var(--teal-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
}

.logo-mark rect {
    fill: var(--emerald-600);
}

.logo-mark path {
    fill: #ffffff;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--gray-700);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

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

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

.mobile-menu-button span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 999px;
}

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

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-slide.is-active .hero-background {
    animation: heroZoom 8s ease forwards;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.62) 45%, rgba(3, 7, 18, 0.16));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - var(--container)) / 2));
    bottom: 84px;
    width: min(760px, calc(100% - 48px));
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    color: var(--emerald-700);
    background: var(--emerald-100);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #ffffff;
    background: var(--emerald-600);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-content p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

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

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.detail-meta span,
.movie-meta-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.secondary-button,
.home-search-form button {
    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;
}

.primary-button,
.home-search-form button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald-600), var(--teal-600));
    box-shadow: 0 18px 36px rgba(5, 150, 105, 0.28);
    border: 0;
}

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

.primary-button:hover,
.secondary-button:hover,
.home-search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(5, 150, 105, 0.34);
}

.hero-controls {
    position: absolute;
    left: max(24px, calc((100% - var(--container)) / 2));
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 42px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-controls button.is-active {
    background: #ffffff;
}

.home-search-band,
.content-section,
.highlight-layout,
.detail-layout {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.home-search-band {
    transform: translateY(-42px);
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr minmax(300px, 460px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.home-search-band h2 {
    margin: 0 0 6px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.home-search-band p {
    margin: 0;
    color: var(--gray-600);
}

.home-search-form,
.filter-panel {
    display: flex;
    gap: 12px;
}

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

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

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

.soft-section {
    padding-top: 28px;
}

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

.section-heading h2,
.page-hero h1,
.movie-detail-card h1,
.detail-section h2,
.sidebar-card h2 {
    margin: 0;
    color: var(--gray-900);
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--gray-600);
}

.section-heading > a,
.compact-heading > a {
    color: var(--emerald-700);
    font-weight: 800;
}

.compact-heading {
    align-items: center;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--gray-200);
}

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

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

.rating-badge,
.detail-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

.rating-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    min-width: 44px;
    height: 30px;
    border-radius: 999px;
    font-size: 13px;
}

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

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

.movie-card h3 a:hover,
.ranking-row h2 a:hover {
    color: var(--emerald-600);
}

.movie-card p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--gray-600);
    font-size: 14px;
}

.movie-meta-row {
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-meta-row span {
    padding: 2px 0;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.movie-tags a,
.detail-tags span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--emerald-700);
    background: var(--emerald-50);
    font-size: 12px;
    font-weight: 750;
}

.highlight-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
    padding: 54px 0;
}

.ranking-panel,
.sidebar-card,
.movie-detail-card,
.filter-panel,
.category-overview-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ranking-panel,
.sidebar-card,
.movie-detail-card,
.category-overview-card {
    padding: 24px;
}

.ranking-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.ranking-list span {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #ffffff;
    background: var(--emerald-600);
    font-weight: 900;
    font-size: 13px;
}

.ranking-list strong {
    display: block;
    color: var(--gray-900);
}

.ranking-list em {
    display: block;
    color: var(--gray-500);
    font-style: normal;
    font-size: 13px;
}

.category-showcase {
    margin-top: 34px;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 26%), linear-gradient(120deg, var(--emerald-600), var(--teal-600));
}

.page-hero > div {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.small-page-hero > div,
.category-page-hero > div {
    padding: 62px 0;
}

.page-hero .eyebrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
    max-width: 780px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

.category-main-link {
    display: grid;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--gray-100);
}

.category-main-link span {
    font-size: 24px;
    font-weight: 900;
    color: var(--gray-900);
}

.category-main-link strong {
    color: var(--gray-600);
    font-weight: 500;
}

.category-mini-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
}

.compact-card img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--gray-200);
    transition: transform 0.3s ease;
}

.compact-card strong {
    display: block;
    color: var(--gray-900);
    line-height: 1.35;
}

.compact-card em {
    display: block;
    color: var(--gray-500);
    font-style: normal;
    font-size: 13px;
}

.filter-panel {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 30px;
}

.filter-search {
    flex: 1;
}

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

.filter-selects select {
    width: 150px;
}

.ranking-section {
    max-width: 980px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 160px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

.ranking-thumb {
    display: block;
    width: 160px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--gray-200);
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

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

.detail-layout {
    padding: 32px 0 70px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--emerald-600);
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow-lg);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.68));
    border: 0;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: inline-flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 6px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
    font-size: 34px;
    box-shadow: 0 24px 46px rgba(5, 150, 105, 0.36);
}

.player-overlay strong {
    text-align: center;
    font-size: 22px;
}

.player-state {
    position: absolute;
    top: 16px;
    left: 16px;
    display: none;
    padding: 7px 11px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 13px;
}

.player-box.is-loading .player-state,
.player-box.has-error .player-state {
    display: inline-flex;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-box:hover .player-controls,
.player-box.is-playing .player-controls {
    opacity: 1;
    transform: translateY(0);
}

.player-controls button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.movie-detail-card h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.detail-rating {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 18px;
    font-size: 20px;
}

.detail-meta {
    margin: 18px 0;
}

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

.detail-one-line {
    margin: 0 0 26px;
    color: var(--gray-800);
    font-size: 19px;
    font-weight: 700;
}

.detail-section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.detail-section h2,
.sidebar-card h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

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

.sticky-card {
    position: sticky;
    top: 96px;
}

.related-section {
    width: 100%;
    padding-bottom: 0;
}

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

@keyframes heroZoom {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.08);
    }
}

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

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

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

    .ranking-panel,
    .detail-sidebar {
        order: 2;
    }
}

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

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

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

    .hero-overlay {
        background: linear-gradient(180deg, rgba(3, 7, 18, 0.25), rgba(3, 7, 18, 0.9));
    }

    .hero-content {
        bottom: 72px;
    }

    .home-search-band {
        grid-template-columns: 1fr;
        transform: none;
        margin-top: 18px;
    }

    .home-search-form,
    .filter-panel,
    .filter-selects {
        flex-direction: column;
    }

    .filter-selects select {
        width: 100%;
    }

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

    .ranking-row {
        grid-template-columns: 46px 104px 1fr;
        gap: 12px;
    }

    .ranking-thumb {
        width: 104px;
    }

    .site-logo span {
        font-size: 21px;
    }
}

@media (max-width: 620px) {
    .site-header-inner,
    .home-search-band,
    .content-section,
    .highlight-layout,
    .detail-layout,
    .page-hero > div,
    .footer-inner {
        width: min(100% - 24px, var(--container));
    }

    .hero-carousel {
        min-height: 520px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

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

    .four-grid,
    .six-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card p {
        min-height: auto;
    }

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

    .ranking-thumb {
        display: none;
    }

    .detail-title-row {
        flex-direction: column;
    }

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

.site-footer {
    color: var(--gray-300);
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-logo span {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.footer-brand p,
.site-footer p {
    color: var(--gray-300);
}

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

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

.footer-links a:hover {
    color: var(--emerald-500);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-500);
    font-size: 14px;
}
