:root {
    color-scheme: light;
    --page: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --red: #dc2626;
    --shadow: 0 20px 45px rgba(17, 24, 39, 0.10);
    --radius: 24px;
}

* {
    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 {
    display: block;
    width: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, var(--orange-dark), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    position: relative;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--orange-dark);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
    width: 220px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button,
.player-button,
.small-button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.player-button,
.small-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.header-search button,
.mobile-search button {
    padding: 10px 16px;
}

.primary-button,
.ghost-button,
.player-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.primary-button:hover,
.ghost-button:hover,
.player-button:hover,
.small-button:hover,
.header-search button:hover,
.mobile-search button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--orange-dark);
    font-size: 24px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    padding: 12px 4px;
    font-weight: 800;
    color: #374151;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    filter: blur(3px);
}

.hero-overlay {
    background:
        radial-gradient(circle at 74% 44%, rgba(249, 115, 22, 0.42), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.38)),
        linear-gradient(135deg, rgba(249, 115, 22, 0.30), rgba(220, 38, 38, 0.12));
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) 360px;
    align-items: center;
    gap: 54px;
    min-height: 640px;
    padding: 70px 0 92px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: #f3f4f6;
    font-size: 20px;
    line-height: 1.8;
}

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

.hero-tags span,
.movie-meta span,
.detail-meta span,
.info-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.10);
    color: #c2410c;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span,
.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-5px);
}

.hero-poster img {
    height: 520px;
}

.hero-poster span {
    position: absolute;
    right: 22px;
    bottom: 22px;
    padding: 12px 18px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-controls button {
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 26px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
    width: 36px;
    background: #ffffff;
}

.main-section,
.detail-section {
    padding: 56px 0;
}

.section-head,
.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-head h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

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

.section-head a {
    color: var(--orange-dark);
    font-weight: 900;
}

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

.movie-card,
.category-tile,
.info-panel,
.sidebar-card,
.result-panel {
    background: var(--surface);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

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

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    aspect-ratio: 3 / 4;
    transition: transform 0.35s ease;
}

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

.play-float,
.card-rank {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.play-float {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.92);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-rank {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.74);
    font-size: 12px;
}

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

.movie-card-body h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

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

.movie-card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    padding: 24px;
    min-height: 180px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.20), rgba(220, 38, 38, 0.14));
}

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

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-tile span {
    display: inline-flex;
    margin-top: 16px;
    color: var(--orange-dark);
    font-weight: 900;
}

.rank-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 44px 74px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.compact-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.compact-card img {
    width: 74px;
    height: 98px;
    border-radius: 14px;
}

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

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

.compact-info em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-banner {
    padding: 54px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.20), transparent 28%),
        linear-gradient(135deg, #f97316, #dc2626);
}

.page-banner h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 56px);
}

.page-banner p {
    max-width: 820px;
    margin: 0;
    color: #fff7ed;
    line-height: 1.8;
}

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

.filter-bar input {
    min-width: min(100%, 360px);
    flex: 1;
    padding: 12px 16px;
}

.filter-bar select {
    padding: 12px 16px;
}

.filter-bar span {
    color: var(--muted);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(4px);
    transform: scale(1.05);
    opacity: 0.42;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.60));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    padding: 56px 0;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.40);
}

.detail-cover img {
    aspect-ratio: 3 / 4;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fed7aa;
    font-weight: 800;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
}

.detail-copy p {
    max-width: 820px;
    color: #f3f4f6;
    font-size: 19px;
    line-height: 1.8;
}

.player-panel {
    overflow: hidden;
    border-radius: 28px;
    background: #050505;
    box-shadow: var(--shadow);
}

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

.player-stage video {
    width: 100%;
    height: 100%;
    background: #050505;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.50);
}

.player-button {
    position: relative;
    z-index: 1;
    min-width: 150px;
}

.player-status {
    padding: 14px 18px;
    color: #d1d5db;
    background: #111827;
}

.info-panel,
.sidebar-card,
.result-panel {
    padding: 24px;
}

.info-panel + .info-panel,
.sidebar-card + .sidebar-card {
    margin-top: 20px;
}

.info-panel h2,
.sidebar-card h2,
.result-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.info-panel p {
    color: #374151;
    line-height: 1.9;
}

.info-tags span {
    background: #ffedd5;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p,
.site-footer li {
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-to-top.is-visible {
    display: block;
}

.no-results {
    display: none;
    padding: 26px;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

.search-results {
    display: grid;
    gap: 18px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
}

.search-result-item img {
    height: 148px;
    border-radius: 16px;
}

.search-result-item h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.search-result-item p {
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

    .hero-content,
    .rank-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 360px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .brand-text {
        font-size: 20px;
    }

    .hero-carousel,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 46px 0 90px;
    }

    .hero-poster img {
        height: 420px;
    }

    .movie-grid,
    .category-grid,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .movie-grid,
    .category-grid,
    .footer-grid,
    .detail-hero-inner,
    .search-result-item {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 260px;
    }

    .compact-card {
        grid-template-columns: 38px 64px minmax(0, 1fr);
    }

    .compact-card img {
        width: 64px;
        height: 86px;
    }

    .hero-copy p,
    .detail-copy p {
        font-size: 17px;
    }
}
