:root {
    --brand: #f97316;
    --brand-deep: #dc2626;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --panel: #ffffff;
    --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #f9fafb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-width: 320px;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

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

.desktop-nav a {
    color: #374151;
    font-weight: 700;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--brand);
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

.header-search input {
    width: 190px;
    border: 0;
    outline: 0;
    padding: 10px 12px 10px 18px;
    background: transparent;
}

.header-search button,
.search-page-form button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    padding: 10px 18px;
    font-weight: 800;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    font-weight: 800;
    color: #374151;
}

.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
}

.mobile-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--brand-deep);
}

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

.hero-shell {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 34px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

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

.hero-background {
    position: absolute;
    inset: 0;
}

.hero-background img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.02);
}

.hero-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 16%, rgba(249, 115, 22, 0.32), transparent 28%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.72) 43%, rgba(17, 24, 39, 0.32) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    padding: 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
    color: #ffffff;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 14px 0 10px;
    max-width: 780px;
    font-size: clamp(36px, 5.2vw, 70px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    font-weight: 950;
}

.hero-copy strong {
    display: block;
    margin-bottom: 20px;
    font-size: clamp(28px, 3.2vw, 46px);
    color: #fed7aa;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffedd5;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 18px 32px rgba(220, 38, 38, 0.28);
}

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

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    height: 470px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 9px 13px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.hero-controls {
    position: absolute;
    left: 70px;
    right: 70px;
    bottom: 34px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.is-active {
    width: 34px;
    opacity: 1;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.hero-category-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.hero-category-strip a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
    color: #374151;
    font-weight: 900;
}

.hero-category-strip span {
    color: var(--brand);
    font-size: 22px;
}

.section-wrap,
.category-block {
    width: min(1220px, calc(100% - 32px));
    margin: 54px auto;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading span,
.page-hero span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--brand);
    font-weight: 950;
    letter-spacing: 0.12em;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.section-heading p,
.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.row-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.row-heading > a {
    color: var(--brand-deep);
    font-weight: 900;
    white-space: nowrap;
}

.filter-panel {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.filter-tools input,
.search-page-form input {
    flex: 1 1 320px;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: #f9fafb;
}

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

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tags button {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: var(--soft);
    color: var(--brand-deep);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(249, 115, 22, 0.16);
}

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

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

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

.quality-badge,
.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    font-size: 12px;
    font-weight: 950;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(8px);
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--brand-deep);
    font-size: 13px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 950;
}

.movie-card p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

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

.tag-row span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    min-height: 170px;
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile strong {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 950;
    color: var(--brand-deep);
}

.category-tile span {
    color: var(--muted);
    line-height: 1.7;
}

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

.ranking-panel,
.content-card {
    border-radius: 28px;
    background: #ffffff;
    padding: 24px;
    box-shadow: var(--shadow);
}

.ranking-list,
.ranking-large-list {
    display: grid;
    gap: 14px;
}

.ranking-large-list {
    gap: 18px;
}

.mini-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.ranking-large-list .mini-card {
    grid-template-columns: 112px minmax(0, 1fr);
    padding: 16px;
}

.mini-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    background: var(--soft);
}

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

.mini-card h3 {
    margin: 2px 0 8px;
    font-size: 17px;
    font-weight: 950;
}

.ranking-large-list .mini-card h3 {
    font-size: 22px;
}

.mini-card p,
.mini-card span {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 44px;
    padding: clamp(34px, 6vw, 72px);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 15%, rgba(255, 237, 213, 0.75), transparent 32%),
        linear-gradient(135deg, #111827 0%, #7f1d1d 62%, #ea580c 100%);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.breadcrumb {
    width: min(1220px, calc(100% - 32px));
    margin: 24px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--brand-deep);
}

.detail-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 54px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 36px;
    padding: 34px;
    border-radius: 34px;
    background: linear-gradient(135deg, #111827 0%, #7f1d1d 55%, #f97316 100%);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.35);
}

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

.detail-info {
    align-self: center;
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(34px, 4vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.detail-lead {
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 900;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #ffedd5;
}

.player-section {
    scroll-margin-top: 96px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.64));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 22px 38px rgba(220, 38, 38, 0.38);
    font-weight: 950;
}

.player-start span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.player-start em {
    font-style: normal;
}

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

.content-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 950;
}

.content-card p {
    margin: 0;
    color: #374151;
    line-height: 1.95;
}

.search-page-form {
    display: flex;
    max-width: 680px;
    margin-top: 28px;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
}

.search-page-form input {
    border-radius: 999px 0 0 999px;
    border: 0;
    background: #ffffff;
}

.search-page-form button {
    border-radius: 0;
}

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

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

.side-link-list a {
    display: block;
    padding: 14px;
    border-radius: 18px;
    background: var(--soft);
}

.side-link-list strong {
    display: block;
    margin-bottom: 6px;
    color: var(--brand-deep);
    font-size: 18px;
}

.side-link-list span {
    color: var(--muted);
    line-height: 1.6;
}

.sticky-side {
    position: sticky;
    top: 96px;
}

.site-footer {
    margin-top: 76px;
    padding: 46px 0 24px;
    background: #111827;
    color: #ffffff;
}

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

.footer-inner p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-inner h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.62);
}

[data-card].is-hidden,
#searchDefaultSection.is-hidden {
    display: none;
}

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

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

    .hero-poster {
        display: none;
    }

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

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

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-header-inner {
        height: 64px;
        gap: 12px;
    }

    .site-logo {
        font-size: 20px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .hero-shell,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding: 34px 24px 86px;
    }

    .hero-controls {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }

    .hero-category-strip,
    .category-grid,
    .movie-grid,
    .compact-grid,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .section-wrap,
    .category-block {
        margin: 38px auto;
    }

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

    .filter-panel,
    .page-hero,
    .detail-hero {
        border-radius: 24px;
        padding: 24px;
    }

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

    .ranking-large-list .mini-card,
    .mini-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .search-page-form {
        border-radius: 22px;
        flex-direction: column;
    }

    .search-page-form input {
        border-radius: 22px 22px 0 0;
    }

    .footer-inner {
        gap: 22px;
    }
}
