* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: #111827;
    --card-2: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --gold: #facc15;
    --red: #f43f5e;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.42);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.95), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

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

.site-logo span:last-child,
.footer-logo span:last-child {
    font-size: 1.35rem;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(34, 211, 238, 0.22);
    font-size: 0.85rem;
}

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

.nav-link {
    color: #dbeafe;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #67e8f9;
}

.nav-link.subtle {
    color: #bfdbfe;
    font-weight: 500;
}

.top-search,
.mobile-search {
    position: relative;
}

.top-search input,
.mobile-search input,
.filter-grid input,
.filter-grid select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    color: white;
    background: rgba(15, 23, 42, 0.82);
    border-radius: 999px;
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 220px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    color: white;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.65);
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel nav {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 3%, rgba(2, 6, 23, 0.72) 36%, rgba(2, 6, 23, 0.2) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 90px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 14px 0 16px;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.hero p {
    max-width: 650px;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin: 0 0 24px;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(125, 211, 252, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.filter-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 24px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 36px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.filter-grid button:hover {
    transform: translateY(-2px);
}

.primary-btn.full {
    width: 100%;
    margin-top: 18px;
}

.ghost-btn {
    min-height: 46px;
    padding: 0 22px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(125, 211, 252, 0.22);
}

.ghost-btn.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.9rem;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 232, 240, 0.2);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    font-size: 2rem;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-control.prev {
    left: max(20px, calc((100vw - 1180px) / 2));
}

.hero-control.next {
    right: max(20px, calc((100vw - 1180px) / 2));
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.section {
    padding: 72px 0;
}

.section-deep,
.page-shell {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.4));
}

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

.section-head h2,
.page-title h1,
.content-panel h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.1;
}

.section-kicker {
    display: block;
    margin: 0 0 8px;
}

.section-link {
    min-height: 40px;
    padding: 0 16px;
    color: #bae6fd;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(125, 211, 252, 0.15);
}

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

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

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

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

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

.movie-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.32);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 26px 60px rgba(37, 99, 235, 0.2);
}

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

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

.movie-link:hover .poster-box img {
    transform: scale(1.1);
}

.poster-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.78));
}

.rating-pill,
.duration-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.rating-pill {
    top: 10px;
    right: 10px;
    color: #111827;
    background: var(--gold);
}

.duration-pill {
    left: 10px;
    bottom: 10px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
    top: 10px;
    left: 10px;
    color: white;
    background: linear-gradient(135deg, var(--red), #fb7185);
}

.play-float {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: auto;
    color: white;
    background: rgba(59, 130, 246, 0.86);
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-link:hover .play-float {
    opacity: 1;
    transform: scale(1);
}

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

.card-body h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.78rem;
}

.card-meta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
}

.tag-row {
    margin-top: auto;
}

.tag-row span {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 0.72rem;
}

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

.category-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 42%), rgba(30, 41, 59, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.4);
}

.category-tile span {
    font-size: 1.25rem;
    font-weight: 900;
}

.category-tile p,
.category-tile small,
.page-title p,
.category-overview-head p,
.content-panel p,
.detail-card p,
.site-footer p {
    color: var(--muted);
}

.page-shell {
    min-height: 72vh;
    padding: 56px 0 78px;
}

.page-title {
    margin-bottom: 32px;
}

.page-title h1 {
    margin-bottom: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
    color: #cbd5e1;
    font-size: 0.93rem;
}

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

.filter-panel {
    margin-bottom: 26px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-title {
    margin-bottom: 14px;
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 190px 160px 120px;
    gap: 12px;
}

.filter-grid button {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 24px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.ranking-wrap {
    display: grid;
    gap: 24px;
}

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

.ranking-row a {
    display: grid;
    grid-template-columns: 62px 112px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-row a:hover {
    transform: translateX(5px);
    border-color: rgba(34, 211, 238, 0.4);
}

.ranking-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #1d4ed8, #22d3ee);
    font-weight: 900;
}

.ranking-row img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-main {
    display: grid;
    gap: 4px;
}

.ranking-main strong {
    color: white;
    font-size: 1.05rem;
}

.ranking-main em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.92rem;
}

.ranking-meta {
    color: #e0f2fe;
    font-weight: 700;
    white-space: nowrap;
}

.detail-breadcrumb {
    margin-bottom: 22px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(0, 0, 0, 0.6));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 48px rgba(34, 211, 238, 0.3);
    font-size: 2rem;
}

.detail-card,
.content-panel {
    padding: 26px;
    border-radius: 26px;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.15;
}

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

.detail-stats span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.16);
    font-size: 0.9rem;
    font-weight: 800;
}

.content-panel {
    margin-top: 28px;
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 1.55rem;
}

.content-panel p + h2 {
    margin-top: 28px;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.info-table div {
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.info-table span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.info-table strong {
    color: white;
}

.related-section {
    padding-bottom: 0;
}

.site-footer {
    padding: 54px 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.86), rgba(15, 23, 42, 0.98));
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-grid ul {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-grid a,
.footer-grid p {
    color: #cbd5e1;
    font-size: 0.92rem;
}

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

.is-filter-hidden {
    display: none !important;
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 12px;
    }

    .top-search input {
        width: 170px;
    }

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

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

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

@media (max-width: 860px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .mobile-panel.is-open {
        display: block;
    }

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

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

    .hero-control {
        display: none;
    }

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

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

    .category-grid,
    .footer-grid,
    .info-table {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .ranking-row a {
        grid-template-columns: 44px 86px 1fr;
    }

    .ranking-row img {
        width: 86px;
        height: 58px;
    }

    .ranking-meta {
        grid-column: 3;
        white-space: normal;
    }
}

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

    .site-logo span:last-child {
        font-size: 1.08rem;
    }

    .hero {
        min-height: 520px;
    }

    .hero-tags span:nth-child(n + 5) {
        display: none;
    }

    .hero-actions {
        gap: 10px;
    }

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

    .section {
        padding: 52px 0;
    }

    .movie-grid,
    .wide-grid,
    .compact-list,
    .mini-grid,
    .category-grid,
    .footer-grid,
    .info-table {
        grid-template-columns: 1fr;
    }

    .ranking-row a {
        grid-template-columns: 38px 76px 1fr;
        gap: 10px;
    }

    .ranking-row img {
        width: 76px;
        height: 54px;
    }

    .ranking-main em {
        display: none;
    }
}
