:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(51, 65, 85, 0.72);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --blue: #2563eb;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.84);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: white;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
}

.desktop-nav a,
.nav-dropdown button,
.mobile-nav a {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover button,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 34px;
    right: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.dropdown-panel a:hover {
    background: var(--cyan-soft);
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 12px;
    color: #cbd5e1;
}

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    height: min(80vh, 760px);
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.4), transparent),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.52) 42%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: max(28px, calc((100% - 1180px) / 2));
    right: 24px;
    bottom: 86px;
    max-width: 720px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    margin: 12px 0 18px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 680px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.7;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #a5f3fc;
    font-size: 12px;
    border: 1px solid rgba(34, 211, 238, 0.45);
    border-radius: 999px;
    background: var(--cyan-soft);
}

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

.primary-btn,
.ghost-btn,
.section-heading a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
}

.ghost-btn,
.section-heading a {
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-heading a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
    border-color: rgba(34, 211, 238, 0.45);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 40px;
    line-height: 1;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #64748b;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--cyan);
}

.search-band,
.content-section,
.footer-grid,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-band {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 420px);
    gap: 24px;
    align-items: end;
    padding: 56px 0 24px;
}

.search-band h2,
.page-hero h1,
.section-heading h2,
.detail-copy h1 {
    margin: 8px 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.03em;
}

.search-band p,
.page-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--cyan);
    font-weight: 700;
}

.search-box input {
    width: 100%;
    height: 48px;
    color: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    padding: 0 16px;
    background: rgba(15, 23, 42, 0.72);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.category-pills {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a {
    padding: 10px 14px;
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    transition: all 0.2s ease;
}

.category-pills a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.55);
    transform: translateY(-2px);
}

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

.muted-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: rgba(15, 23, 42, 0.32);
    border-top: 1px solid rgba(51, 65, 85, 0.28);
    border-bottom: 1px solid rgba(51, 65, 85, 0.28);
}

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

.section-heading h2 {
    margin-bottom: 0;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.12);
    transform: translateY(-6px);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18), transparent);
}

.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: white;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.9);
    backdrop-filter: blur(10px);
}

.poster-copy {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 14px;
}

.poster-copy h3 {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: white;
    font-size: 17px;
    line-height: 1.32;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.poster-copy p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body {
    padding: 14px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 84px 0 32px;
}

.compact-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 28px;
    align-items: end;
}

.page-search {
    align-self: end;
}

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

.category-card {
    min-height: 176px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 12rem),
        rgba(15, 23, 42, 0.68);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    border-color: rgba(34, 211, 238, 0.55);
    transform: translateY(-4px);
}

.category-card span {
    display: block;
    margin-bottom: 14px;
    color: white;
    font-size: 22px;
    font-weight: 800;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.ranking-preview,
.rank-list {
    display: grid;
    gap: 12px;
}

.ranking-preview a,
.rank-item a {
    display: grid;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-preview a {
    grid-template-columns: 42px minmax(0, 1fr) 60px;
    min-height: 56px;
    padding: 0 18px;
}

.ranking-preview a:hover,
.rank-item a:hover {
    border-color: rgba(34, 211, 238, 0.55);
    transform: translateX(4px);
}

.ranking-preview span,
.rank-num {
    color: var(--cyan);
    font-weight: 900;
    font-size: 22px;
}

.ranking-preview strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-preview em {
    color: var(--muted);
    font-style: normal;
    text-align: right;
}

.rank-item a {
    grid-template-columns: 56px 78px minmax(0, 1fr);
    padding: 12px;
}

.rank-item img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-item h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-item p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-shell {
    padding: 34px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--cyan);
}

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

.detail-main,
.detail-copy,
.side-card {
    min-width: 0;
}

.player-card,
.detail-copy,
.side-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
}

.player-card {
    padding: 12px;
}

.player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.35);
    font-size: 32px;
}

.player.playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player:hover .player-controls,
.player:focus-within .player-controls {
    opacity: 1;
}

.player-controls button {
    min-width: 64px;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: white;
    background: rgba(15, 23, 42, 0.75);
    cursor: pointer;
}

.detail-copy {
    margin-top: 24px;
    padding: 28px;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.detail-type {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: #a5f3fc;
    border: 1px solid rgba(34, 211, 238, 0.45);
    border-radius: 999px;
    background: var(--cyan-soft);
}

.detail-one-line {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.info-list div {
    padding: 14px;
    border: 1px solid rgba(51, 65, 85, 0.65);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.28);
}

.info-list dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 0;
    color: white;
}

.detail-copy section {
    margin-top: 28px;
}

.detail-copy h2,
.side-card h2 {
    color: var(--cyan);
}

.detail-copy p {
    color: #cbd5e1;
    line-height: 1.95;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, #0f172a, #164e63);
    box-shadow: var(--shadow);
}

.side-card {
    margin-top: 18px;
    padding: 20px;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.65);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.28);
}

.side-links a:hover {
    border-color: rgba(34, 211, 238, 0.5);
}

.side-links span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(51, 65, 85, 0.52);
    background: rgba(2, 6, 23, 0.9);
}

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

.footer-grid h2,
.footer-grid h3 {
    color: var(--cyan);
}

.footer-grid p,
.footer-links a {
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(51, 65, 85, 0.52);
    text-align: center;
}

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

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }

    .side-card {
        margin-top: 0;
    }
}

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    body.menu-open .mobile-nav {
        display: grid;
    }

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

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 84px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band,
    .compact-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item a {
        grid-template-columns: 42px 70px minmax(0, 1fr);
    }

    .rank-item img {
        width: 70px;
        height: 94px;
    }

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

    .detail-poster {
        max-width: 260px;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero-content h1 {
        font-size: 38px;
    }

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

    .movie-grid,
    .wide-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-preview a {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .ranking-preview em {
        display: none;
    }

    .detail-copy {
        padding: 20px;
    }

    .detail-title-row {
        flex-direction: column;
    }
}
