:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #e5e7eb;
    --brand: #f97316;
    --brand-deep: #ea580c;
    --brand-soft: #fff7ed;
    --dark: #09090b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(124, 45, 18, 0.94));
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.top-search input {
    width: 220px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 10px;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.68);
}

.top-search button,
.inline-filter button {
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    color: #ffffff;
    background: var(--brand);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

main {
    min-height: 60vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(249, 115, 22, 0.48), transparent 26%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.24) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    padding-bottom: 86px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    font-size: 14px;
    font-weight: 700;
}

.hero-content .kicker {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.18);
    border: 1px solid rgba(251, 146, 60, 0.32);
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.chip-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    padding: 5px 10px;
    font-size: 13px;
}

.chip-row span {
    color: var(--muted);
    background: #f3f4f6;
}

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

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.28);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(249, 115, 22, 0.36);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(16px, calc((100vw - 1180px) / 2));
    top: 50%;
    display: flex;
    gap: 12px;
    transform: translateY(-50%);
}

.hero-controls button {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.28);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transition: 0.22s ease;
}

.hero-controls button:hover {
    background: var(--brand);
}

.hero-thumbs {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 26px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    padding: 10px;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
}

.hero-thumb.active {
    border-color: rgba(251, 146, 60, 0.86);
    background: rgba(249, 115, 22, 0.32);
}

.hero-thumb img {
    width: 56px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-thumb span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
}

.search-panel,
.content-section,
.category-overview-block,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: 28px;
    padding: 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.category-overview-title h2 {
    margin: 10px 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
}

.search-panel p,
.section-head p,
.category-overview-title p {
    margin: 0;
    color: var(--muted);
}

.search-panel form,
.search-page-form,
.inline-filter {
    display: flex;
    gap: 10px;
}

.search-panel input,
.search-page-form input,
.inline-filter input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--soft);
    border-radius: 999px;
    outline: 0;
    padding: 0 18px;
    background: #ffffff;
}

.section-head,
.category-overview-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-link {
    min-height: 40px;
    color: var(--brand-deep);
    background: var(--brand-soft);
}

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

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

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #d1d5db;
}

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

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

.play-mark {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.94);
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.32);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.movie-card h3 a:hover {
    color: var(--brand-deep);
}

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

.alt-section {
    padding: 28px;
    border-radius: 28px;
    background: #111827;
    color: #ffffff;
}

.alt-section .section-head p {
    color: rgba(255, 255, 255, 0.7);
}

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

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

.category-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--radius);
    padding: 20px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.24), transparent 30%),
        linear-gradient(135deg, #111827, #7c2d12 55%, #f97316);
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.14);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(124, 45, 18, 0.2);
}

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

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.page-hero,
.detail-hero {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 26px;
    padding: 46px;
    color: #ffffff;
    background:
        radial-gradient(circle at 84% 20%, rgba(249, 115, 22, 0.48), transparent 28%),
        linear-gradient(135deg, #111827, #431407);
}

.page-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.category-overview-block {
    padding: 26px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 34px;
    align-items: stretch;
    padding: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 88% 8%, rgba(249, 115, 22, 0.48), transparent 28%),
        linear-gradient(135deg, #111827, #271008);
}

.detail-poster img {
    height: 100%;
    min-height: 460px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

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

.detail-info h1 {
    margin: 16px 0 14px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
}

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

.player-shell {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: var(--brand);
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.36);
}

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

.player-shell.playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-text {
    padding: 30px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.detail-text h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-text h2 + p {
    margin-top: 0;
}

.detail-text p {
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 58px;
    padding: 44px 0 28px;
    color: rgba(255, 255, 255, 0.76);
    background: #111827;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
}

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

.site-footer p {
    margin: 0;
}

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

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0 !important;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.55);
}

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

@media (max-width: 1080px) {
    .top-search {
        display: none;
    }

    .movie-grid,
    .rank-list,
    .featured-grid,
    .compact-grid,
    .all-ranks,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .search-panel,
    .page-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 20px;
        background: rgba(17, 24, 39, 0.98);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        border-radius: 14px;
    }

    .brand {
        font-size: 18px;
    }

    .hero-slider {
        height: 660px;
    }

    .hero-content {
        margin-left: 16px;
        padding-right: 16px;
        padding-bottom: 190px;
    }

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

    .hero-controls {
        right: 16px;
        top: auto;
        bottom: 138px;
        transform: none;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        bottom: 16px;
    }

    .hero-thumb:not(.active) {
        display: none;
    }

    .search-panel,
    .page-hero,
    .detail-hero,
    .category-overview-block,
    .detail-text {
        padding: 22px;
        border-radius: 24px;
    }

    .search-panel form,
    .search-page-form,
    .inline-filter {
        flex-direction: column;
    }

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

    .movie-grid,
    .rank-list,
    .featured-grid,
    .compact-grid,
    .all-ranks,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

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

    .detail-poster img {
        min-height: auto;
        max-height: 520px;
    }

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

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

@media (max-width: 460px) {
    .movie-grid,
    .rank-list,
    .featured-grid,
    .compact-grid,
    .all-ranks,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }
}
