:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --white: #ffffff;
    --shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50), var(--white) 42%, var(--slate-100));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    color: var(--white);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
    color: var(--white);
    box-shadow: 0 12px 26px rgba(20, 184, 166, 0.32);
}

.brand-text {
    font-size: 22px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--teal-400);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

.mobile-nav {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 25%, rgba(20, 184, 166, 0.28), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    width: min(1240px, calc(100% - 40px));
    color: var(--white);
    padding: 58px 0 118px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-400);
    background: rgba(20, 184, 166, 0.14);
    border: 1px solid rgba(45, 212, 191, 0.24);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.sub-hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

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

.hero-meta span,
.detail-meta span,
.meta-row span {
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
}

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

.primary-button,
.secondary-button,
.filter-panel button,
.ghost-button {
    border: 0;
    border-radius: 14px;
    padding: 13px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.filter-panel button {
    background: var(--teal-500);
    color: var(--white);
    box-shadow: 0 15px 34px rgba(20, 184, 166, 0.3);
}

.primary-button:hover,
.filter-panel button:hover {
    background: var(--teal-600);
    transform: translateY(-2px);
}

.secondary-button,
.ghost-button {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 36px;
    background: var(--teal-400);
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%);
    display: flex;
    width: min(760px, calc(100% - 40px));
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 14px 16px;
    background: transparent;
    color: var(--slate-900);
}

.hero-search button {
    border: 0;
    border-radius: 12px;
    padding: 0 24px;
    background: var(--teal-500);
    color: var(--white);
    font-weight: 800;
    cursor: pointer;
}

.category-strip {
    width: min(1240px, calc(100% - 40px));
    margin: 24px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-strip a {
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--white);
    color: var(--slate-700);
    box-shadow: var(--soft-shadow);
    font-weight: 700;
}

.category-strip a:hover,
.category-strip .ranking-entry {
    color: var(--teal-600);
}

.section-wrap,
.dark-ranking,
.breadcrumb,
.detail-layout {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.section-wrap {
    padding: 64px 0;
}

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

.section-head h2 {
    margin: 12px 0 6px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: var(--slate-600);
}

.section-head.inverted h2,
.section-head.inverted p,
.dark-ranking .section-kicker {
    color: var(--white);
}

.text-link,
.light-link {
    color: var(--teal-600);
    font-weight: 800;
}

.light-link {
    color: var(--teal-400);
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate-200);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.68));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.play-badge,
.rank-num {
    position: absolute;
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 900;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.9);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3,
.card-title {
    display: block;
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

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

.card-body p,
.card-desc {
    margin: 0 0 12px;
    color: var(--slate-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row span {
    background: var(--teal-50);
    color: var(--teal-600);
}

.dark-ranking {
    padding: 44px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.24), transparent 28%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
    box-shadow: var(--shadow);
}

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

.mini-card {
    display: flex;
    gap: 13px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-3px);
}

.mini-cover {
    position: relative;
    flex: 0 0 92px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: var(--slate-800);
}

.rank-num {
    left: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--teal-500);
    font-size: 13px;
}

.mini-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-info strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.mini-info em {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.62);
    font-style: normal;
    font-size: 13px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 34% 1fr;
}

.wide-cover {
    position: relative;
    overflow: hidden;
    min-height: 172px;
}

.wide-body {
    padding: 22px;
}

.sub-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.22), transparent 28%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
    padding: 72px max(20px, calc((100% - 1240px) / 2)) 76px;
}

.sub-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

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

.category-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.category-card-main {
    display: block;
    padding: 28px;
    background: linear-gradient(135deg, var(--white), var(--teal-50));
}

.category-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 14px;
    color: var(--white);
    background: var(--teal-500);
    font-weight: 900;
}

.category-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.category-card p {
    margin: 0;
    color: var(--slate-600);
}

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 28px 24px;
}

.category-sample a {
    color: var(--teal-600);
    background: var(--teal-50);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 13px;
    outline: 0;
    padding: 12px 13px;
    color: var(--slate-900);
    background: var(--slate-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--teal-400);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.ghost-button {
    color: var(--slate-700);
    background: var(--slate-100);
    border-color: var(--slate-200);
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 28px;
    border-radius: 20px;
    background: var(--white);
    color: var(--slate-600);
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.empty-state.show {
    display: block;
}

.page-ranking {
    margin-top: 56px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px 0 18px;
    color: var(--slate-600);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding-bottom: 72px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 16 / 9;
    background: var(--slate-900);
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: var(--slate-900);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-orb {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--teal-500);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(20, 184, 166, 0.38);
}

.player-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12));
    color: var(--white);
}

.player-bar button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.player-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.player-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--teal-400);
}

.detail-card,
.side-card {
    margin-top: 24px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-card {
    padding: 30px;
}

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

.detail-meta span {
    color: var(--teal-600);
    background: var(--teal-50);
}

.one-line {
    margin: 24px 0;
    padding: 18px 20px;
    border-left: 5px solid var(--teal-500);
    border-radius: 14px;
    color: var(--slate-700);
    background: var(--teal-50);
    font-weight: 700;
}

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

.detail-card p {
    margin: 0;
    color: var(--slate-700);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list span {
    border-radius: 999px;
    padding: 7px 12px;
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 700;
    font-size: 13px;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.side-card h2 {
    margin-top: 0;
}

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

.side-list .mini-card {
    color: var(--slate-900);
    background: var(--slate-50);
}

.side-list .mini-info em {
    color: var(--slate-500);
}

.site-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.76);
    background: var(--slate-900);
}

.footer-inner {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding: 42px 0;
}

.footer-logo {
    color: var(--white);
    font-size: 22px;
}

.footer-inner p {
    max-width: 620px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-content: start;
}

.footer-links a:hover {
    color: var(--teal-400);
}

.footer-copy {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.52);
    font-size: 14px;
}

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

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

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

    .side-card {
        position: static;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        padding-bottom: 148px;
    }

    .hero-search {
        flex-direction: column;
        bottom: 66px;
    }

    .hero-search button {
        padding: 12px 20px;
    }

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

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

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

    .dark-ranking {
        padding: 26px;
        border-radius: 24px;
    }

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

    .detail-card {
        padding: 22px;
    }

    .player-bar {
        grid-template-columns: auto 1fr auto;
    }

    .player-bar button[data-player-mute],
    .player-bar button[data-player-fullscreen] {
        display: none;
    }
}
