:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #059669;
    --brand-dark: #047857;
    --soft: #ecfdf5;
    --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f3f4f6 100%);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #e5e7eb, #f9fafb);
}

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(229, 231, 235, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), #10b981);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
}

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

.site-nav a:hover {
    color: var(--brand);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f3f4f6;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #111827;
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    transform: scale(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42) 46%, rgba(0, 0, 0, 0.08)), linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    min-height: 70vh;
    padding: 90px 20px 86px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.page-hero .eyebrow,
.detail-info .eyebrow {
    color: #a7f3d0;
}

.hero-content h1 {
    max-width: 780px;
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    font-weight: 950;
}

.hero-content p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags {
    margin: 22px 0 0;
}

.hero-tags span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #10b981);
    box-shadow: 0 16px 34px rgba(5, 150, 105, 0.32);
}

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

.ghost-button {
    color: #064e3b;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.section-block,
.search-panel,
.category-section,
.filter-bar {
    max-width: 1180px;
    margin: 30px auto;
    padding: 28px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 52px rgba(15, 23, 42, 0.06);
}

.search-panel {
    margin-top: -48px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 8px 0 0;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.search-panel h2,
.section-heading h2 {
    font-size: clamp(25px, 3vw, 38px);
}

.search-panel p,
.section-heading p,
.page-hero p,
.movie-info p,
.rank-card p,
.detail-content p {
    color: var(--muted);
    line-height: 1.75;
}

.search-box,
.filter-bar {
    display: flex;
    gap: 12px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: #ffffff;
}

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

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

.section-heading > a {
    color: var(--brand-dark);
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.category-tile img {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
    display: block;
    color: #ffffff;
}

.category-tile span {
    padding: 76px 18px 8px;
    font-size: 18px;
    font-weight: 950;
}

.category-tile p {
    margin: 0;
    padding: 0 18px 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.55;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.14);
}

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

.movie-cover img {
    transition: transform 0.35s ease;
}

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

.movie-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.74);
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 18px;
}

.movie-title {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.03em;
    line-height: 1.35;
}

.movie-title:hover {
    color: var(--brand-dark);
}

.movie-info p {
    margin: 10px 0 14px;
    font-size: 14px;
}

.movie-meta span {
    color: #047857;
    background: var(--soft);
}

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
    background: #f3f4f6;
}

.split-section {
    max-width: 1180px;
    margin: 0 auto 38px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
}

.split-section .section-block {
    margin: 0;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border-radius: 16px;
    background: #f9fafb;
}

.rank-item:hover {
    background: var(--soft);
}

.rank-item strong {
    color: var(--brand-dark);
    font-size: 18px;
}

.rank-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.rank-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-shell,
.detail-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 50px;
}

.page-hero {
    margin-bottom: 28px;
    padding: 54px 34px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.7), transparent 30%), linear-gradient(135deg, #064e3b, #111827 58%, #030712);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.category-section {
    margin-top: 22px;
}

.filter-bar {
    margin-top: 0;
    align-items: center;
    box-shadow: none;
}

.full-filter {
    grid-template-columns: 1fr 220px 180px;
}

.category-movie-grid {
    margin-top: 24px;
}

.empty-state {
    max-width: 1180px;
    margin: 24px auto;
    padding: 28px;
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 86px 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.rank-number {
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 950;
}

.rank-thumb {
    display: block;
    height: 92px;
    overflow: hidden;
    border-radius: 16px;
    background: #e5e7eb;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 4px 0 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--brand-dark);
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    padding: 26px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.38), transparent 36%), linear-gradient(135deg, #111827, #064e3b);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    min-height: 440px;
    border-radius: 24px;
    background: #e5e7eb;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
}

.detail-info h1 {
    margin: 16px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
}

.lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.85;
}

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

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.large-tags span {
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.12);
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.38));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 36px;
    text-indent: 5px;
    background: linear-gradient(135deg, var(--brand), #10b981);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.36);
}

.play-overlay.is-hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 28px;
}

.detail-content article {
    padding: 28px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
    font-size: 28px;
}

.related-block {
    margin-left: 0;
    margin-right: 0;
}

.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 48px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #6b7280;
    border-top: 1px solid rgba(229, 231, 235, 0.9);
}

.site-footer strong {
    color: #111827;
    margin-right: 10px;
}

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

.site-footer a:hover {
    color: var(--brand-dark);
}

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

    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

@media (max-width: 780px) {
    .menu-button {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        padding: 12px;
        border-radius: 14px;
    }

    .site-nav a:hover {
        background: var(--soft);
    }

    .hero-content {
        min-height: 72vh;
        padding: 92px 20px 82px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .filter-bar,
    .detail-hero,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .search-panel,
    .section-block,
    .category-section,
    .filter-bar {
        padding: 22px;
        margin-left: 14px;
        margin-right: 14px;
    }

    .search-box,
    .filter-bar {
        flex-direction: column;
    }

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

    .detail-poster {
        min-height: 360px;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .hero-content h1,
    .detail-info h1 {
        font-size: 40px;
    }

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

    .page-hero {
        padding: 36px 22px;
    }

    .rank-thumb {
        height: 150px;
    }
}
