:root {
    --color-amber: #d97706;
    --color-amber-dark: #b45309;
    --color-orange: #ea580c;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-line: #e5e7eb;
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.10);
    --shadow-hover: 0 22px 50px rgba(217, 119, 6, 0.20);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(194, 65, 12, 0.22);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    font-size: 14px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    gap: 8px;
    flex-direction: column;
}

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

.mobile-nav a {
    padding: 11px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 32%, rgba(245, 158, 11, 0.34), transparent 26%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.10)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 140px;
    color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.96);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    max-width: 820px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

.hero-content h1 + h2 {
    margin-top: 0;
    font-size: clamp(24px, 3.4vw, 42px);
    color: #fef3c7;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
}

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

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

.primary-button {
    background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.30);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.ghost-button.dark {
    color: var(--color-text);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--color-line);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(217, 119, 6, 0.90);
    transform: translateY(-2px);
}

.hero-prev {
    left: max(20px, calc((100vw - 1180px) / 2));
}

.hero-next {
    right: max(20px, calc((100vw - 1180px) / 2));
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 96px;
    z-index: 6;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.hero-dot.active {
    width: 34px;
    background: var(--color-amber);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 7;
    width: min(720px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    transform: translateX(-50%);
}

.hero-search input,
.search-label input {
    width: 100%;
    border: 1px solid var(--color-line);
    outline: none;
    border-radius: 12px;
    background: #ffffff;
    color: var(--color-text);
}

.hero-search input {
    min-height: 46px;
    padding: 0 16px;
    border: 0;
}

.hero-search button {
    min-width: 96px;
    border: 0;
    border-radius: 12px;
    background: var(--color-amber);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

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

.warm-section,
.rank-section {
    width: 100%;
    max-width: none;
    padding: 70px max(16px, calc((100vw - 1180px) / 2)) 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0));
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 900;
}

.section-heading p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

.section-link {
    flex: 0 0 auto;
    color: var(--color-amber-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card.is-hidden {
    display: none;
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5e7eb;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
    filter: saturate(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(0, 0, 0, 0.42);
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-badge,
.card-time,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    top: 12px;
    left: 12px;
    background: var(--color-amber);
}

.card-time {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--color-amber);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 2.8em;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--color-muted);
    font-size: 13px;
}

.card-body p {
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile,
.category-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers,
.category-card-covers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    height: 150px;
    background: #111827;
}

.category-card-covers {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: 180px;
}

.category-covers img,
.category-card-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info,
.category-card-body {
    padding: 18px;
}

.category-info h3,
.category-card-body h2 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 900;
}

.category-info p,
.category-card-body p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

.category-card-body span {
    display: inline-flex;
    margin-top: 16px;
    color: var(--color-amber-dark);
    font-weight: 800;
}

.seo-text {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    color: var(--color-muted);
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 18%, rgba(251, 191, 36, 0.35), transparent 28%),
        linear-gradient(135deg, #111827, #7c2d12 56%, #d97706);
    color: #ffffff;
}

.small-hero {
    padding: 86px max(16px, calc((100vw - 1180px) / 2)) 76px;
}

.page-hero h1 {
    max-width: 880px;
    margin: 16px 0 12px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.1;
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.search-label {
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.search-label input {
    min-height: 46px;
    padding: 0 14px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--color-amber);
    color: #ffffff;
    transform: translateY(-1px);
}

.empty-state {
    margin: 26px 0 0;
    padding: 24px;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--color-muted);
    text-align: center;
}

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

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

.breadcrumb a {
    color: var(--color-amber-dark);
    font-weight: 800;
}

.detail-main {
    display: grid;
    gap: 28px;
}

.player-section {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #030712;
    box-shadow: var(--shadow-soft);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
    color: #ffffff;
    cursor: pointer;
}

.video-shell.is-playing .player-overlay,
.player-overlay[hidden] {
    display: none;
}

.player-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 20px 50px rgba(217, 119, 6, 0.38);
    font-size: 28px;
}

.player-text {
    font-size: 18px;
    font-weight: 900;
}

.detail-info {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #e5e7eb;
}

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

.detail-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    font-weight: 900;
}

.detail-one-line {
    margin: 0 0 16px;
    color: #374151;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 24px;
}

.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 700;
    font-size: 13px;
}

.story-section {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.story-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 900;
}

.story-section p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.related-section {
    width: 100%;
    padding-top: 10px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1100px) {
    .movie-grid,
    .listing-grid,
    .compact-grid,
    .category-grid,
    .category-list-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 150px;
    }

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

    .hero-control {
        display: none;
    }

    .hero-search {
        flex-direction: column;
    }

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

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

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

    .detail-info {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

    .hero-carousel {
        height: 540px;
    }

    .hero-content {
        width: min(100% - 24px, 1180px);
        padding-bottom: 160px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 33px;
    }

    .hero-content h1 + h2 {
        font-size: 23px;
    }

    .content-section,
    .detail-layout,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .movie-grid,
    .listing-grid,
    .compact-grid,
    .category-grid,
    .category-list-grid {
        grid-template-columns: 1fr;
    }

    .small-hero {
        padding: 64px 12px 56px;
    }

    .filter-panel,
    .detail-info,
    .story-section {
        padding: 18px;
    }

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