* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --yellow: #eab308;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28);
}

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

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

.brand-icon,
.footer-logo span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--orange);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.brand-text {
    font-size: clamp(20px, 2vw, 26px);
}

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

.nav-link {
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

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

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

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

.hero {
    position: relative;
    height: clamp(500px, 66vw, 700px);
    overflow: hidden;
    background: #111827;
}

.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,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.52) 45%, rgba(0, 0, 0, 0.76));
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding-top: 28px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 12px 35px rgba(0, 0, 0, 0.34);
}

.hero-content p {
    width: min(820px, 100%);
    margin: 0 auto 24px;
    font-size: clamp(17px, 2.2vw, 24px);
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.34);
}

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

.hero-tags {
    justify-content: center;
    margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.tag-row span {
    color: var(--orange-dark);
    background: #ffedd5;
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-button,
.ghost-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, var(--orange), var(--amber));
    box-shadow: 0 18px 30px rgba(249, 115, 22, 0.34);
}

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

.ghost-button.light {
    color: #ffffff;
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-3px);
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel,
.content-section,
.category-strip,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 22px;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

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

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    min-width: 0;
    flex: 1;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    background: #ffffff;
}

.search-box input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-box button,
.filter-chip {
    border: 0;
    border-radius: 16px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--orange);
    cursor: pointer;
    font-weight: 700;
}

.content-section,
.category-strip {
    padding: 64px 0;
}

.content-section.tinted {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-header h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
}

.section-header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-header.mini h2 {
    font-size: 28px;
}

.section-more {
    color: var(--orange-dark);
    font-weight: 800;
    white-space: nowrap;
}

.movie-grid,
.feature-grid,
.category-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

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

.movie-card,
.category-card,
.text-panel,
.ranking-panel {
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover {
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fdba74, #f97316);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--orange);
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card h2 a:hover,
.rank-content h2 a:hover {
    color: var(--orange-dark);
}

.movie-card-meta,
.movie-card-desc {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.category-card:nth-child(even) {
    background: linear-gradient(135deg, #f59e0b, #eab308);
}

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

.category-card em {
    color: rgba(255, 255, 255, 0.88);
    font-style: normal;
    font-size: 14px;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(234, 88, 12, 0.9)), linear-gradient(90deg, var(--orange), var(--amber));
}

.small-hero {
    min-height: 320px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 80px 16px;
}

.small-hero > div {
    width: min(900px, 100%);
}

.small-hero p:not(.hero-kicker) {
    margin: 0 auto;
    max-width: 780px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.filter-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}

.filter-chip {
    min-height: 38px;
    color: var(--orange-dark);
    background: #ffedd5;
}

.filter-chip.active {
    color: #ffffff;
    background: var(--orange);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 28px;
}

.ranking-panel {
    padding: 24px;
    align-self: start;
}

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

.rank-list.small {
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 86px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    overflow: visible;
}

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

.rank-poster {
    display: block;
    width: 86px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #fed7aa;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-content h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.rank-content p,
.rank-content span {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-content span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.32;
    filter: blur(2px);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.92));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.78);
}

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

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

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    background: #fed7aa;
}

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

.detail-info h1 {
    margin: 12px 0 18px;
}

.detail-one-line {
    max-width: 800px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
}

.detail-tags {
    margin: 24px 0 28px;
}

.player-section {
    margin-top: -84px;
    position: relative;
    z-index: 8;
}

.player-shell {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.42), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--orange);
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

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

.text-panel {
    padding: 28px;
}

.text-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.text-panel p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

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

.prev-next a {
    padding: 18px 20px;
    border-radius: 18px;
    color: var(--orange-dark);
    background: #ffedd5;
    font-weight: 800;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
}

.footer-brand p,
.footer-column p {
    color: #9ca3af;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.footer-column a:hover {
    color: #fb923c;
}

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

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

.empty-state {
    grid-column: 1 / -1;
    padding: 42px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

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

    .split-section,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: flex-start;
        text-align: left;
    }

    .hero-tags,
    .hero-actions {
        justify-content: flex-start;
    }

    .search-panel {
        margin-top: 18px;
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        min-height: 46px;
    }

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

    .movie-grid.four,
    .movie-grid.three,
    .movie-grid.two,
    .feature-grid,
    .category-grid,
    .category-grid.compact,
    .split-section,
    .footer-inner,
    .prev-next {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: auto 72px minmax(0, 1fr);
    }

    .rank-poster {
        width: 72px;
    }

    .detail-hero {
        min-height: auto;
    }

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

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

    .player-section {
        margin-top: 20px;
    }
}
