:root {
    --orange-700: #c2410c;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --amber-100: #fef3c7;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
    --radius: 22px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-900);
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-700), var(--orange-500));
    box-shadow: 0 12px 30px rgba(194, 65, 12, 0.25);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--orange-600);
    background: var(--white);
    font-size: 14px;
}

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

.nav-link {
    padding: 8px 13px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
}

.top-search {
    position: relative;
    display: flex;
    width: 270px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
}

.top-search input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    color: var(--white);
    background: transparent;
    border: 0;
    outline: 0;
}

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

.top-search button {
    padding: 0 14px;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 8px 11px;
    cursor: pointer;
}

.quick-cats {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 12px;
    font-size: 14px;
}

.quick-cats a {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.86);
}

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: linear-gradient(110deg, var(--gray-950), var(--gray-800));
}

.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;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(249, 115, 22, 0.20), transparent 30%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.88) 0%, rgba(3, 7, 18, 0.52) 46%, rgba(3, 7, 18, 0.10) 100%),
        linear-gradient(90deg, rgba(3, 7, 18, 0.72) 0%, transparent 68%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - var(--max-width)) / 2));
    right: 32px;
    bottom: 120px;
    max-width: 760px;
    color: var(--white);
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--white);
    background: var(--orange-600);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(234, 88, 12, 0.25);
}

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

.hero-content p {
    max-width: 660px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.detail-info .primary-btn {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.primary-btn {
    color: var(--white);
    background: var(--orange-600);
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.28);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

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

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

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

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

.hero-dot.active {
    width: 32px;
    background: var(--white);
}

.hero-search-panel {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(var(--max-width), calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.68);
    backdrop-filter: blur(16px);
}

.hero-search-panel form {
    display: flex;
    flex: 1;
    overflow: hidden;
    border-radius: 999px;
    background: var(--white);
}

.hero-search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 12px 16px;
}

.hero-search-panel button {
    border: 0;
    padding: 0 22px;
    color: var(--white);
    background: var(--orange-600);
    cursor: pointer;
    font-weight: 800;
}

.hero-search-panel > a {
    color: var(--white);
    font-weight: 800;
    white-space: nowrap;
}

.home-categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.category-tile {
    min-height: 90px;
    padding: 18px;
    border-radius: 20px;
    color: var(--gray-900);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
    display: block;
    font-weight: 900;
}

.category-tile b {
    color: var(--orange-600);
    font-size: 26px;
}

.content-section {
    margin: 54px 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-title h2 span {
    color: var(--orange-600);
}

.section-more,
.text-link {
    color: var(--orange-700);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(234, 88, 12, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--orange-600);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--gray-500);
    font-size: 12px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--gray-100);
}

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

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

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

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--orange-700);
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.card-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.movie-card.horizontal .poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 170px;
}

.warm-section {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(90deg, #fff7ed, #fef3c7);
}

.page-main {
    padding-top: 28px;
}

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

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

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 40px;
    border-radius: 30px;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.36), transparent 25%),
        linear-gradient(115deg, var(--gray-950), var(--gray-800));
    box-shadow: var(--shadow);
}

.small-hero span {
    display: inline-block;
    margin-bottom: 10px;
    color: #fed7aa;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.small-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
}

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

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 30px 0 70px;
}

.category-overview-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 220px 1fr;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.thumb-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 3px;
    background: var(--gray-900);
}

.thumb-stack img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.category-overview-body {
    padding: 22px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
}

.category-overview-body p {
    color: var(--gray-600);
}

.filter-bar {
    margin: 26px 0;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-search {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

.filter-search.advanced {
    grid-template-columns: 1fr 170px 170px 170px;
}

.filter-search input,
.filter-search select {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 11px 13px;
    background: var(--white);
    outline: 0;
}

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

.region-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.region-filters button {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--gray-700);
    background: var(--gray-100);
    cursor: pointer;
}

.region-filters button.active,
.region-filters button:hover {
    color: var(--white);
    background: var(--orange-600);
}

.filter-count {
    margin-top: 12px;
    color: var(--gray-500);
    font-weight: 800;
}

.rank-table-wrap {
    overflow-x: auto;
    margin: 26px 0 50px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.rank-table th {
    color: var(--gray-700);
    background: var(--gray-100);
}

.rank-table td:first-child {
    color: var(--orange-600);
    font-weight: 900;
}

.rank-table a:hover {
    color: var(--orange-600);
}

.detail-main {
    background: #f8fafc;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: var(--white);
    background: var(--gray-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(1.08);
    transform: scale(1.02);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 20%, rgba(249, 115, 22, 0.22), transparent 28%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.66));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 32px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.05;
}

.one-line {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
}

.detail-tags {
    margin: 20px 0;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-stats span {
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

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

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 136px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--orange-600);
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.32);
    cursor: pointer;
    font-weight: 900;
}

.player-box.is-playing .player-start {
    display: none;
}

.source-note {
    margin: 12px 0 0;
    color: var(--gray-500);
    font-size: 14px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 34px;
}

.text-panel {
    padding: 26px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.text-panel h2 {
    margin: 0 0 12px;
}

.text-panel p {
    margin: 0;
    color: var(--gray-700);
}

.site-footer {
    margin-top: 70px;
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-grid {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: var(--white);
}

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

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

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

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

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

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

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

    .horizontal-grid,
    .category-overview-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: var(--orange-700);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        padding: 10px 14px;
    }

    .hero {
        min-height: 610px;
    }

    .hero-content {
        left: 24px;
        bottom: 160px;
    }

    .hero-search-panel {
        flex-direction: column;
        align-items: stretch;
    }

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

    .category-overview-card,
    .movie-card.horizontal,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

    .filter-search,
    .filter-search.advanced {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .container,
    .nav-wrap,
    .quick-cats {
        width: min(100% - 22px, var(--max-width));
    }

    .logo span:last-child {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        right: 20px;
        bottom: 172px;
    }

    .home-categories,
    .movie-grid,
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 28px 22px;
    }

    .warm-section {
        padding: 20px;
    }
}
