* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #f9fafb;
    background: linear-gradient(180deg, #111827 0%, #030712 46%, #111827 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 18, 0.82);
    border-bottom: 1px solid rgba(55, 65, 81, 0.86);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 40px rgba(180, 83, 9, 0.28);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #d1d5db;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fbbf24;
    background: rgba(146, 64, 14, 0.2);
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
}

.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,
.page-hero img,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at top, #374151, #030712);
}

.hero-overlay,
.page-hero-overlay,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #030712 4%, rgba(3, 7, 18, 0.76) 42%, rgba(3, 7, 18, 0.3) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 92px;
    width: min(680px, calc(100% - 48px));
    z-index: 2;
}

.hero-label,
.page-hero span,
.detail-hero-content .breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fbbf24;
    font-size: 15px;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-hero-content p {
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #9ca3af;
}

.hero-meta span,
.detail-meta span,
.detail-meta strong,
.card-meta span,
.card-meta a,
.rank-meta span,
.rank-meta a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.72);
    border: 1px solid rgba(75, 85, 99, 0.5);
    font-size: 13px;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 18px 40px rgba(146, 64, 14, 0.26);
}

.ghost-btn {
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.42);
    background: rgba(15, 23, 42, 0.54);
}

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

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 36px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #6b7280;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.content-section.shaded {
    width: 100%;
    padding-left: max(16px, calc((100vw - 1280px) / 2));
    padding-right: max(16px, calc((100vw - 1280px) / 2));
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(3, 7, 18, 0.72));
}

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

.section-head h2,
.rank-panel h2,
.detail-block h2,
.side-card h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    color: #ffffff;
}

.section-head p,
.rank-panel p {
    margin: 8px 0 0;
    color: #9ca3af;
}

.section-more {
    color: #fbbf24;
    font-weight: 700;
}

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

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

.movie-card,
.category-card,
.rank-card,
.side-card,
.rank-panel,
.player-panel,
.detail-block {
    overflow: hidden;
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 20px;
    background: rgba(31, 41, 55, 0.58);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.movie-card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-4px);
    border-color: rgba(217, 119, 6, 0.82);
    box-shadow: 0 22px 54px rgba(146, 64, 14, 0.18);
}

.poster,
.category-cover,
.rank-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #030712);
}

.poster-wide {
    aspect-ratio: 16 / 9;
    width: 220px;
    flex: 0 0 220px;
}

.poster img,
.category-cover img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster img,
.category-card:hover .category-cover img,
.rank-card:hover .rank-cover img {
    transform: scale(1.06);
    opacity: 0.9;
}

.poster-year,
.poster-score,
.rank-cover span {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.poster-year {
    left: 12px;
}

.poster-score {
    right: 12px;
    color: #fbbf24;
}

.card-body,
.category-info {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: #fbbf24;
}

.card-line {
    display: -webkit-box;
    margin: 10px 0 14px;
    overflow: hidden;
    color: #aeb7c5;
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span,
.tag-cloud a {
    padding: 5px 9px;
    border-radius: 8px;
    color: #d1d5db;
    font-size: 12px;
    background: rgba(55, 65, 81, 0.72);
}

.movie-card-wide {
    display: flex;
    align-items: stretch;
}

.wide-list {
    display: grid;
    gap: 18px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.rank-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    color: #d1d5db;
    background: rgba(17, 24, 39, 0.72);
}

.rank-row span {
    color: #fbbf24;
    font-weight: 900;
}

.rank-row strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    font-style: normal;
    color: #fbbf24;
}

.full-btn {
    width: 100%;
}

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

.category-tile {
    position: relative;
    min-height: 154px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(75, 85, 99, 0.72);
    background: #111827;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-tile span,
.category-tile strong {
    position: absolute;
    left: 16px;
    z-index: 2;
}

.category-tile span {
    bottom: 44px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong {
    bottom: 18px;
    color: #fbbf24;
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 12px;
    color: #aeb7c5;
    line-height: 1.7;
}

.category-stat {
    margin-bottom: 14px;
    color: #fbbf24;
    font-weight: 800;
}

.mini-links {
    display: grid;
    gap: 7px;
}

.mini-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #d1d5db;
    font-size: 14px;
}

.mini-links span {
    color: #9ca3af;
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.compact-hero {
    min-height: 360px;
    padding: 96px max(24px, calc((100vw - 1280px) / 2 + 24px)) 64px;
    background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.28), transparent 34%), linear-gradient(135deg, #111827, #030712);
}

.category-hero > div,
.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding-bottom: 66px;
}

.page-hero > img,
.detail-hero > img {
    position: absolute;
    inset: 0;
}

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

.search-box {
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(75, 85, 99, 0.72);
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.8);
}

.search-box span {
    color: #fbbf24;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.toolbar-meta {
    color: #9ca3af;
}

.rank-card-list {
    display: grid;
    gap: 16px;
}

.rank-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.rank-cover {
    border-radius: 16px;
}

.rank-cover span {
    left: 10px;
    right: auto;
    top: 10px;
    color: #fbbf24;
}

.rank-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.rank-card p {
    margin: 0 0 14px;
    color: #aeb7c5;
    line-height: 1.7;
}

.detail-hero {
    min-height: 560px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-layout {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
}

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

.play-cta {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 142px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #d97706, #92400e);
    box-shadow: 0 18px 50px rgba(146, 64, 14, 0.42);
    cursor: pointer;
}

.video-shell.playing .play-cta {
    display: none;
}

.player-panel {
    padding: 14px;
}

.detail-block {
    padding: 28px;
}

.detail-block p {
    margin: 14px 0 0;
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.9;
    text-align: justify;
}

.detail-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.side-card {
    padding: 22px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 18px 0 0;
}

.side-card dt {
    color: #9ca3af;
}

.side-card dd {
    margin: 0;
    color: #ffffff;
}

.side-card a {
    color: #fbbf24;
}

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

.side-links a {
    padding: 12px;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.72);
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(55, 65, 81, 0.86);
    background: #030712;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 36px;
}

.footer-inner p {
    margin: 14px 0 0;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: #9ca3af;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #6b7280;
    border-top: 1px solid rgba(31, 41, 55, 0.86);
}

[data-filter-list] .is-hidden {
    display: none;
}

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

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

    .two-column,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 14px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-slider {
        min-height: 620px;
    }

    .hero-content {
        bottom: 86px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-hero h1 {
        font-size: 42px;
    }

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

    .category-card,
    .rank-card,
    .movie-card-wide {
        grid-template-columns: 1fr;
        display: block;
    }

    .poster-wide {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid-large,
    .category-grid,
    .category-list-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        width: 100%;
    }

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

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

    .detail-block,
    .side-card {
        padding: 20px;
    }
}
