:root {
    --teal-900: #134e4a;
    --teal-800: #115e59;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --teal-500: #14b8a6;
    --amber-500: #f59e0b;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--gray-50), #ffffff 42%, var(--gray-50));
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
    box-shadow: 0 16px 35px rgba(15, 118, 110, 0.24);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    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 {
    font-size: 1.25rem;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.nav-links a {
    opacity: 0.92;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    color: #ccfbf1;
    opacity: 1;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.4rem;
    cursor: pointer;
}

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

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

.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-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(680px, calc(100% - 40px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 56px;
    color: #ffffff;
}

.hero-badges,
.detail-tags,
.tag-row,
.detail-tag-links,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-badges a,
.hero-badges span,
.detail-tags span,
.tag-row span,
.detail-tag-links a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-badges a,
.hero-badges span {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hero-badges a:first-child {
    background: var(--teal-600);
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 1.12rem;
    line-height: 1.9;
}

.hero-actions,
.home-search,
.search-toolbar,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.primary-button,
.ghost-button,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.home-search button {
    border: 0;
    color: #ffffff;
    background: var(--teal-600);
    cursor: pointer;
}

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

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
    position: absolute;
    right: 26px;
    bottom: 24px;
    display: flex;
    gap: 10px;
}

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

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

.quick-search-panel,
.page-hero,
.search-toolbar {
    border-radius: var(--radius-2xl);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
    padding: 28px;
    margin-bottom: 48px;
}

.quick-search-panel h2,
.page-hero h1,
.section-heading h2 {
    margin: 0;
    color: var(--gray-800);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.quick-search-panel h2,
.section-heading h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.quick-search-panel p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--gray-600);
    line-height: 1.8;
}

.home-search input,
.inline-filter input,
.search-toolbar input,
.search-toolbar select {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    background: #ffffff;
    color: var(--gray-800);
}

.home-search input:focus,
.inline-filter input:focus,
.search-toolbar input:focus,
.search-toolbar select:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.content-section {
    margin: 0 0 52px;
}

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

.section-heading a {
    color: var(--teal-700);
    font-weight: 800;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
}

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

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

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

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

.poster-year {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber-500);
    font-size: 0.76rem;
    font-weight: 800;
}

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

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 2.9em;
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-body p {
    min-height: 3.2em;
    margin: 0 0 12px;
    color: var(--gray-600);
    font-size: 0.92rem;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 0.78rem;
}

.card-meta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f4f6;
}

.tag-row span,
.detail-tag-links a {
    padding: 4px 9px;
    color: var(--teal-800);
    background: #ccfbf1;
}

.compact .card-body {
    padding: 13px;
}

.compact .card-body p {
    display: none;
}

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

.ranking-panel,
.info-panel {
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
    box-shadow: var(--shadow);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.ranking-panel h2,
.info-panel h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
}

.ranking-item {
    display: grid;
    grid-template-columns: 42px 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.ranking-item img {
    width: 64px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-num,
.ranking-row-num {
    color: #fef3c7;
    font-weight: 900;
}

.rank-title,
.ranking-row-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-meta {
    color: #ccfbf1;
    font-size: 0.86rem;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 34px;
    margin-bottom: 32px;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

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

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

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

.category-main-link {
    display: block;
    min-height: 176px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
}

.category-main-link h2 {
    margin: 0 0 12px;
    font-size: 1.45rem;
    font-weight: 900;
}

.category-main-link p {
    margin: 0;
    color: #ccfbf1;
    line-height: 1.72;
}

.category-samples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px 20px;
}

.category-samples a {
    color: var(--gray-700);
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-samples a:hover {
    color: var(--teal-700);
}

.search-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px;
    padding: 20px;
    margin-bottom: 28px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 72px 112px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 18px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.ranking-row img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-row-title {
    color: var(--gray-800);
    font-size: 1.05rem;
}

.ranking-row-meta {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--gray-600);
    font-weight: 700;
}

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

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(15, 118, 110, 0.38), rgba(0, 0, 0, 0.72));
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--teal-600);
    box-shadow: 0 18px 42px rgba(20, 184, 166, 0.35);
    font-size: 2rem;
}

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

.detail-card {
    margin-top: 24px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-card h1 {
    margin: 0 0 16px;
    color: var(--gray-800);
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.15;
    font-weight: 900;
}

.detail-card h2 {
    margin: 28px 0 12px;
    font-size: 1.25rem;
    font-weight: 900;
}

.detail-card p {
    margin: 0 0 14px;
    color: var(--gray-700);
    line-height: 1.9;
}

.lead-text {
    color: var(--gray-800) !important;
    font-weight: 800;
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-tags span {
    padding: 6px 11px;
    color: var(--teal-800);
    background: #ccfbf1;
}

.detail-tag-links {
    margin-top: 22px;
}

.info-panel {
    position: sticky;
    top: 96px;
}

.info-panel dl {
    margin: 0;
}

.info-panel dt {
    margin-top: 16px;
    color: #ccfbf1;
    font-size: 0.9rem;
}

.info-panel dd {
    margin: 4px 0 0;
    font-size: 1.08rem;
    font-weight: 900;
}

.related-section {
    margin-top: 44px;
}

.site-footer {
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a:hover {
    color: #5eead4;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    font-size: 0.9rem;
}

.is-filter-hidden {
    display: none !important;
}

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

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

    .ranking-panel,
    .info-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .site-nav {
        min-height: 64px;
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 0 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

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

    .nav-links a {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        width: calc(100% - 24px);
        padding: 28px;
    }

    .quick-search-panel,
    .page-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .quick-search-panel,
    .page-hero {
        display: grid;
    }

    .home-search,
    .search-toolbar {
        grid-template-columns: 1fr;
    }

    .home-search {
        display: grid;
    }

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

    .ranking-row {
        grid-template-columns: 56px 90px minmax(0, 1fr);
    }

    .ranking-row-meta {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

    .brand {
        font-size: 1rem;
    }

    .hero-carousel {
        height: 460px;
        border-radius: 18px;
    }

    .hero-content {
        padding: 22px;
        justify-content: flex-end;
    }

    .hero-content p {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .small-grid,
    .two-col-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 36px 54px minmax(0, 1fr);
    }

    .rank-meta {
        display: none;
    }

    .ranking-row {
        grid-template-columns: 46px 80px minmax(0, 1fr);
        padding: 10px;
    }

    .ranking-row img {
        width: 80px;
        height: 54px;
    }

    .detail-card,
    .info-panel,
    .quick-search-panel,
    .page-hero {
        padding: 20px;
    }
}
