:root {
    --bg: #0f172a;
    --bg-soft: #111c32;
    --card: rgba(30, 41, 59, 0.64);
    --card-strong: rgba(30, 41, 59, 0.92);
    --text: #ffffff;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --orange: #f97316;
    --orange-dark: #ea580c;
    --blue: #3b82f6;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 20% -10%, rgba(249, 115, 22, 0.22), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.18), transparent 28%),
        var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    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: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange), #fb923c);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
    font-size: 14px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(249, 115, 22, 0.15);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.82) 38%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.44) 56%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 88px;
    max-width: 760px;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.18);
    color: #fed7aa;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 19px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(30, 41, 59, 0.72);
    color: var(--muted);
    font-size: 13px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.hero-tags span,
.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.quick-search button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.quick-search button {
    color: #fff;
    background: var(--orange);
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.28);
}

.primary-btn:hover,
.quick-search button:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}

.ghost-btn,
.section-more {
    color: #fff;
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.54);
}

.ghost-btn:hover,
.section-more:hover {
    border-color: rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.14);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 38px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-next {
    right: 24px;
    transform: translateY(-50%);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 36px;
    background: var(--orange);
}

.search-band {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -42px;
    padding: 28px;
    position: relative;
    z-index: 8;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.page-title-block h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.search-band p,
.section-head p,
.page-title-block p,
.detail-one-line,
.detail-content p,
.site-footer p {
    color: var(--muted);
}

.quick-search,
.filter-panel {
    display: flex;
    gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: #fff;
    background: rgba(30, 41, 59, 0.74);
    padding: 0 16px;
}

.filter-panel select {
    max-width: 180px;
}

.page-section,
.page-main {
    padding: 72px 0;
}

.page-main {
    min-height: 70vh;
}

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

.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p {
    margin: 10px 0 0;
    max-width: 720px;
}

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

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

.category-tile {
    min-height: 160px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.72));
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.44);
}

.category-main {
    display: block;
    padding: 20px;
}

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

.category-main span,
.category-mini a {
    color: var(--muted);
    font-size: 14px;
}

.category-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 20px;
}

.category-mini a {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.5);
}

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.7);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 58%);
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    opacity: 0;
    color: #fff;
    background: var(--orange);
    transform: translate(-50%, -45%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background: var(--orange);
    font-weight: 900;
}

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

.movie-card-body h3 {
    min-height: 46px;
    margin: 0;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover,
.rank-info h2 a:hover,
.breadcrumb a:hover {
    color: #fb923c;
}

.movie-card-body p {
    min-height: 44px;
    margin: 8px 0 0;
    color: var(--subtle);
    font-size: 13px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-small .movie-card-body p {
    display: none;
}

.movie-meta {
    margin-top: 10px;
    gap: 6px;
}

.movie-meta span {
    min-height: 24px;
    font-size: 12px;
}

.hot-rank-panel {
    padding-top: 24px;
}

.rank-list-home {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.page-title-block {
    margin-bottom: 32px;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.78));
    box-shadow: var(--shadow);
}

.page-title-block h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-title-block p {
    max-width: 840px;
    margin: 14px 0 0;
    font-size: 18px;
}

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

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}

.rank-num {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: rgba(249, 115, 22, 0.2);
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
}

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

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
    white-space: nowrap;
    font-weight: 800;
}

.detail-main {
    padding-top: 36px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.75);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
    margin: 18px 0 0;
    font-size: 19px;
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section {
    margin-top: 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.28), rgba(2, 6, 23, 0.68));
    font-size: 18px;
    font-weight: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 20px 42px rgba(249, 115, 22, 0.36);
}

.detail-content {
    margin-top: 34px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-content h2:not(:first-child) {
    margin-top: 28px;
}

.detail-content p {
    margin: 0;
    font-size: 17px;
}

.related-section {
    padding-bottom: 0;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 34px 0;
}

.footer-links {
    margin-top: 0;
}

.footer-links a {
    color: var(--muted);
}

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

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

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

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

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

@media (max-width: 820px) {
    .site-header-inner {
        min-height: 64px;
    }

    .mobile-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
    }

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

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

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

    .hero-arrow {
        display: none;
    }

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

    .quick-search,
    .filter-panel {
        flex-direction: column;
    }

    .filter-panel select {
        max-width: none;
    }

    .movie-grid,
    .all-grid,
    .rank-list-home,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-row {
        grid-template-columns: 44px 76px 1fr;
    }

    .rank-score {
        grid-column: 3;
        width: fit-content;
    }

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

@media (max-width: 520px) {
    .container,
    .site-header-inner {
        width: min(100% - 22px, 1180px);
    }

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

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

    .search-band,
    .page-title-block,
    .detail-hero,
    .detail-content {
        padding: 22px;
    }

    .category-grid,
    .category-grid-large {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .all-grid,
    .rank-list-home,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

    .movie-card-body p,
    .tag-row {
        display: none;
    }

    .movie-card-body h3 {
        min-height: 42px;
        font-size: 14px;
    }

    .rank-row {
        grid-template-columns: 38px 64px 1fr;
        gap: 10px;
    }

    .rank-info h2 {
        font-size: 17px;
    }

    .rank-info p {
        display: none;
    }
}
