* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --teal: #14b8a6;
    --cyan: #06b6d4;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #ffffff 0%, rgba(236, 253, 245, 0.72) 45%, rgba(240, 253, 250, 0.82) 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 18px;
}

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

.brand__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.28);
    transition: transform 0.28s ease;
}

.brand:hover .brand__icon {
    transform: scale(1.08) rotate(6deg);
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--emerald-dark), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand__text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    color: #374151;
    font-weight: 650;
    padding: 9px 12px;
    border-radius: 12px;
    transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--emerald-dark);
    background: rgba(16, 185, 129, 0.10);
}

.header-search,
.mobile-search,
.inline-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-search input,
.filter-select {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
}

.mobile-search input,
.inline-search input {
    width: 100%;
    padding: 12px 16px;
}

.filter-select {
    min-width: 150px;
    padding: 12px 16px;
}

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

.header-search button,
.mobile-search button,
.inline-search button,
.hero-button,
.cta-button,
.play-button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.header-search button,
.mobile-search button,
.inline-search button {
    padding: 10px 16px;
}

.hero-button,
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
}

.header-search button:hover,
.mobile-search button:hover,
.inline-search button:hover,
.hero-button:hover,
.cta-button:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.28);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    background: rgba(16, 185, 129, 0.10);
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #374151;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 12px 14px;
    color: #374151;
    border-radius: 12px;
    font-weight: 700;
}

.mobile-panel a:hover {
    background: rgba(16, 185, 129, 0.10);
    color: var(--emerald-dark);
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-slide__image {
    position: absolute;
    inset: 0;
}

.hero-slide__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-slide__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    min-height: 640px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding: 86px 0 110px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5eead4;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-copy h1 {
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    margin: 16px 0 20px;
    max-width: 780px;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 28px;
    font-size: clamp(17px, 2.4vw, 22px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
}

.hero-tags span,
.detail-tags span,
.category-pill,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

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

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

.hero-dot {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: all 0.22s ease;
}

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

main {
    display: block;
}

.content-wrap {
    padding: 58px 0 76px;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 8px 0 8px;
    color: #0f172a;
    letter-spacing: -0.025em;
}

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

.section-heading p,
.page-hero p,
.detail-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-heading a {
    color: var(--emerald-dark);
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

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

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

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

.movie-card__type,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.movie-card__type {
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-card__body {
    padding: 17px;
}

.movie-card__meta,
.movie-card__footer,
.detail-meta,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.movie-card__meta {
    margin-bottom: 9px;
    font-size: 12px;
    color: var(--muted);
}

.movie-card__meta a {
    color: var(--emerald-dark);
    font-weight: 800;
}

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card__footer {
    justify-content: space-between;
    color: #6b7280;
    font-size: 12px;
    border-top: 1px solid rgba(229, 231, 235, 0.74);
    padding-top: 12px;
}

.movie-card--compact .movie-card__body {
    padding: 14px;
}

.movie-card--compact h3 {
    font-size: 16px;
}

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

.movie-card--horizontal,
.related-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
}

.movie-card--horizontal .movie-card__poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 130px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 25px;
}

.category-card p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.72;
}

.category-card span {
    font-weight: 850;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    padding: 66px 0;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.page-hero h1,
.page-hero p,
.page-hero .page-kicker {
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.page-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 0 0 28px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
}

.sidebar-card {
    position: sticky;
    top: 88px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.sidebar-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.sidebar-links {
    display: grid;
    gap: 8px;
}

.sidebar-links a {
    display: flex;
    justify-content: space-between;
    padding: 11px 12px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
}

.sidebar-links a:hover,
.sidebar-links a.is-active {
    color: var(--emerald-dark);
    background: rgba(16, 185, 129, 0.10);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 160px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.75);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

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

.ranking-row img {
    width: 160px;
    height: 96px;
    object-fit: cover;
    border-radius: 16px;
}

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

.ranking-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.ranking-score {
    color: var(--emerald-dark);
    font-weight: 900;
    white-space: nowrap;
}

.detail-hero {
    padding: 48px 0 28px;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(240, 253, 250, 0.72));
}

.breadcrumb {
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

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

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-meta {
    margin-top: 20px;
}

.meta-pill {
    color: #065f46;
    background: rgba(16, 185, 129, 0.11);
}

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

.player-box {
    position: relative;
    overflow: hidden;
    background: #020617;
    border-radius: 28px;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.26);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.24), rgba(0, 0, 0, 0.70));
    z-index: 3;
}

.player-cover.is-hidden {
    display: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    font-size: 34px;
    padding-left: 5px;
}

.detail-panel,
.related-panel {
    margin-top: 28px;
    padding: 26px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.detail-panel h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-panel p {
    color: #374151;
    font-size: 17px;
    line-height: 1.86;
    margin: 0 0 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-tags span {
    color: #374151;
    background: #f3f4f6;
}

.side-cover {
    overflow: hidden;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.side-cover div {
    padding: 20px;
}

.side-cover h2 {
    margin: 0 0 12px;
}

.side-cover p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.related-card {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.2s ease;
}

.related-card:hover {
    background: rgba(16, 185, 129, 0.08);
}

.related-card img {
    width: 118px;
    height: 74px;
    object-fit: cover;
    border-radius: 14px;
}

.related-card strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.35;
}

.related-card em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.no-result {
    display: none;
    padding: 28px;
    color: var(--muted);
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px dashed #cbd5e1;
    text-align: center;
}

.site-footer {
    background: linear-gradient(135deg, #f8fafc, #ecfdf5);
    border-top: 1px solid rgba(229, 231, 235, 0.85);
    padding: 44px 0 0;
}

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

.footer-brand {
    color: var(--emerald-dark);
    font-size: 24px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

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

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: #4b5563;
}

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

.footer-bottom {
    margin-top: 34px;
    padding: 18px;
    text-align: center;
    color: #6b7280;
    border-top: 1px solid rgba(229, 231, 235, 0.85);
}

@media (max-width: 1080px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand__text em {
        display: none;
    }

    .hero,
    .hero-slide__content {
        min-height: 560px;
    }

    .hero-copy {
        padding: 72px 0 94px;
    }

    .section-heading,
    .page-tools {
        display: block;
    }

    .inline-search {
        margin-top: 14px;
    }

    .movie-grid,
    .movie-grid--three,
    .movie-grid--two,
    .category-showcase {
        grid-template-columns: 1fr;
    }

    .movie-card--horizontal {
        grid-template-columns: 1fr;
    }

    .movie-card--horizontal .movie-card__poster {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

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

    .ranking-row img,
    .ranking-score {
        display: none;
    }

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

    .play-button {
        width: 68px;
        height: 68px;
        font-size: 27px;
    }
}
