:root {
    --brand: #ea580c;
    --brand-dark: #dc2626;
    --brand-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --page: #f8fafc;
    --card: #ffffff;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--page);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #ea580c, #dc2626);
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #ea580c;
    background: #fff;
    box-shadow: inset 0 -4px 12px rgba(234, 88, 12, 0.18);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.desktop-nav a,
.nav-dropdown button {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px 0;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown button:hover {
    color: #ffedd5;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: 36px;
    left: 50%;
    width: 280px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 14px;
    color: var(--text);
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.nav-dropdown:hover .nav-dropdown-panel {
    display: grid;
}

.nav-dropdown-panel a {
    color: var(--text);
    padding: 9px 10px;
    border-radius: 10px;
    background: #fff7ed;
}

.nav-dropdown-panel a:hover {
    color: #c2410c;
    background: #fed7aa;
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.top-search input,
.mobile-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    color: var(--text);
}

.top-search button,
.mobile-search button {
    height: 40px;
    border: 0;
    padding: 0 15px;
    color: #fff;
    background: #111827;
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

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

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72)), linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    right: 24px;
    bottom: 72px;
    z-index: 2;
    max-width: 720px;
    color: #fff;
}

.hero-content h1 {
    margin: 16px 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #f3f4f6;
    font-size: 18px;
    line-height: 1.75;
}

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

.hero-meta span,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 13px;
    color: #fff;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.94);
    font-size: 14px;
    font-weight: 700;
}

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

.btn,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn {
    color: #fff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 18px 30px rgba(239, 68, 68, 0.28);
}

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

.btn-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.44);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: width 200ms ease, background 200ms ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #f97316;
}

.main-wrap {
    padding: 46px 0 70px;
}

.section {
    margin-bottom: 56px;
}

.section-soft {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2,
.section-head h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 4vw, 38px);
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-link {
    color: #ea580c;
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

.movie-card {
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.movie-poster {
    position: relative;
    height: 236px;
    margin: 0;
    overflow: hidden;
    background: #111827;
}

.card-large .movie-poster {
    height: 360px;
}

.small-grid .movie-poster {
    height: 190px;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease;
}

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

.movie-poster figcaption {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    color: #fff;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.movie-meta {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag-row span {
    padding: 4px 8px;
    color: #c2410c;
    border-radius: 999px;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.category-panel {
    margin-bottom: 34px;
}

.category-panel h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
    font-size: 22px;
}

.category-panel h3 a {
    color: #ea580c;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.compact-card:hover {
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.compact-card img {
    width: 74px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
}

.compact-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.compact-card em {
    color: #ea580c;
    font-style: normal;
    font-weight: 800;
}

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

.list-movie a {
    display: grid;
    grid-template-columns: 46px 150px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.list-movie a:hover {
    box-shadow: var(--shadow);
}

.list-movie img {
    width: 150px;
    height: 86px;
    border-radius: 12px;
    object-fit: cover;
}

.list-movie h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.list-movie p {
    margin: 0 0 7px;
    color: var(--muted);
    line-height: 1.55;
}

.list-movie small {
    color: #9ca3af;
}

.list-movie strong,
.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.rank-dot {
    width: 12px;
    height: 12px;
    margin-left: 14px;
    border-radius: 50%;
    background: #f97316;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-bar input {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 0 16px;
    font-size: 15px;
}

.filter-bar input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.filter-bar button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    color: #fff;
    background: #111827;
    cursor: pointer;
    font-weight: 800;
}

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

.breadcrumb a {
    color: #ea580c;
    font-weight: 800;
}

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

.detail-main,
.detail-side {
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-main {
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.32), rgba(0, 0, 0, 0.5));
    cursor: pointer;
}

.play-overlay.is-hidden {
    display: none;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 20px 42px rgba(239, 68, 68, 0.38);
    font-size: 34px;
    transform: translateX(3px);
}

.detail-content {
    padding: 28px;
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.18;
}

.detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-info span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #c2410c;
    background: #ffedd5;
    font-weight: 800;
    font-size: 13px;
}

.detail-content h2,
.detail-side h2 {
    margin: 26px 0 12px;
    font-size: 24px;
}

.detail-content p {
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags a,
.detail-tags span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #7c2d12;
    background: #fff7ed;
    font-size: 13px;
    font-weight: 800;
}

.detail-side {
    padding: 22px;
}

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

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

.side-item img {
    width: 96px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
}

.side-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

.side-item span {
    color: var(--muted);
    font-size: 12px;
}

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

.category-card {
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.category-card p {
    color: var(--muted);
    line-height: 1.75;
}

.category-card .mini-links {
    display: grid;
    gap: 7px;
    margin: 16px 0 0;
}

.category-card .mini-links a {
    color: #ea580c;
    font-weight: 800;
}

.search-empty {
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
    background: #fff;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
    color: #fff;
    margin: 0 0 14px;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.75;
}

.site-footer a {
    display: block;
    margin: 7px 0;
    color: #d1d5db;
}

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .header-inner {
        min-height: 62px;
    }

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

    .compact-row,
    .categories-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        order: 2;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        left: 18px;
        bottom: 58px;
    }

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

    .hero-control {
        display: none;
    }

    .section-soft,
    .detail-content {
        padding: 20px;
    }

    .movie-grid,
    .movie-grid.large-grid,
    .movie-grid.small-grid {
        grid-template-columns: 1fr;
    }

    .movie-poster,
    .small-grid .movie-poster,
    .card-large .movie-poster {
        height: 260px;
    }

    .list-movie a {
        grid-template-columns: 38px 92px minmax(0, 1fr);
    }

    .list-movie img {
        width: 92px;
        height: 68px;
    }

    .list-movie strong {
        display: none;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
