:root {
    --teal-900: #134e4a;
    --teal-800: #115e59;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --teal-100: #ccfbf1;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --red-600: #dc2626;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-800);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #f9fafb 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
    box-shadow: var(--shadow-md);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand {
    font-size: 20px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--teal-800);
    background: var(--white);
    box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 600;
}

.nav-links a {
    padding: 8px 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover {
    color: var(--teal-100);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgb(255 255 255 / 0.12);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--white);
    border-radius: 999px;
}

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

.hero {
    margin-bottom: 56px;
}

.hero-frame {
    position: relative;
    height: 560px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--gray-900);
    box-shadow: var(--shadow-2xl);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.01);
    transition: opacity 0.6s ease, transform 1s ease;
    pointer-events: none;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / 0.82) 0%, rgb(0 0 0 / 0.55) 46%, rgb(0 0 0 / 0.1) 100%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    top: 50%;
    width: min(660px, calc(100% - 48px));
    transform: translateY(-50%);
    color: var(--white);
}

.hero-kickers,
.hero-tags,
.hero-actions,
.card-meta,
.detail-tags,
.breadcrumbs,
.result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-kickers {
    margin-bottom: 18px;
}

.hero-kickers span,
.hero-kickers strong,
.hero-tags span,
.hero-tags a {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
}

.hero-kickers span {
    background: var(--teal-600);
}

.hero-kickers strong {
    background: var(--amber-500);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 24px;
    color: var(--gray-200);
    font-size: 18px;
    line-height: 1.75;
}

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

.hero-tags span,
.hero-tags a {
    background: rgb(255 255 255 / 0.18);
    backdrop-filter: blur(4px);
}

.hero-actions {
    gap: 14px;
}

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

.primary-button,
.search-button,
.play-button,
.load-button {
    color: var(--white);
    background: var(--teal-600);
    box-shadow: 0 10px 25px rgb(13 148 136 / 0.25);
}

.primary-button:hover,
.search-button:hover,
.play-button:hover,
.load-button:hover {
    background: var(--teal-700);
    transform: translateY(-1px) scale(1.02);
}

.ghost-button {
    color: var(--white);
    background: rgb(255 255 255 / 0.16);
    backdrop-filter: blur(6px);
}

.ghost-button:hover {
    background: rgb(255 255 255 / 0.25);
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
    margin-bottom: 58px;
}

.section-head {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.section-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-800);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-head h2 span {
    color: var(--teal-600);
}

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

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

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

.movie-card,
.info-panel,
.category-card,
.result-card,
.detail-card,
.search-panel {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.movie-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--teal-900), var(--gray-900));
}

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

.movie-card:hover .card-cover img,
.result-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.card-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.68));
    transition: opacity 0.25s ease;
}

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

.year-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-500);
    font-size: 13px;
    font-weight: 800;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--teal-600);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 18px;
}

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

.card-body h3 a {
    transition: color 0.2s ease;
}

.card-body h3 a:hover {
    color: var(--teal-600);
}

.card-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.55;
}

.card-meta {
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 12px;
}

.card-meta a {
    color: var(--teal-700);
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 156px;
    overflow: hidden;
    border-radius: 20px;
    color: var(--white);
    background: var(--gray-900);
    box-shadow: var(--shadow-md);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 156px;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.tile-shadow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.74));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 42px;
    font-size: 22px;
}

.category-tile em {
    bottom: 18px;
    color: var(--gray-200);
    font-size: 14px;
    font-style: normal;
}

.page-hero {
    margin-bottom: 34px;
    padding: 36px;
    border-radius: 24px;
    color: var(--white);
    background: linear-gradient(115deg, var(--teal-800), var(--teal-900));
    box-shadow: var(--shadow-xl);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.page-hero p {
    max-width: 840px;
    margin: 0;
    color: var(--teal-100);
    line-height: 1.8;
}

.page-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-bar,
.hero-search {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hero-search {
    max-width: 560px;
    margin-top: 26px;
}

.filter-bar {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.filter-bar input,
.hero-search input,
.search-panel input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 0 18px;
    font-size: 16px;
    outline: 0;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.hero-search input:focus,
.search-panel input:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgb(13 148 136 / 0.14);
}

.search-panel {
    margin-bottom: 28px;
    padding: 24px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.result-list {
    display: grid;
    gap: 16px;
}

.result-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.result-card img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--gray-900);
    transition: transform 0.35s ease;
}

.result-card h2,
.result-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.result-card p {
    margin: 0 0 12px;
    color: var(--gray-600);
    line-height: 1.65;
}

.result-meta {
    color: var(--gray-500);
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 68px 150px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--white);
    background: var(--red-600);
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 150px;
    height: 84px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--gray-900);
}

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

.rank-item p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.55;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--gray-950);
    box-shadow: var(--shadow-2xl);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gray-950);
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--white);
    background: linear-gradient(180deg, rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.72));
    text-align: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-layer h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 4vw, 38px);
}

.player-layer p {
    max-width: 560px;
    margin: 0 auto 22px;
    color: var(--gray-200);
    line-height: 1.7;
}

.detail-card,
.info-panel {
    padding: 24px;
}

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

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.18;
}

.detail-card h2,
.info-panel h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-card p,
.info-panel p {
    color: var(--gray-600);
    line-height: 1.85;
}

.breadcrumbs {
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--teal-700);
    font-weight: 700;
}

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

.detail-tags a,
.detail-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--teal-800);
    background: var(--teal-100);
    font-size: 13px;
    font-weight: 700;
}

.side-cover {
    overflow: hidden;
    border-radius: 20px;
    background: var(--gray-900);
    box-shadow: var(--shadow-xl);
}

.side-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.meta-list {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.meta-list strong {
    color: var(--gray-800);
}

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

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

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--gray-900);
    transition: transform 0.35s ease;
}

.related-card h3 {
    margin: 0;
    padding: 14px;
    font-size: 16px;
    line-height: 1.35;
}

.site-footer {
    margin-top: 70px;
    color: var(--gray-300, #d1d5db);
    background: var(--gray-900);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    margin-bottom: 16px;
    color: var(--white);
    font-size: 20px;
}

.site-footer p {
    max-width: 540px;
    color: #d1d5db;
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 18px;
}

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

.site-footer li {
    margin: 0 0 10px;
}

.site-footer a {
    color: #d1d5db;
}

.site-footer a:hover {
    color: var(--teal-100);
}

.footer-bottom {
    border-top: 1px solid rgb(255 255 255 / 0.08);
    padding: 18px;
    text-align: center;
    color: #9ca3af;
}

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

.empty-state {
    padding: 34px;
    border-radius: 18px;
    color: var(--gray-600);
    background: var(--white);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.sitemap-list {
    columns: 4 220px;
    column-gap: 28px;
    margin: 0;
    padding: 24px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    list-style: none;
}

.sitemap-list li {
    break-inside: avoid;
    margin: 0 0 10px;
}

.sitemap-list a {
    color: var(--gray-700);
}

.sitemap-list a:hover {
    color: var(--teal-700);
}

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.compact-grid,
    .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;
    }

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

@media (max-width: 760px) {
    .nav-wrap {
        flex-wrap: wrap;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        padding-top: 14px;
        border-top: 1px solid rgb(255 255 255 / 0.18);
    }

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

    .hero-frame {
        height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        left: 22px;
        width: calc(100% - 44px);
    }

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

    .hero-search,
    .filter-bar,
    .search-row {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

    .result-card,
    .rank-item {
        grid-template-columns: 1fr;
    }

    .result-card img,
    .rank-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

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