html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #e2e8f0;
    background: #020617;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}

.brand-text {
    font-size: 23px;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    border-radius: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.9);
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.22);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e2e8f0;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 8px 0 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
}

main {
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 28%, rgba(14, 165, 233, 0.26), transparent 30%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.2) 100%);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.2);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    color: #ffffff;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-content h1 {
    font-size: clamp(42px, 7vw, 84px);
    text-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.quick-search-row,
.detail-meta-row,
.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

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

.primary-btn,
.quick-search button {
    color: #ffffff;
    border: 0;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.22);
    cursor: pointer;
}

.ghost-btn,
.outline-btn {
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.24);
    background: rgba(15, 23, 42, 0.52);
}

.primary-btn:hover,
.ghost-btn:hover,
.outline-btn:hover,
.quick-search button:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-panel,
.content-section,
.category-overview-list,
.breadcrumb,
.detail-hero,
.detail-content,
.filter-bar {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-top: -38px;
    position: relative;
    z-index: 2;
}

.quick-search,
.rank-entry,
.filter-bar,
.story-card,
.category-overview-card,
.rank-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.86));
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.quick-search,
.rank-entry {
    padding: 22px;
}

.quick-search label,
.filter-bar label {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 800;
}

.quick-search input,
.filter-bar input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.62);
}

.quick-search input:focus,
.filter-bar input:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.rank-entry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
}

.rank-entry strong {
    color: #ffffff;
    font-size: 24px;
}

.rank-entry span {
    color: #94a3b8;
}

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

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading h2 {
    display: inline;
    margin: 0 0 4px 10px;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.section-icon {
    color: #22d3ee;
    font-size: 26px;
}

.section-more {
    align-self: center;
    color: #67e8f9;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: #0f172a;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span {
    margin-top: 68px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 6px;
    color: #cbd5e1;
}

.category-tile:hover img {
    opacity: 0.52;
    transform: scale(1.08);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 26px 58px rgba(6, 182, 212, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.9);
}

.movie-card-body {
    padding: 16px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta span {
    color: #94a3b8;
    font-weight: 700;
}

.movie-card h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover {
    color: #67e8f9;
}

.movie-card p {
    min-height: 50px;
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
}

.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-line span,
.detail-tags span,
.detail-meta-row span {
    padding: 5px 9px;
    color: #cbd5e1;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.rank-panel h2,
.category-overview-card h2,
.story-card h2 {
    margin: 0;
    color: #ffffff;
}

.rank-panel a,
.category-overview-head a {
    color: #67e8f9;
    font-weight: 800;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.45);
}

.rank-item a:hover {
    background: rgba(6, 182, 212, 0.14);
}

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

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

.rank-meta {
    grid-column: 2;
    color: #94a3b8;
    font-size: 13px;
}

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

.page-hero {
    position: relative;
    min-height: 330px;
    display: flex;
    align-items: center;
    padding: 56px max(24px, calc((100% - 1180px) / 2));
    background:
        radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.22), transparent 28%),
        linear-gradient(135deg, #020617, #0f172a 52%, #111827);
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 66px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-card p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.filter-bar {
    margin-top: 36px;
    padding: 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px 0;
    color: #94a3b8;
}

.breadcrumb a {
    color: #67e8f9;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 32px;
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.16), transparent 34%),
        rgba(15, 23, 42, 0.86);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 64px);
}

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

.detail-tags {
    margin-top: 18px;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    padding-left: 5px;
    color: #ffffff;
    font-size: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 48px rgba(6, 182, 212, 0.3);
}

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

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

.story-card {
    padding: 26px;
}

.story-card p {
    margin: 12px 0 0;
    color: #cbd5e1;
}

.searchable-grid .movie-card.is-hidden {
    display: none;
}

.site-footer {
    margin-top: 82px;
    color: #94a3b8;
    background: #020617;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-brand p {
    max-width: 430px;
}

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

.footer-links h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

    .split-section,
    .quick-search-panel {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .brand-text {
        font-size: 20px;
    }

    .hero-carousel {
        height: 72vh;
        min-height: 520px;
    }

    .hero-content {
        bottom: 72px;
    }

    .quick-search-panel {
        margin-top: 20px;
    }

    .category-grid,
    .movie-grid,
    .compact-grid,
    .mini-grid,
    .feature-grid,
    .full-rank-list,
    .detail-content,
    .footer-shell {
        grid-template-columns: 1fr;
    }

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

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .detail-poster {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .content-section,
    .category-overview-list,
    .breadcrumb,
    .detail-hero,
    .detail-content,
    .filter-bar,
    .quick-search-panel,
    .player-section,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .hero-carousel {
        min-height: 500px;
    }

    .hero-actions,
    .quick-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn,
    .outline-btn,
    .quick-search button {
        width: 100%;
    }
}
