:root {
    color-scheme: dark;
    --bg-deep: #020617;
    --bg-main: #0f172a;
    --bg-soft: rgba(30, 41, 59, 0.72);
    --bg-card: rgba(15, 23, 42, 0.82);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --emerald: #10b981;
    --emerald-light: #34d399;
    --cyan: #22d3ee;
    --orange: #fb923c;
    --purple: #c084fc;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    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 34%), linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 35px;
    height: 35px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: white;
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.28);
}

.logo-text {
    background: linear-gradient(90deg, var(--emerald-light), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #dbeafe;
    font-size: 15px;
}

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

.main-nav a:hover,
.main-nav a.active,
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--emerald-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 245px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 9px 14px;
}

.search-pill input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.search-pill input::placeholder {
    color: #94a3b8;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: white;
    border-radius: 14px;
    background: rgba(51, 65, 85, 0.92);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 14px 0 18px;
}

.mobile-menu.is-open {
    display: grid;
    gap: 14px;
}

.mobile-menu .search-pill {
    width: 100%;
}

.hero {
    position: relative;
    height: 76vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 35%, rgba(2, 6, 23, 0.22) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.88));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    padding-top: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald-light);
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.045em;
    color: white;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hero-desc {
    margin: 22px 0 0;
    max-width: 620px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 0;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    box-shadow: 0 14px 36px rgba(16, 185, 129, 0.34);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: rgba(52, 211, 153, 0.55);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 9px;
}

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

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

.page-main {
    padding: 48px 0 72px;
}

.section-stack {
    display: grid;
    gap: 58px;
}

.section-card {
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.58));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: clamp(22px, 3vw, 34px);
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p,
.lead {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    color: var(--emerald-light);
    font-weight: 700;
    white-space: nowrap;
}

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

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

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.32), transparent);
}

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

.play-orb {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: rgba(16, 185, 129, 0.92);
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.32);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    font-size: 12px;
    line-height: 1;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.badge-left {
    left: 10px;
    background: rgba(16, 185, 129, 0.88);
}

.badge-right {
    right: 10px;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 13px;
}

.card-title {
    margin: 0;
    color: white;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--emerald-light);
}

.card-desc {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: #94a3b8;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 155px;
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.38);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.9), rgba(8, 47, 73, 0.92));
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 12px;
    font-size: 23px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin: 22px 0 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--text);
    outline: 0;
    background: rgba(15, 23, 42, 0.72);
    padding: 12px 16px;
}

.filter-panel option {
    background: #0f172a;
}

.empty-state {
    display: none;
    margin: 24px 0 0;
    padding: 28px;
    border-radius: 18px;
    text-align: center;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 66px 112px 1fr auto;
    gap: 18px;
    align-items: center;
    border-radius: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(30, 41, 59, 0.88);
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: white;
    font-size: 19px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.rank-poster {
    width: 112px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

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

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.rank-info p {
    margin: 0 0 10px;
    color: #94a3b8;
    line-height: 1.7;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #cbd5e1;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #cbd5e1;
}

.breadcrumb a:hover {
    color: var(--emerald-light);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: black;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.2));
}

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

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 24px 62px rgba(16, 185, 129, 0.42);
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 5;
    display: none;
    max-width: calc(100% - 36px);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 14px;
    font-size: 14px;
}

.player-message.is-visible {
    display: block;
}

.info-card {
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
    padding: clamp(20px, 3vw, 30px);
}

.info-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 45px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.info-card h2,
.info-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.info-card p {
    color: #cbd5e1;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.tag {
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 6px 10px;
    font-size: 13px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    border-radius: 16px;
    padding: 9px;
    background: rgba(15, 23, 42, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
    background: rgba(51, 65, 85, 0.72);
    transform: translateX(3px);
}

.related-item img {
    width: 84px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.related-item h4 {
    margin: 0 0 6px;
    color: white;
    line-height: 1.45;
}

.related-item p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.96));
    padding: 44px 0 26px;
    color: #94a3b8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: white;
    font-size: 17px;
}

.footer-grid p,
.footer-grid a {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 14px;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 20px;
    font-size: 13px;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

@media (max-width: 1100px) {
    .main-nav {
        gap: 14px;
        font-size: 14px;
    }

    .search-pill {
        width: 210px;
    }

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

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

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

@media (max-width: 850px) {
    .main-nav,
    .header-actions > .site-search-form {
        display: none;
    }

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

    .hero {
        height: 68vh;
        min-height: 520px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .rank-item {
        grid-template-columns: 48px 82px 1fr;
    }

    .rank-item .btn {
        grid-column: 2 / -1;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 15px;
    }

    .rank-poster {
        width: 82px;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

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

    .header-inner {
        height: 62px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 31px;
        height: 31px;
    }

    .hero {
        height: 72vh;
        min-height: 540px;
    }

    .hero-copy {
        padding-top: 12px;
    }

    .hero-desc {
        font-size: 16px;
    }

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

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

    .section-card {
        border-radius: 22px;
        padding: 18px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-body {
        padding: 11px;
    }

    .card-desc {
        display: none;
    }

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

    .rank-poster {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .rank-item .btn {
        grid-column: auto;
    }

    .player-button {
        width: 72px;
        height: 72px;
    }

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