:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --cyan-strong: #0891b2;
    --orange: #fb923c;
    --shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #020617 52%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.28);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.logo-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-weight: 600;
}

.site-nav a,
.nav-dropdown > button {
    border: 0;
    padding: 8px 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.nav-dropdown > button:hover {
    color: #67e8f9;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: grid;
    width: 230px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: rgba(30, 41, 59, 0.9);
}

.mobile-menu-button {
    display: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
    padding: 8px 12px;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
}

.hero-slide.is-active {
    display: block;
    animation: fadeIn 0.6s ease both;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, #0f172a 0%, transparent 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.hero-copy {
    width: min(680px, 100%);
    pointer-events: auto;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow span,
.section-kicker {
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.16);
    padding: 7px 12px;
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.22);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 660px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
}

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

.hero-meta {
    margin: 26px 0;
}

.hero-meta span,
.detail-meta-list span,
.card-meta-row span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #dbeafe;
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
}

.ghost-button,
.outline-button {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.18);
}

.hero-thumbs {
    position: absolute;
    right: 0;
    bottom: 24px;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    padding: 9px;
    text-align: left;
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.hero-thumb.is-active {
    border-color: rgba(103, 232, 249, 0.68);
    box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.18), 0 16px 40px rgba(6, 182, 212, 0.14);
}

.hero-thumb img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
    background: #1e293b;
}

.hero-thumb span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

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

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    padding: 28px;
    box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info-card h1 {
    margin: 12px 0 10px;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.intro-panel h2,
.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.intro-panel p,
.section-heading p,
.page-hero p {
    color: var(--muted);
    max-width: 720px;
}

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

.section-heading > a {
    color: #67e8f9;
    font-weight: 800;
    white-space: nowrap;
}

.rank-strip {
    display: grid;
    gap: 10px;
}

.rank-strip:not(.vertical-rank) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rank-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.64);
    padding: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(103, 232, 249, 0.58);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: #ffffff;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f8fafc;
    font-weight: 800;
}

.rank-score {
    color: #67e8f9;
    font-weight: 900;
}

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

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

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

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
    border-color: rgba(103, 232, 249, 0.62);
    transform: translateY(-5px);
    box-shadow: 0 22px 54px rgba(6, 182, 212, 0.16);
}

.poster-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.3), transparent 12rem),
        linear-gradient(135deg, #1e293b, #020617);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.92);
    color: #ffffff;
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-corner {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.78);
    color: #fef3c7;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.card-meta-row {
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta-row span {
    padding: 4px 8px;
    font-size: 12px;
}

.card-weight {
    color: #fef3c7 !important;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 10px;
    overflow: hidden;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag-list span,
.detail-tags a {
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.72);
    color: #cbd5e1;
    padding: 5px 9px;
    font-size: 12px;
}

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

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 12rem),
        rgba(15, 23, 42, 0.76);
    padding: 22px;
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.18);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
    border-color: rgba(103, 232, 249, 0.58);
    transform: translateY(-4px);
}

.category-count {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.16);
    color: #67e8f9;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.category-card h2 {
    margin: 18px 0 8px;
    font-size: 24px;
}

.category-card p,
.category-card small {
    color: var(--muted);
}

.category-card small {
    display: block;
    margin-top: 14px;
}

.search-box input {
    width: min(360px, 100%);
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 16px;
    outline: none;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    padding: 0 16px;
}

.search-box input:focus {
    border-color: rgba(103, 232, 249, 0.75);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.page-hero {
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.24), transparent 24rem),
        linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.8));
    padding: 72px 0 62px;
}

.page-hero h1 {
    font-size: clamp(42px, 7vw, 72px);
}

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

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-wrap {
    padding-top: 38px;
}

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

.player-card,
.detail-info-card,
.sidebar-card,
.sitemap-box {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.28), rgba(2, 6, 23, 0.68));
    color: #ffffff;
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.28);
}

.play-overlay strong {
    font-size: 18px;
}

.play-overlay.hidden {
    display: none;
}

.player-status {
    position: absolute;
    right: 14px;
    bottom: 12px;
    left: 14px;
    margin: 0;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.7);
    color: #cbd5e1;
    padding: 8px 12px;
    font-size: 13px;
}

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

.detail-title-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 20px;
    align-items: start;
}

.detail-title-row img {
    width: 160px;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    background: #1e293b;
}

.detail-info-card h1 {
    font-size: clamp(32px, 5vw, 54px);
}

.detail-info-card h2,
.sidebar-card h2,
.sitemap-box h2 {
    margin: 26px 0 10px;
    font-size: 22px;
}

.detail-info-card p {
    color: #cbd5e1;
    font-size: 16px;
}

.lead-text {
    color: #67e8f9 !important;
    font-size: 18px !important;
}

.detail-tags a:hover {
    background: rgba(6, 182, 212, 0.22);
    color: #67e8f9;
}

.detail-sidebar {
    display: grid;
    gap: 20px;
    align-content: start;
    position: sticky;
    top: 92px;
}

.sidebar-card {
    padding: 20px;
}

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

.sidebar-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 14px;
    margin: 0;
    color: #cbd5e1;
}

.sidebar-card dt {
    color: var(--muted);
}

.sidebar-card dd {
    margin: 0;
}

.related-section {
    margin-top: 32px;
}

.empty-state {
    border: 1px dashed var(--border);
    border-radius: 18px;
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

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

.sitemap-box {
    padding: 24px;
}

.sitemap-box.full-width {
    grid-column: 1 / -1;
}

.sitemap-box ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sitemap-box a {
    color: #cbd5e1;
}

.sitemap-box a:hover {
    color: #67e8f9;
}

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

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.76);
    padding: 42px 0 24px;
}

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

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p,
.footer-bottom {
    color: var(--muted);
}

.site-footer h3 {
    margin: 0 0 14px;
}

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

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #67e8f9;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-size: 13px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.01);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

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

    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 820px) {
    .mobile-menu-button {
        display: inline-flex;
    }

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

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

    .nav-dropdown-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .hero-section {
        min-height: 760px;
    }

    .hero-content {
        align-items: flex-start;
        padding-top: 86px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
    }

    .hero-thumb:not(.is-active) {
        display: none;
    }

    .intro-panel,
    .section-heading,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .large-category-grid,
    .sitemap-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .sitemap-movies {
        grid-template-columns: 1fr;
    }

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

    .detail-title-row img {
        width: min(220px, 100%);
    }
}

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

    .logo-text em {
        display: none;
    }

    .hero-section {
        min-height: 700px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .page-hero {
        padding: 52px 0 44px;
    }

    .rank-strip:not(.vertical-rank) {
        grid-template-columns: 1fr;
    }
}
