* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #111827;
    background: #f8fafc;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #d97706 0%, #ea580c 100%);
    box-shadow: 0 18px 40px rgba(154, 52, 18, 0.24);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #d97706;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

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

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

.nav-link {
    padding: 10px 0;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff7ed;
    border-color: rgba(255, 255, 255, 0.8);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    background: #b45309;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.mobile-nav-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 0 18px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.active img {
    transform: scale(1.12);
}

.hero-cover {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(245, 158, 11, 0.46), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, transparent 58%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 86px;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 14px;
    padding: 6px 12px;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: #fef3c7;
    border-radius: 999px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 640px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, #d97706, #ea580c);
    box-shadow: 0 16px 32px rgba(217, 119, 6, 0.34);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.side-button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    color: #ffffff;
    font-size: 40px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.42);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.intro-search {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 28px;
    margin-top: -48px;
    position: relative;
    z-index: 8;
}

.intro-copy,
.search-panel,
.content-card,
.side-card,
.player-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.intro-copy,
.search-panel {
    padding: 26px;
}

.intro-copy h2,
.section-heading h2,
.page-hero h1,
.detail-title-block h1,
.content-card h2,
.side-card h2 {
    margin: 0;
    color: #111827;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.intro-copy h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.intro-copy p:last-child,
.page-hero p,
.detail-title-block p,
.content-card p {
    color: #4b5563;
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 800;
}

.search-panel input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    outline: none;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.filter-chip {
    min-height: 34px;
    padding: 0 13px;
    color: #92400e;
    font-weight: 700;
    border: 1px solid #fde68a;
    border-radius: 999px;
    background: #fffbeb;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: #d97706;
    border-color: #d97706;
}

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

.wide-section {
    margin-top: 72px;
    padding-bottom: 72px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
}

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

.section-heading h2 {
    font-size: clamp(26px, 3.4vw, 38px);
}

.section-link {
    color: #b45309;
    font-weight: 800;
}

.section-link:hover {
    color: #92400e;
}

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

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

.category-tile {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #92400e);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    isolation: isolate;
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 178px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
    z-index: 1;
}

.category-name,
.category-desc {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-name {
    bottom: 56px;
    font-size: 22px;
    font-weight: 900;
}

.category-desc {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.82), transparent 24%),
        linear-gradient(135deg, #111827 0%, #92400e 48%, #ea580c 100%);
    border-radius: inherit;
}

.movie-card .poster-frame {
    border-radius: 22px 22px 0 0;
}

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

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

.card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 40px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.38);
    transition: opacity 0.22s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.rank-no {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

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

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.card-meta span,
.detail-meta span {
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 999px;
}

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

.movie-card h3 a:hover {
    color: #d97706;
}

.movie-card p {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row span {
    color: #92400e;
    background: #fef3c7;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: #fbbf24;
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #d97706, #ea580c);
    border-radius: 14px;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info {
    color: #6b7280;
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 16% 28%, rgba(245, 158, 11, 0.32), transparent 24%),
        linear-gradient(135deg, #111827 0%, #7c2d12 48%, #ea580c 100%);
}

.page-hero-inner {
    padding: 82px 0 76px;
}

.page-hero .section-kicker,
.detail-hero .section-kicker {
    color: #92400e;
}

.page-hero h1 {
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.listing-block .search-panel {
    margin-bottom: 26px;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 24px;
    color: #92400e;
    font-weight: 800;
    text-align: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 18px;
}

.empty-state.show {
    display: block;
}

.detail-hero {
    padding: 24px 0 52px;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.26), transparent 24%),
        linear-gradient(135deg, #111827, #7c2d12 60%, #ea580c);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fef3c7;
}

.detail-head {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.detail-title-block h1 {
    color: #ffffff;
    font-size: clamp(32px, 5vw, 58px);
}

.detail-title-block p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.detail-meta {
    margin-top: 20px;
}

.detail-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
}

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

.detail-tags span {
    color: #92400e;
    background: #fef3c7;
}

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

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

.player-card,
.content-card,
.side-card {
    padding: 22px;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 146px;
    min-height: 52px;
    color: #ffffff;
    font-weight: 900;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #d97706, #ea580c);
    box-shadow: 0 20px 40px rgba(234, 88, 12, 0.32);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 3;
}

.player-button:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.player-shell.is-playing .player-button {
    opacity: 0;
    pointer-events: none;
}

.content-card h2,
.side-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    font-size: 16px;
}

.related-grid {
    margin-top: 18px;
}

.detail-aside {
    display: grid;
    gap: 20px;
    align-content: start;
}

.side-rank {
    display: grid;
    gap: 10px;
}

.side-rank a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #f9fafb;
    border-radius: 14px;
}

.side-rank span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #ffffff;
    font-weight: 900;
    background: #d97706;
    border-radius: 10px;
}

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

.side-button {
    width: 100%;
    margin-top: 10px;
    color: #92400e;
    background: #fef3c7;
}

.site-footer {
    margin-top: 82px;
    color: #d1d5db;
    background: #111827;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    max-width: 460px;
    color: #9ca3af;
}

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

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

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

.footer-bottom {
    padding: 18px 0;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hidden-card {
    display: none !important;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        height: 560px;
    }

    .intro-search {
        grid-template-columns: 1fr;
        margin-top: -36px;
    }

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

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

    .detail-head {
        grid-template-columns: 160px minmax(0, 1fr);
        align-items: center;
    }

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

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 24px, 1180px);
    }

    .brand-name {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

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

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

    .hero-arrow {
        display: none;
    }

    .category-grid,
    .category-grid.large,
    .movie-grid,
    .movie-grid.compact-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rank-info {
        grid-column: 2;
    }

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

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

    .mobile-nav-inner {
        grid-template-columns: 1fr;
    }
}
