:root {
    --bg: #fff7ed;
    --paper: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(249, 115, 22, 0.18);
    --accent: #f97316;
    --accent-dark: #ea580c;
    --pink: #ec4899;
    --red: #ef4444;
    --dark: #111827;
    --shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.20), transparent 34rem), var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.22);
}

.header-inner {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #f97316;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: rotate(12deg) scale(1.05);
}

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

.desktop-nav a,
.mobile-panel a {
    font-weight: 700;
    opacity: 0.94;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffedd5;
    opacity: 1;
}

.top-search,
.mobile-search,
.wide-search,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.wide-search input,
.inline-filter input {
    border: 1px solid rgba(255, 255, 255, 0.34);
    outline: none;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.wide-search input::placeholder,
.inline-filter input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.top-search button,
.mobile-search button,
.wide-search button,
.inline-filter button,
.primary-button,
.small-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 14px 26px rgba(239, 68, 68, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button,
.mobile-search button {
    color: #ea580c;
    background: #fff;
    box-shadow: none;
}

.primary-button:hover,
.small-button:hover,
.wide-search button:hover,
.inline-filter button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.32);
}

.ghost-button,
.section-more {
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.section-more {
    color: var(--accent-dark);
    border-color: rgba(249, 115, 22, 0.24);
    background: #fff7ed;
}

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

.mobile-panel {
    display: none;
    padding: 18px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    height: min(72vh, 660px);
    min-height: 520px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

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

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    height: 100%;
    filter: saturate(1.08) contrast(1.03);
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58), rgba(17, 24, 39, 0.12)), linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent 54%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 70px;
    max-width: 720px;
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    background: rgba(17, 24, 39, 0.32);
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: #fed7aa;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-info p,
.side-panel p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.movie-tags,
.detail-meta,
.tag-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.movie-tags span,
.detail-meta span,
.tag-links a {
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 800;
    color: #c2410c;
    background: #ffedd5;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

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

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    background: rgba(17, 24, 39, 0.36);
    cursor: pointer;
    transform: translateY(-50%);
}

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

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

.hero-search-band,
.content-section,
.breadcrumb,
.detail-hero,
.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
}

.hero-search-band {
    margin-top: -34px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
    box-shadow: var(--shadow);
}

.hero-search-band h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
}

.hero-search-band p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.86);
}

.wide-search input,
.inline-filter input {
    flex: 1;
    min-width: 0;
}

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

.section-heading h2,
.side-panel h2,
.detail-text h2,
.player-section h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

.category-tile,
.category-card,
.movie-card,
.rank-row,
.side-panel,
.detail-text,
.player-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.category-tile {
    min-height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    color: #fff;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile img {
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: 0;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.12));
    z-index: 1;
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.5;
}

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

.movie-card {
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f3f4f6;
}

.poster-link img {
    height: 100%;
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent);
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ec4899);
}

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

.movie-tags {
    margin-bottom: 10px;
}

.movie-card h3 {
    margin: 0;
    min-height: 52px;
    color: #111827;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 900;
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 82px 52px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-poster {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #f3f4f6;
}

.rank-poster img {
    height: 100%;
}

.rank-no {
    color: #f97316;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-info h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
}

.rank-info p {
    margin: 6px 0 10px;
    color: var(--muted);
    line-height: 1.55;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(160deg, #111827, #7c2d12);
}

.side-panel h2 {
    color: #fff;
}

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

.quick-links a,
.footer-links a {
    border-radius: 999px;
    padding: 9px 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 36px;
    color: #fff;
    background: radial-gradient(circle at 18% 0, rgba(255, 237, 213, 0.28), transparent 28rem), linear-gradient(135deg, #f97316, #ef4444, #ec4899);
    border-radius: 0 0 34px 34px;
}

.page-hero.compact {
    min-height: 260px;
}

.category-hero .inline-filter,
.page-hero .inline-filter {
    max-width: 640px;
    margin-top: 26px;
}

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

.category-card {
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 10px;
    background: #fff7ed;
}

.category-covers img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.category-card div:last-child {
    padding: 22px;
}

.category-card h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.breadcrumb {
    padding-top: 28px;
    padding-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #9a3412;
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 32px;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
    background: #f3f4f6;
}

.detail-poster img {
    height: 100%;
}

.detail-info {
    padding: 34px;
    border-radius: 34px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7c2d12 58%, #be123c);
    box-shadow: var(--shadow);
}

.detail-meta {
    margin-top: 20px;
}

.detail-meta span,
.tag-links a {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.one-line {
    font-size: 19px;
}

.tag-links {
    margin: 24px 0 28px;
}

.player-section {
    padding-top: 28px;
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.54));
    cursor: pointer;
}

.player-cover span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 6px;
    font-size: 42px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.video-shell.is-playing .player-cover {
    display: none;
}

.detail-text {
    padding: 30px;
}

.detail-text h2 + p {
    margin: 14px 0 26px;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 56px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 34px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #fff;
}

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

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #9ca3af;
    text-align: center;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 46px;
    height: 46px;
    display: none;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-top.show {
    display: block;
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1180px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        right: 24px;
        bottom: 56px;
        padding: 26px;
    }

    .hero-search-band,
    .split-layout,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }

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

    .rank-row {
        grid-template-columns: 72px 42px minmax(0, 1fr);
    }

    .rank-row .small-button {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .header-inner {
        min-height: 64px;
        padding: 0 16px;
    }

    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        left: 16px;
        right: 16px;
        bottom: 62px;
        padding: 22px;
        border-radius: 26px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-search-band,
    .content-section,
    .breadcrumb,
    .detail-hero,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-search-band {
        margin-top: 0;
        border-radius: 0;
    }

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

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

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        display: none;
    }

    .rank-row {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .rank-no {
        position: absolute;
        margin-left: 8px;
        margin-top: 8px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        color: #fff;
        font-size: 16px;
        background: #f97316;
    }

    .rank-row .small-button {
        grid-column: 2;
    }

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

    .detail-info {
        padding: 24px;
    }

    .inline-filter,
    .wide-search,
    .mobile-search {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-filter input,
    .wide-search input,
    .mobile-search input {
        width: 100%;
    }
}
