:root {
    --orange: #ea580c;
    --red: #dc2626;
    --amber: #f59e0b;
    --dark: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    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: #111827;
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.28);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.92;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #fff;
    font-weight: 600;
}

.main-nav > a,
.nav-dropdown > button {
    color: #fff;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    opacity: 0.94;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown > button:hover {
    opacity: 1;
    color: #ffedd5;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 30px;
    right: 0;
    width: 230px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    border-radius: 16px;
    background: #fff;
    color: #111827;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    color: var(--orange);
    background: #fff7ed;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 22px;
}

.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: linear-gradient(90deg, #111827, #1f2937);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 28%, rgba(249, 115, 22, 0.24), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.56) 46%, rgba(0, 0, 0, 0.28) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    top: 50%;
    width: min(620px, calc(100% - 48px));
    transform: translateY(-50%);
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fed7aa;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.hero-content p {
    margin: 0;
    max-width: 560px;
    color: #f9fafb;
    font-size: 17px;
    line-height: 1.8;
}

.hero-tags,
.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.tag-line span {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.tag-line span {
    color: #c2410c;
    background: #fff7ed;
}

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

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

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

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

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

.btn.text {
    color: #fed7aa;
}

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

.hero-dots button {
    width: 26px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.active {
    width: 42px;
    background: #fff;
}

.quick-panel,
.section,
.detail-shell,
.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-panel {
    margin-top: -38px;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.quick-search {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.quick-search span {
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
}

.site-search,
.sort-select {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    outline: none;
    color: #111827;
}

.site-search {
    width: min(420px, 100%);
    padding: 0 16px;
}

.sort-select {
    padding: 0 16px;
    cursor: pointer;
}

.site-search:focus,
.sort-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.13);
}

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

.quick-links a,
.more-link {
    color: var(--orange);
    font-weight: 800;
}

.section {
    padding: 54px 0 0;
}

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

.section-head h2 {
    margin: 6px 0 0;
    font-size: 32px;
    line-height: 1.2;
}

.compact-head {
    align-items: center;
}

.compact-head h2 {
    font-size: 24px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #1f2937, #7c2d12);
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 10px;
    top: 10px;
}

.poster-score {
    right: 10px;
    bottom: 10px;
}

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

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

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

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

.movie-card p,
.ranking-card p,
.category-card p,
.content-card p,
.player-meta p,
.page-hero p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.compact .movie-card-body {
    padding: 14px;
}

.movie-card.compact p {
    min-height: 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.8fr);
    gap: 26px;
}

.panel-card,
.content-card,
.player-card,
.detail-side,
.page-hero {
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.panel-card {
    padding: 26px;
}

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

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

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 174px;
    padding: 20px;
    border: 1px solid #fed7aa;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    font-size: 20px;
}

.category-card span {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
}

.category-card span a:hover {
    color: var(--red);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 64px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: #f9fafb;
}

.rank-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-item img {
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    background: #1f2937;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info small {
    margin-top: 5px;
    color: var(--muted);
}

.rank-item em {
    color: var(--orange);
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    margin-top: 34px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 10%, rgba(251, 191, 36, 0.26), transparent 34%),
        linear-gradient(90deg, var(--orange), var(--red));
}

.page-hero h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 4vw, 44px);
}

.page-hero p {
    margin: 0;
    max-width: 680px;
    color: #fff7ed;
}

.small-hero {
    align-items: flex-start;
}

.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.page-hero-actions .site-search {
    width: 260px;
}

.ranking-grid {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 88px 1fr 56px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    width: 88px;
    height: 118px;
    border-radius: 16px;
    background: #1f2937;
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-card p {
    margin: 0 0 8px;
}

.ranking-card > strong {
    color: var(--orange);
    font-size: 22px;
    text-align: right;
}

.detail-shell {
    padding: 30px 0 0;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 26px;
}

.player-card {
    overflow: hidden;
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at center, rgba(234, 88, 12, 0.28), transparent 34%),
        #020617;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

.player-start span {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.36);
    font-size: 28px;
}

.player-start strong {
    font-size: 18px;
}

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

.player-meta {
    padding: 24px;
}

.player-meta h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
}

.detail-side {
    overflow: hidden;
    align-self: start;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #1f2937;
}

.detail-facts {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.detail-facts span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.detail-facts span:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-facts strong {
    color: #111827;
}

.content-card {
    margin-top: 24px;
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 14px;
}

.content-card p {
    margin: 0;
    font-size: 16px;
}

.related-section {
    width: 100%;
    margin: 0;
}

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

.site-footer {
    margin-top: 60px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

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

.footer-brand {
    margin-bottom: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.footer-grid h3 {
    margin-top: 0;
    color: #fff;
}

.footer-links a {
    color: #d1d5db;
}

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

.is-filtered-out {
    display: none !important;
}

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

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px;
        border-radius: 22px;
        background: linear-gradient(135deg, var(--orange), var(--red));
        box-shadow: var(--shadow);
    }

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

    .main-nav > a,
    .nav-dropdown > button {
        padding: 12px;
        text-align: left;
    }

    .nav-dropdown:hover .dropdown-panel,
    .dropdown-panel {
        position: static;
        width: 100%;
        margin-top: 6px;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
    }

    .hero {
        height: 560px;
    }

    .quick-panel,
    .page-hero,
    .split-section,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .quick-panel,
    .page-hero {
        flex-direction: column;
        align-items: stretch;
    }

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

    .quick-links,
    .page-hero-actions {
        justify-content: flex-start;
    }

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

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

@media (max-width: 720px) {
    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

    .hero-content {
        top: 48%;
    }

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

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

    .section {
        padding-top: 38px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ranking-card {
        grid-template-columns: 74px 1fr;
    }

    .ranking-card > strong {
        grid-column: 2;
        text-align: left;
    }

    .ranking-cover {
        width: 74px;
        height: 102px;
    }
}

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

    .rank-item {
        grid-template-columns: 34px 58px 1fr;
    }

    .rank-item em {
        display: none;
    }
}
