:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --deep: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--deep);
    background: #ffffff;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.22);
}

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

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

.logo-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

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

.nav-link,
.dropdown-button {
    position: relative;
    border: 0;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
    opacity: 0.92;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
    opacity: 1;
}

.nav-link.active::after {
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
    content: "";
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 34px;
    right: 0;
    display: grid;
    width: 180px;
    padding: 10px;
    visibility: hidden;
    border-radius: 16px;
    background: #ffffff;
    color: var(--deep);
    opacity: 0;
    box-shadow: var(--shadow);
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

.dropdown-menu a {
    padding: 9px 12px;
    border-radius: 12px;
    color: #334155;
}

.dropdown-menu a:hover {
    background: #ecfeff;
    color: var(--blue);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(37, 99, 235, 0.98);
}

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

.mobile-nav a {
    padding: 10px 0;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(8px) saturate(1.25);
    transform: scale(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(37, 99, 235, 0.7), rgba(6, 182, 212, 0.38));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 50px;
    min-height: 620px;
    color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.page-hero p,
.section-heading p {
    margin: 0 0 14px;
    color: #a5f3fc;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #e0f2fe;
    font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.17);
    color: #ffffff;
}

.tag-list span {
    background: #eff6ff;
    color: var(--blue);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.button.primary {
    background: #ffffff;
    color: var(--blue);
    box-shadow: 0 16px 36px rgba(255, 255, 255, 0.18);
}

.button.primary:hover {
    transform: translateY(-2px) scale(1.02);
}

.button.ghost {
    border: 2px solid rgba(255, 255, 255, 0.86);
    color: #ffffff;
}

.button.ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.button.small {
    min-height: 38px;
    padding: 0 18px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    color: #ffffff;
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.35);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.quick-search-section {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.category-search {
    margin-top: 0;
    padding-top: 28px;
}

.quick-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
    gap: 28px;
    align-items: center;
    padding: 26px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.quick-search-card p {
    margin: 0;
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fafc;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--deep);
}

.section-block {
    padding: 72px 0;
}

.soft-bg {
    background: linear-gradient(180deg, #f8fafc, #eff6ff);
}

.section-heading {
    margin-bottom: 34px;
    text-align: center;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
}

.section-heading.with-link {
    display: flex;
    align-items: end;
    justify-content: space-between;
    text-align: left;
}

.text-link {
    color: var(--blue);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: 0.24s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.movie-card.hidden,
.rank-card.hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
}

.movie-info h2 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info h2 a:hover {
    color: var(--blue);
}

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

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

.category-tile {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
    transition: 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: #dffaff;
    font-size: 13px;
}

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

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

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

.rank-card {
    display: grid;
    grid-template-columns: 54px 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
}

.rank-cover img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-card h2 {
    margin: 0 0 6px;
    font-size: 16px;
}

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

.rank-card span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb 55%, #0f172a);
}

.small-hero {
    padding: 72px 0 56px;
}

.page-hero h2 {
    max-width: 760px;
    margin: 16px 0 0;
    color: #e0f2fe;
    font-size: 18px;
    font-weight: 500;
}

.hero-line {
    width: 92px;
    height: 5px;
    margin-top: 24px;
    border-radius: 999px;
    background: #ffffff;
}

.category-page-grid {
    display: grid;
    gap: 34px;
}

.category-preview {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.category-preview-head p {
    margin: 0 0 8px;
    color: var(--cyan);
    font-weight: 900;
}

.category-preview-head h2 {
    margin: 0;
    font-size: 20px;
}

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

.simple-grid.single-column {
    grid-template-columns: 1fr;
}

.simple-card {
    display: grid;
    gap: 10px;
}

.simple-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
    background: #e0f2fe;
}

.simple-card span {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.detail-backdrop,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    background-position: center;
    background-size: cover;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.08);
}

.detail-mask {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82), rgba(37, 99, 235, 0.45));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    color: #bae6fd;
    font-size: 14px;
}

.breadcrumb strong {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(2, 6, 23, 0.45);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-main h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.12;
}

.detail-one-line {
    max-width: 780px;
    margin: 22px 0;
    color: #e0f2fe;
    font-size: 20px;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 68px rgba(2, 6, 23, 0.34);
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.72));
    color: #ffffff;
    cursor: pointer;
    transition: 0.2s ease;
}

.player-cover strong {
    margin-top: 86px;
    font-size: 20px;
}

.play-round {
    position: absolute;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: var(--blue);
    font-size: 32px;
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.24);
}

.player-box.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.detail-content-section {
    background: var(--soft);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 34px;
    align-items: start;
}

.detail-article,
.related-panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.detail-article h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-article p {
    margin: 0 0 28px;
    color: #334155;
    font-size: 17px;
}

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

.movie-data-list div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.movie-data-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-data-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0;
}

.footer-logo {
    color: #ffffff;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 17px;
}

.site-footer p {
    margin: 12px 0 0;
}

.site-footer a {
    display: block;
    margin: 8px 0;
}

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    text-align: center;
}

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

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

    .rank-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 70px 0 90px;
    }

    .hero-poster {
        width: min(220px, 70vw);
    }

    .quick-search-card,
    .detail-layout,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        width: min(240px, 70vw);
    }

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

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

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

    .header-inner {
        height: 62px;
    }

    .logo {
        font-size: 18px;
    }

    .hero-slider,
    .hero-content {
        min-height: 690px;
    }

    .section-block {
        padding: 48px 0;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .simple-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .movie-info {
        padding: 13px;
    }

    .rank-card {
        grid-template-columns: 42px 66px minmax(0, 1fr);
    }

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .rank-cover img {
        width: 66px;
    }

    .detail-article,
    .related-panel,
    .category-preview,
    .quick-search-card {
        padding: 20px;
    }
}
