* {
    box-sizing: border-box;
}

:root {
    --color-orange: #f97316;
    --color-orange-dark: #ea580c;
    --color-red: #ef4444;
    --color-dark: #111827;
    --color-gray: #4b5563;
    --color-soft: #f9fafb;
    --color-line: #e5e7eb;
    --shadow-card: 0 12px 35px rgba(17, 24, 39, 0.10);
    --shadow-hover: 0 22px 55px rgba(17, 24, 39, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #111827;
    background: var(--color-soft);
    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: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(16px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
    background: #ffffff;
    box-shadow: 0 10px 35px rgba(17, 24, 39, 0.10);
}

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

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

.brand-mark,
.footer-brand span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

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

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 190px;
    padding: 8px;
    border: 1px solid var(--color-line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
}

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

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

.header-search input {
    width: 230px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.primary-button,
.secondary-button,
.outline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.34);
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

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

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

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px 18px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #374151;
    background: #f3f4f6;
    font-weight: 650;
}

.hero-slider {
    position: relative;
    height: min(780px, 88vh);
    min-height: 620px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.1);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 35%, rgba(249, 115, 22, 0.28), transparent 28%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.70), rgba(17, 24, 39, 0.32)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 56px;
    padding-top: 68px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
    max-width: 760px;
    margin: 0 0 20px;
    color: #ffffff;
    font-size: clamp(44px, 6vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2vw, 24px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    padding: 6px 10px;
    color: #9a3412;
    background: #ffedd5;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
    transition: transform 0.28s ease;
}

.hero-poster:hover {
    transform: rotate(0) scale(1.03);
}

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

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.30);
}

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

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

.hero-controls > button {
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 30px;
}

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

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

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

.section {
    padding: 72px 0;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    color: #111827;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.dark-section .section-heading h2,
.dark-section .section-heading p {
    color: #ffffff;
}

.section-heading p {
    margin: 0;
    color: #6b7280;
}

.section-more {
    color: var(--color-orange);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 22px;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(249, 115, 22, 0.32);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

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

.poster-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.42s ease;
}

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

.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 8px;
    color: #ffffff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.duration-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: var(--color-orange);
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 30px;
    background: rgba(0, 0, 0, 0.22);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .play-overlay {
    opacity: 1;
}

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

.card-meta,
.card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    color: var(--color-orange-dark);
    background: #ffedd5;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.category-chip.big {
    white-space: nowrap;
    min-height: 36px;
    padding: 0 14px;
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-foot {
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.dark-section {
    padding: 72px 0;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

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

.ranking-grid .movie-card.compact {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
}

.ranking-grid .movie-card.compact .poster-link img {
    height: 100%;
    min-height: 185px;
    aspect-ratio: auto;
}

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

.category-tile,
.category-overview-card,
.detail-card,
.side-card,
.side-poster,
.filter-panel {
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.category-tile {
    padding: 20px;
}

.category-tile-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
}

.category-tile-main span {
    font-size: 18px;
    font-weight: 850;
}

.category-tile-main strong {
    font-size: 28px;
}

.category-tile p {
    min-height: 52px;
    margin: 14px 0;
    color: #4b5563;
    font-size: 14px;
}

.tile-links {
    display: grid;
    gap: 8px;
}

.tile-links a {
    color: #374151;
    font-size: 14px;
}

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

.page-shell {
    padding-top: 68px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 25%, rgba(249, 115, 22, 0.38), transparent 28%),
        linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

.compact-hero {
    padding: 72px 0 58px;
}

.page-hero h1 {
    margin-bottom: 14px;
}

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

.small-actions {
    margin-top: 22px;
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.category-overview-head h2 {
    margin: 0;
    font-size: 26px;
}

.category-overview-head a:hover {
    color: var(--color-orange);
}

.category-overview-head span {
    color: var(--color-orange-dark);
    background: #ffedd5;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 800;
}

.category-overview-card p {
    color: #4b5563;
}

.category-overview-card ul {
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li + li {
    border-top: 1px solid #f3f4f6;
}

.category-overview-card li a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    color: #374151;
}

.category-overview-card li a:hover {
    color: var(--color-orange);
}

.category-overview-card li span {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 13px;
}

.outline-link {
    color: var(--color-orange-dark);
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.outline-link:hover {
    background: #ffedd5;
    transform: translateY(-2px);
}

.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
}

.large-filter {
    position: sticky;
    z-index: 10;
    top: 82px;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #ffffff;
    outline: none;
}

.filter-panel input {
    flex: 1;
    padding: 0 16px;
}

.filter-panel select {
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-panel span {
    color: #6b7280;
    font-weight: 750;
    white-space: nowrap;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0 12px;
    color: #6b7280;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding-bottom: 72px;
}

.detail-main,
.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    box-shadow: var(--shadow-card);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: background 0.2s ease;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    background: var(--color-orange);
    border-radius: 999px;
    font-size: 38px;
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.36);
}

.player-start:hover {
    background: rgba(0, 0, 0, 0.42);
}

.player-start.hidden {
    display: none;
}

.detail-card {
    padding: 24px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.detail-title-row h1 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-title-row p {
    margin: 0;
    color: #4b5563;
    font-size: 17px;
}

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

.detail-meta-grid span {
    min-height: 72px;
    padding: 12px;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
}

.detail-meta-grid strong {
    display: block;
    margin-bottom: 4px;
    color: #9ca3af;
    font-size: 13px;
}

.prose-block h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

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

.pager-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pager-links div:last-child {
    text-align: right;
}

.pager-links a {
    color: var(--color-orange-dark);
    font-weight: 750;
}

.side-poster {
    overflow: hidden;
}

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

.side-poster .primary-button {
    width: calc(100% - 32px);
    margin: 16px;
}

.side-card {
    padding: 18px;
}

.side-related {
    display: grid;
    gap: 14px;
}

.side-related .movie-card.compact {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    border-radius: 18px;
}

.side-related .movie-card.compact .poster-link img {
    height: 100%;
    min-height: 146px;
    aspect-ratio: auto;
}

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

.side-related .movie-card h3 {
    margin-top: 8px;
    font-size: 15px;
}

.side-related .tag-row,
.side-related .card-foot,
.side-related .movie-card p {
    display: none;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
    gap: 34px;
    padding: 56px 0 36px;
}

.footer-brand {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

.footer-bottom {
    padding: 18px;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-poster {
        display: none;
    }

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

    .detail-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .side-poster {
        display: none;
    }
}

@media (max-width: 800px) {
    .brand-name {
        font-size: 20px;
    }

    .hero-slider {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        gap: 24px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: clamp(36px, 11vw, 58px);
    }

    .section-heading,
    .detail-title-row,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .ranking-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-grid .movie-card.compact,
    .side-related .movie-card.compact {
        grid-template-columns: 130px minmax(0, 1fr);
    }

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

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

    .hero-slider {
        min-height: 600px;
    }

    .hero-actions,
    .small-actions {
        display: grid;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .movie-grid {
        gap: 16px;
    }

    .poster-link img {
        aspect-ratio: 16 / 11;
    }

    .detail-meta-grid,
    .pager-links {
        grid-template-columns: 1fr;
    }

    .pager-links div:last-child {
        text-align: left;
    }
}
