:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-soft: #fff7ed;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 4px 20px rgba(17, 24, 39, 0.05);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #fb923c);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.36);
}

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

.nav-links a,
.mobile-menu a {
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-menu a.active,
.mobile-menu a:hover {
    color: var(--primary-dark);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.nav-search input {
    width: 190px;
    border: 0;
    outline: 0;
    padding: 8px 10px;
    font-size: 14px;
    background: transparent;
}

.nav-search button,
.primary-btn,
.secondary-btn,
.filterbar button,
.play-button {
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.nav-search button,
.primary-btn,
.filterbar button {
    color: #fff;
    background: var(--primary);
    border-radius: 999px;
    padding: 9px 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.primary-btn:hover,
.filterbar button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.secondary-btn {
    color: #fff;
    padding: 11px 18px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle {
    display: none;
    border: 0;
    background: #fff7ed;
    color: var(--primary-dark);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.mobile-menu.open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    background: #0f172a;
}

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 46%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    left: 50%;
    top: 50%;
    transform: translate(-50%, -42%);
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
    backdrop-filter: blur(10px);
}

.hero h1 {
    max-width: 850px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -1px;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

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

.hero-panel {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.hero-thumb {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 10px;
    background: rgba(17, 24, 39, 0.58);
    backdrop-filter: blur(12px);
    cursor: pointer;
    text-align: left;
}

.hero-thumb img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.hero-thumb span {
    display: block;
    font-size: 13px;
    color: #d1d5db;
}

.hero-thumb strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-thumb.active {
    border-color: rgba(249, 115, 22, 0.9);
    background: rgba(249, 115, 22, 0.22);
}

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

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

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

.section h1,
.section h2 {
    margin: 0;
    color: var(--ink);
}

.section h1 {
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 900;
}

.section h2 {
    font-size: 28px;
    font-weight: 850;
}

.section-subtitle {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
    margin-top: 10px;
}

.view-more {
    color: var(--primary-dark);
    font-weight: 700;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.poster-box {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-box::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    padding: 6px 8px;
    border-radius: 999px;
    color: #fff;
    text-align: center;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #ef4444);
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.22);
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
}

.movie-info strong {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.35;
}

.movie-info em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
    background: var(--primary-soft);
}

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

.category-card {
    display: block;
    overflow: hidden;
    min-height: 168px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #fff, #fff7ed);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(249, 115, 22, 0.14);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.75;
}

.filterbar {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin: 22px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.filterbar input,
.filterbar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    color: #374151;
    background: #fff;
    outline: 0;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 66px 110px 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(17, 24, 39, 0.05);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: var(--dark);
}

.rank-row:nth-child(-n+3) .rank-num {
    background: linear-gradient(135deg, var(--primary), #ef4444);
}

.rank-row img {
    width: 90px;
    height: 120px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 700;
}

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

.detail-main,
.detail-side,
.text-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.detail-main {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    z-index: 4;
}

.player-overlay.hidden {
    display: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    padding: 15px 24px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #ef4444);
    box-shadow: 0 24px 50px rgba(249, 115, 22, 0.36);
}

.play-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.detail-body {
    padding: 26px;
}

.detail-body h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.18;
    font-weight: 900;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    margin-bottom: 18px;
}

.summary-block,
.review-block {
    margin-top: 24px;
}

.summary-block h2,
.review-block h2,
.detail-side h2,
.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 850;
}

.summary-block p,
.review-block p,
.text-panel p {
    margin: 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.92;
}

.detail-side {
    padding: 20px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
}

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

.side-meta {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.side-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 10px;
}

.side-meta span {
    color: #6b7280;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 9px;
    background: #fff;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateX(3px);
}

.compact-card img {
    width: 70px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong {
    display: block;
    margin-bottom: 6px;
}

.compact-card em {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 0;
}

.pager a,
.pager span {
    min-width: 38px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: center;
    background: #fff;
}

.pager .current {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed #fdba74;
    border-radius: 20px;
    color: #9a3412;
    text-align: center;
    background: #fff7ed;
}

.empty-state.show {
    display: block;
}

.text-panel {
    padding: 28px;
}

.site-footer {
    margin-top: 58px;
    color: #d1d5db;
    background: #111827;
}

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

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

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

.site-footer a {
    display: inline-block;
    margin: 0 14px 8px 0;
    color: #fed7aa;
}

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

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

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 700px;
    }

    .hero-panel,
    .section-head,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-controls {
        justify-content: center;
    }

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

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

@media (max-width: 620px) {
    .nav-shell,
    .section,
    .hero-content,
    .hero-panel,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        top: 42%;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-thumbs,
    .movie-grid,
    .category-grid,
    .filterbar {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 48px 78px 1fr;
    }

    .rank-row .primary-btn {
        grid-column: 1 / -1;
        text-align: center;
    }

    .rank-row img {
        width: 72px;
        height: 96px;
    }
}
