:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --emerald: #10b981;
    --emerald-strong: #059669;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.64), transparent);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled,
.site-header.menu-open {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(18px);
}

.nav-shell {
    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-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-symbol,
.footer-brand span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--emerald), #34d399);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.36);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #dbeafe;
    font-weight: 700;
}

.nav-links a {
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--emerald);
    transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #34d399;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    height: min(86vh, 840px);
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(0deg, #020617 0%, transparent 40%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 120px;
    width: min(680px, calc(100% - 48px));
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(52, 211, 153, 0.34);
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    max-width: 760px;
}

.hero-content p {
    margin: 0;
    font-size: clamp(17px, 2vw, 22px);
    color: #cbd5e1;
    max-width: 620px;
}

.hero-meta,
.detail-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
}

.hero-meta {
    margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--emerald), #34d399);
    color: white;
    box-shadow: 0 16px 48px rgba(16, 185, 129, 0.3);
}

.ghost-button {
    border: 1px solid rgba(226, 232, 240, 0.32);
    background: rgba(15, 23, 42, 0.56);
    color: #e2e8f0;
    backdrop-filter: blur(14px);
}

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

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(226, 232, 240, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
    color: white;
    font-size: 34px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.active {
    background: #34d399;
}

.category-strip,
.section,
.page-main,
.detail-main,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 48px 0 8px;
}

.category-page-grid {
    padding-top: 0;
    padding-bottom: 70px;
}

.category-card {
    min-height: 180px;
    border-radius: var(--radius);
    padding: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, filter 0.24s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.25), transparent 44%);
}

.category-card:hover {
    transform: translateY(-6px) scale(1.015);
    filter: saturate(1.15);
}

.category-icon,
.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
}

.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.category-card strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
}

.category-card em {
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
    font-size: 14px;
}

.gradient-blue {
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
}

.gradient-amber {
    background: linear-gradient(135deg, #d97706, #7c2d12);
}

.gradient-purple {
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
}

.gradient-emerald {
    background: linear-gradient(135deg, #059669, #064e3b);
}

.gradient-cyan {
    background: linear-gradient(135deg, #0891b2, #164e63);
}

.gradient-red {
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
}

.gradient-pink {
    background: linear-gradient(135deg, #db2777, #831843);
}

.gradient-indigo {
    background: linear-gradient(135deg, #4f46e5, #312e81);
}

.gradient-orange {
    background: linear-gradient(135deg, #ea580c, #7c2d12);
}

.gradient-lime {
    background: linear-gradient(135deg, #65a30d, #365314);
}

.gradient-teal {
    background: linear-gradient(135deg, #0d9488, #134e4a);
}

.gradient-violet {
    background: linear-gradient(135deg, #8b5cf6, #581c87);
}

.section {
    padding: 72px 0;
}

.section.muted {
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid var(--line);
    border-radius: 32px;
    padding-left: 28px;
    padding-right: 28px;
    box-shadow: var(--shadow);
}

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

.vertical-head {
    align-items: flex-start;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #34d399;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2 {
    margin: 0;
    letter-spacing: -0.05em;
}

.section-head h2 {
    font-size: clamp(30px, 4vw, 48px);
}

.section-head p,
.page-hero p,
.detail-copy p {
    color: var(--muted);
    margin: 10px 0 0;
}

.section-head a {
    color: #34d399;
    font-weight: 900;
}

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

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.16);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-shadow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 56%);
    opacity: 0.86;
}

.duration-badge,
.rating-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.duration-badge {
    left: 12px;
    background: rgba(2, 6, 23, 0.68);
    color: #e2e8f0;
}

.rating-badge {
    right: 12px;
    background: rgba(245, 158, 11, 0.92);
    color: white;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%) scale(0.9);
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 20px 48px rgba(16, 185, 129, 0.35);
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-link:hover h3 {
    color: #34d399;
}

.card-line {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.meta-row {
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 190px 220px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
}

.filter-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.62);
    color: white;
    padding: 0 14px;
    outline: 0;
}

.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.filter-item.is-hidden {
    display: none;
}

.rank-list {
    list-style: none;
    display: grid;
    gap: 14px;
    padding: 0;
    margin: 0;
}

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

.full-rank {
    grid-template-columns: 1fr;
}

.rank-item a {
    display: grid;
    grid-template-columns: 54px 96px 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: 104px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item a:hover {
    transform: translateX(6px);
    border-color: rgba(52, 211, 153, 0.4);
}

.rank-number {
    color: #34d399;
    font-size: 22px;
    font-weight: 950;
    text-align: center;
}

.rank-item img {
    width: 96px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    font-size: 18px;
}

.rank-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
    margin-top: 2px;
}

.rank-score {
    color: #fbbf24;
    font-weight: 950;
}

.page-main {
    padding-top: 112px;
}

.page-hero {
    margin: 0 auto 34px;
    padding: 58px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.24), transparent 26rem),
        rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-hero {
    overflow: hidden;
    position: relative;
}

.category-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.62));
}

.category-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1;
}

.page-hero p {
    max-width: 720px;
    font-size: 18px;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 104px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #34d399;
}

.detail-main {
    padding-bottom: 80px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 36px;
    margin-top: 28px;
    padding: 32px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 30rem),
        rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

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

.detail-copy {
    align-self: center;
}

.detail-copy h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1;
    margin-top: 16px;
}

.detail-copy p {
    font-size: 18px;
    max-width: 740px;
}

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

.player-section {
    position: relative;
    margin: 34px 0;
    border-radius: 30px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 18rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.24));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-start {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--emerald), #34d399);
    color: white;
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 26px 70px rgba(16, 185, 129, 0.36);
    transition: transform 0.2s ease;
}

.player-start:hover {
    transform: scale(1.06);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 24px;
}

.detail-content article {
    padding: 28px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--line);
}

.detail-content h2 {
    font-size: 28px;
    margin-bottom: 14px;
}

.detail-content p {
    color: #cbd5e1;
    margin: 0 0 12px;
}

.related-section {
    width: 100%;
    padding-bottom: 0;
}

.site-footer {
    padding: 54px 0 28px;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr 1fr;
    gap: 30px;
    padding: 36px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--line);
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: white;
    font-size: 16px;
}

.footer-grid a {
    display: block;
    margin: 6px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: #34d399;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 14px;
}

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

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

@media (max-width: 860px) {
    .nav-shell {
        min-height: 66px;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid var(--line);
    }

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

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

    .hero-slider {
        min-height: 620px;
        height: 82vh;
    }

    .hero-content {
        bottom: 88px;
    }

    .hero-control {
        display: none;
    }

    .category-strip,
    .movie-grid,
    .compact-grid,
    .all-grid,
    .rank-preview,
    .footer-grid,
    .detail-content,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .section.muted {
        padding-left: 18px;
        padding-right: 18px;
    }

    .section-head,
    .filter-toolbar {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .rank-item a {
        grid-template-columns: 42px 84px 1fr;
    }

    .rank-score {
        grid-column: 3;
    }

    .page-hero,
    .detail-hero {
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 20px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-actions,
    .hero-meta {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .section {
        padding: 48px 0;
    }

    .card-line {
        min-height: auto;
    }

    .page-main {
        padding-top: 92px;
    }

    .breadcrumb {
        padding-top: 88px;
    }

    .player-start {
        width: 74px;
        height: 74px;
    }
}
