:root {
    --color-orange: #f97316;
    --color-orange-dark: #ea580c;
    --color-red: #ef4444;
    --color-red-dark: #dc2626;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-500: #6b7280;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --shadow-card: 0 10px 24px rgba(17, 24, 39, 0.08);
    --shadow-hover: 0 18px 36px rgba(17, 24, 39, 0.14);
    --radius-card: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-gray-50);
    color: var(--color-gray-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.86);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--color-gray-700);
    font-weight: 600;
}

.main-nav a {
    position: relative;
    padding: 8px 0;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-orange-dark);
}

.main-nav a::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
    content: "";
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
    transform: scaleX(1);
}

.nav-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    width: min(280px, 30vw);
    border: 1px solid var(--color-gray-200);
    border-radius: 999px;
    background: #fff;
}

.nav-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    outline: 0;
}

.nav-search button {
    flex: 0 0 auto;
    padding: 10px 15px;
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--color-gray-900);
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.34);
}

.btn-secondary {
    color: #fff;
    background: var(--color-gray-800);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: var(--color-gray-900);
}

.btn-light {
    color: var(--color-gray-900);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #111827, #1f2937 45%, #7c2d12);
}

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

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

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: saturate(1.1);
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.3));
    content: "";
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: center;
    gap: 42px;
    min-height: 620px;
    padding: 70px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero-title {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--color-gray-700);
    background: #fff7ed;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta .pill {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

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

.hero-search {
    display: flex;
    overflow: hidden;
    width: min(100%, 620px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
    border: 0;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
    font-weight: 800;
}

.hero-panel {
    align-self: end;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero-panel-body {
    padding: 22px;
}

.hero-panel h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.hero-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.65;
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 30px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot,
.hero-arrow {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    opacity: 0.7;
}

.hero-dot.is-active {
    width: 30px;
    opacity: 1;
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
}

.hero-arrow {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 18px;
}

.page-hero {
    padding: 70px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-800) 58%, #7c2d12);
}

.page-hero h1 {
    max-width: 880px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.8;
}

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

.section-block.compact {
    padding: 38px 0;
}

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

.section-title {
    margin: 0;
    color: var(--color-gray-900);
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--color-gray-500);
    line-height: 1.65;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.28);
    box-shadow: var(--shadow-hover);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-gray-800), var(--color-gray-900));
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card h3 a:hover {
    color: var(--color-orange-dark);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--color-gray-500);
    font-size: 13px;
}

.movie-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--color-gray-500);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.6;
}

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

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 24px;
    border-radius: var(--radius-card);
    color: #fff;
    background: linear-gradient(135deg, var(--color-gray-900), var(--color-gray-800));
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.category-card .card-link {
    margin-top: auto;
    padding-top: 22px;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--color-gray-200);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 0 14px;
    outline: 0;
    background: #fff;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb img {
    width: 92px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: var(--color-gray-900);
}

.rank-main h2,
.rank-main h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-main p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--color-gray-500);
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--color-gray-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--color-orange-dark);
}

.detail-card {
    border: 1px solid var(--color-gray-200);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.detail-intro {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    object-fit: cover;
    background: var(--color-gray-900);
    box-shadow: 0 20px 46px rgba(17, 24, 39, 0.18);
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.detail-lead {
    margin: 0 0 18px;
    color: var(--color-gray-700);
    font-size: 18px;
    line-height: 1.85;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.info-table {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.info-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    color: var(--color-gray-700);
    line-height: 1.55;
}

.info-row strong {
    color: var(--color-gray-900);
}

.player-section {
    padding: 0 28px 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.45), rgba(17, 24, 39, 0.72));
    text-align: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    box-shadow: 0 18px 45px rgba(239, 68, 68, 0.38);
    font-size: 34px;
    transform: translateX(3px);
}

.player-cover span:last-child {
    max-width: min(680px, calc(100% - 40px));
    font-size: 20px;
    font-weight: 800;
}

.article-content {
    padding: 32px 28px;
    border-top: 1px solid var(--color-gray-200);
}

.article-content h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.article-content p {
    margin: 0 0 26px;
    color: var(--color-gray-700);
    font-size: 17px;
    line-height: 1.9;
}

.sidebar-card {
    padding: 22px;
    border: 1px solid var(--color-gray-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.sidebar-card + .sidebar-card {
    margin-top: 20px;
}

.sidebar-card h2,
.sidebar-card h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 64px;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
    background: var(--color-gray-900);
}

.side-link strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.35;
}

.side-link small {
    color: var(--color-gray-500);
}

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

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.site-footer {
    margin-top: 56px;
    padding: 42px 0;
    color: rgba(255, 255, 255, 0.72);
    background: var(--color-gray-900);
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

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

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

.empty-tip {
    display: none;
    padding: 24px;
    border-radius: 18px;
    color: var(--color-gray-700);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.empty-tip.is-visible {
    display: block;
}

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

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

@media (max-width: 980px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 18px;
        border: 1px solid var(--color-gray-200);
        border-radius: 20px;
        background: #fff;
        box-shadow: var(--shadow-hover);
    }

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

    .main-nav a {
        padding: 12px 10px;
    }

    .nav-search {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 58px 0 92px;
    }

    .hero-panel {
        max-width: 560px;
    }

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

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

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 720px) {
    .container-custom {
        width: min(100% - 24px, 1280px);
    }

    .logo {
        font-size: 19px;
    }

    .hero-slider,
    .hero-content {
        min-height: 650px;
    }

    .hero-actions,
    .section-heading,
    .footer-wrap {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 18px;
    }

    .hero-search button {
        min-height: 48px;
    }

    .hero-controls {
        left: 16px;
        right: 16px;
        justify-content: center;
    }

    .movie-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-item .btn-primary {
        grid-column: 1 / -1;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
    }

    .rank-thumb img {
        width: 74px;
    }

    .page-hero {
        padding: 48px 0;
    }

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

    .detail-intro,
    .player-section,
    .article-content {
        padding-left: 18px;
        padding-right: 18px;
    }
}

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

    .hero-title {
        font-size: 34px;
    }

    .player-cover span:last-child {
        font-size: 17px;
    }
}
