:root {
    --bg: #0a0a0a;
    --panel: #121212;
    --panel-soft: #1a1a1a;
    --panel-hover: #252525;
    --line: #262626;
    --line-strong: #404040;
    --text: #f5f5f5;
    --muted: #a3a3a3;
    --muted-dark: #737373;
    --accent: #dc2626;
    --accent-deep: #b91c1c;
    --gold: #eab308;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    --glow: 0 0 24px rgba(220, 38, 38, 0.35);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.site-logo span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--accent);
    border-radius: 12px;
    color: #ffffff;
    box-shadow: var(--glow);
}

.site-logo strong {
    font-size: 20px;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.nav-link {
    padding: 9px 14px;
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: var(--panel-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(18, 18, 18, 0.9);
}

.header-search input,
.hero-search input,
.large-search input {
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.header-search input {
    width: 220px;
    padding: 8px 12px;
}

.header-search button,
.hero-search button,
.large-search button {
    border: 0;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
    padding: 8px 16px;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button:hover,
.hero-search button:hover,
.large-search button:hover,
.primary-button:hover {
    background: var(--accent-deep);
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    color: #ffffff;
    background: var(--panel);
    border-radius: 12px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-image,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
}

.hero-overlay,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.68) 38%, rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, var(--bg), transparent 45%, rgba(0, 0, 0, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 860px;
    padding: 96px 0 120px;
}

.hero-kicker,
.detail-kicker {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.hero h1,
.detail-copy h1,
.rank-hero h1,
.category-hero h1,
.search-hero h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #e5e5e5;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-tags,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 26px;
}

.hero-tags span,
.tag-row span {
    color: #ffffff;
    background: rgba(220, 38, 38, 0.16);
    border: 1px solid rgba(220, 38, 38, 0.38);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--accent);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}

.hero-panel {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    width: min(1440px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-search,
.large-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-search input {
    width: min(52vw, 520px);
    padding: 11px 16px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
    background: var(--accent);
    box-shadow: var(--glow);
}

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

.content-section {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
}

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

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

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

.section-more {
    color: var(--accent);
    font-weight: 800;
}

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

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

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 15%, rgba(220, 38, 38, 0.2), transparent 38%),
        var(--panel-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
}

.movie-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: var(--glow);
}

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

.card-rank {
    position: absolute;
    left: 10px;
    top: 10px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 13px 2px 0;
}

.movie-title {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

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

.movie-meta,
.movie-line {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-line {
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    color: #d4d4d4;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    font-size: 12px;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.11), rgba(18, 18, 18, 0.94));
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rank-panel-head h2 {
    margin: 0;
    font-size: 24px;
}

.rank-panel-head a {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 14px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.mini-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.mini-card img {
    width: 54px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--panel-soft);
}

.mini-rank,
.mini-dot {
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
}

.mini-rank {
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: 50%;
}

.mini-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}

.mini-card strong,
.mini-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card strong {
    color: #ffffff;
}

.mini-card em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.cloud-links a,
.category-tile {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--panel), rgba(220, 38, 38, 0.08));
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cloud-links a:hover,
.category-tile:hover {
    border-color: rgba(220, 38, 38, 0.65);
    box-shadow: var(--glow);
    transform: translateY(-3px);
}

.category-tile span,
.category-tile em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.category-tile strong {
    display: block;
    margin: 8px 0;
    color: #ffffff;
    font-size: 22px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 42px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0 12px;
    color: #ffffff;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.pagination a.active,
.pagination a:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.search-hero,
.rank-hero,
.category-hero,
.category-title-bar {
    margin-bottom: 34px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.18), transparent 34%),
        var(--panel);
}

.search-hero p,
.rank-hero p,
.category-hero p,
.category-title-bar p {
    max-width: 760px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

.large-search {
    width: min(720px, 100%);
    margin-top: 22px;
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
}

.rank-hero span,
.category-title-bar span {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.08em;
}

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

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #000000;
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1440px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 90px 0 70px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: var(--panel-soft);
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    max-width: 980px;
}

.detail-one-line {
    max-width: 860px;
    margin: 22px 0 0;
    color: #e5e5e5;
    font-size: 20px;
    line-height: 1.8;
}

.detail-tags {
    margin: 24px 0 30px;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: -68px auto 0;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.18), rgba(0, 0, 0, 0.38));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    background: var(--accent);
    border-radius: 50%;
    font-size: 34px;
    box-shadow: var(--glow);
}

.player-start strong {
    font-size: 20px;
}

.player-shell.playing .player-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-copy {
    padding: 20px 4px 0;
}

.player-copy h2 {
    margin: 0;
    font-size: 28px;
}

.player-copy p {
    color: var(--muted);
    line-height: 1.75;
}

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

.story-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

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

.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--line);
    background: #050505;
}

.footer-inner {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-inner p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.footer-links a {
    color: var(--muted);
}

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

.hidden-by-search {
    display: none !important;
}

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

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

    .rank-panel {
        position: static;
    }

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

@media (max-width: 860px) {
    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .site-nav {
        position: fixed;
        top: 66px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(10, 10, 10, 0.98);
        box-shadow: var(--shadow);
    }

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

    .header-search {
        display: none;
    }

    .menu-button {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-content {
        padding-top: 92px;
    }

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

    .hero-search,
    .large-search {
        width: 100%;
    }

    .hero-search input {
        width: 100%;
        min-width: 0;
        flex: 1;
    }

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

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

    .detail-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 88px;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }

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

@media (max-width: 560px) {
    .site-logo strong {
        font-size: 17px;
    }

    .hero h1,
    .detail-copy h1,
    .rank-hero h1,
    .category-hero h1,
    .search-hero h1 {
        font-size: 38px;
    }

    .content-section {
        padding: 38px 0;
    }

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

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

    .movie-title {
        font-size: 15px;
    }

    .movie-line,
    .tag-row {
        display: none;
    }

    .cloud-links,
    .category-tile-grid {
        grid-template-columns: 1fr;
    }

    .search-hero,
    .rank-hero,
    .category-hero,
    .category-title-bar,
    .story-card {
        padding: 22px;
    }

    .player-start span {
        width: 66px;
        height: 66px;
        font-size: 26px;
    }
}
