:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --card: #ffffff;
    --line: rgba(148, 163, 184, 0.24);
    --emerald: #059669;
    --teal: #0d9488;
    --cyan: #0891b2;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, #059669 0%, #0d9488 48%, #0891b2 100%);
    box-shadow: 0 18px 42px rgba(8, 145, 178, 0.24);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #064e3b;
    background: #fde68a;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(253, 230, 138, 0.3);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    white-space: nowrap;
    flex: 1 1 auto;
}

.main-nav a,
.mobile-panel a {
    transition: color 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
    color: #fde68a;
}

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

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.hero-search input {
    border: 0;
    outline: none;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 11px 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.top-search input {
    width: 230px;
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-btn,
.secondary-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    color: #064e3b;
    background: #fde68a;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    color: #ffffff;
}

.mobile-search input {
    flex: 1 1 auto;
    min-width: 0;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 1.4s ease;
    background-size: cover;
    background-position: center;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(6, 78, 59, 0.68) 52%, rgba(8, 145, 178, 0.2) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 42px;
    padding: 72px 0;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.08;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.78;
}

.hero-actions,
.hero-links,
.hero-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.secondary-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-links a {
    display: inline-flex;
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-search {
    display: flex;
    max-width: 560px;
    gap: 10px;
    margin: 24px 0 0;
}

.hero-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px;
}

.hero-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.02) 100%);
}

.hero-card-content h3 {
    margin: 0 0 8px;
    font-size: 26px;
}

.hero-card-content span {
    color: #fde68a;
    font-weight: 700;
}

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

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

.page-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 70px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 24px 0 34px;
    padding: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, #064e3b 0%, #0d9488 50%, #0891b2 100%);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(253, 230, 138, 0.35), transparent 66%);
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.15;
}

.page-hero p {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
    line-height: 1.8;
}

.section-block {
    margin-top: 34px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-head a {
    color: var(--emerald);
    font-weight: 700;
}

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

.movie-card {
    min-width: 0;
    background: var(--card);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.04));
    transition: opacity 0.3s ease;
}

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

.poster-year,
.rank-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-year {
    right: 10px;
    bottom: 10px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f43f5e, #f59e0b);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-body p {
    height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    overflow: hidden;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-row span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #047857;
    background: #d1fae5;
    font-size: 12px;
}

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

.category-card a {
    position: relative;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #064e3b, #0d9488 55%, #0891b2);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.category-glow {
    position: absolute;
    right: -60px;
    top: -60px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(253, 230, 138, 0.28);
}

.category-card h2 {
    position: relative;
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.72;
}

.category-samples {
    position: relative;
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
}

.category-samples a {
    min-height: auto;
    display: block;
    padding: 0;
    color: #fde68a;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin: 0 0 24px;
    padding: 16px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    background: #f1f5f9;
    border-radius: 14px;
}

.empty-state {
    display: none;
    margin: 20px 0;
    padding: 22px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: 18px;
}

.empty-state.is-visible {
    display: block;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

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

.rank-row a {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-row a:hover {
    transform: translateX(4px);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.rank-row img {
    width: 92px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}

.list-rank {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f43f5e, #f59e0b);
    border-radius: 14px;
    font-weight: 800;
}

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

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

.rank-row span:last-child {
    color: var(--emerald);
    font-size: 13px;
    font-weight: 700;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.side-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-panel a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.player-card,
.detail-card,
.poster-panel {
    overflow: hidden;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.28s ease;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #064e3b;
    background: #fde68a;
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    max-width: min(620px, 82%);
    font-size: clamp(22px, 3vw, 36px);
    line-height: 1.25;
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
}

.detail-card h2 {
    margin: 26px 0 10px;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.9;
}

.info-pills,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}

.info-pills span {
    display: inline-flex;
    padding: 8px 13px;
    color: #065f46;
    background: #d1fae5;
    border-radius: 999px;
    font-weight: 700;
}

.review-box {
    margin-top: 18px;
    padding: 22px;
    color: #475569;
    line-height: 1.9;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
    border-left: 5px solid var(--amber);
    border-radius: 18px;
}

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

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.poster-info {
    padding: 20px;
}

.poster-info h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.poster-info dl {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px 8px;
    margin: 0;
    color: #475569;
}

.poster-info dt {
    color: #0f766e;
    font-weight: 800;
}

.poster-info dd {
    margin: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.compact-card .card-body p {
    height: 38px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #020617);
    padding: 48px 0 24px;
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .nav-shell {
        gap: 14px;
    }

    .top-search {
        margin-left: auto;
    }

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

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

@media (max-width: 900px) {
    .hero-inner,
    .detail-layout,
    .rank-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding: 54px 0;
    }

    .hero-card {
        max-width: 420px;
    }

    .poster-panel,
    .side-panel {
        position: static;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 680px) {
    .nav-shell {
        width: min(100% - 20px, 1280px);
        height: auto;
        min-height: 66px;
    }

    .brand {
        font-size: 20px;
    }

    .top-search {
        display: none;
    }

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

    .hero-inner,
    .page-main {
        width: min(100% - 20px, 1280px);
    }

    .hero-card {
        display: none;
    }

    .hero-search {
        flex-direction: column;
    }

    .page-hero {
        padding: 28px;
        border-radius: 22px;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p {
        height: 40px;
        font-size: 12px;
    }

    .rank-row a {
        grid-template-columns: auto 72px minmax(0, 1fr);
    }

    .rank-row img {
        width: 72px;
        height: 96px;
    }

    .detail-card {
        padding: 20px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
