:root {
    --primary-50: #fef7ee;
    --primary-100: #fdecd3;
    --primary-500: #f07315;
    --primary-600: #dc5f0b;
    --primary-700: #b7470c;
    --accent-50: #fdf8f3;
    --accent-500: #d9804f;
    --secondary-500: #0fcaaa;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(41, 37, 36, 0.08);
    --shadow-md: 0 10px 30px rgba(41, 37, 36, 0.10);
    --shadow-xl: 0 25px 60px rgba(41, 37, 36, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--neutral-800);
    background: var(--neutral-50);
    line-height: 1.6;
}

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

img {
    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: 80;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 18px;
}

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 12px 24px rgba(240, 115, 21, 0.28);
}

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

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

.site-nav-link,
.mobile-nav-link {
    color: var(--neutral-600);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.site-nav-link:hover,
.mobile-nav-link:hover,
.site-nav-link.is-active,
.mobile-nav-link.is-active {
    color: var(--primary-600);
}

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

.header-search input,
.mobile-search input,
.page-search input {
    width: 220px;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--white);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(240, 115, 21, 0.12);
}

.header-search button,
.mobile-search button,
.page-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--white);
    background: var(--primary-600);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.page-search button:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--neutral-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--neutral-700);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--neutral-100);
    background: var(--white);
}

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

.mobile-nav {
    display: grid;
    gap: 14px;
    padding: 16px 0;
}

.hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500) 52%, var(--secondary-500));
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 56px 56px;
}

.hero-shell {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: center;
    gap: 48px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-copy {
    max-width: 720px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 99px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 8vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.detail-meta,
.list-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--neutral-500);
    font-size: 13px;
}

.hero-tags {
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags span,
.detail-meta span,
.list-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
}

.hero-tags span::before,
.detail-meta span::before,
.list-meta span::before,
.movie-meta span::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--white);
    background: var(--primary-600);
    box-shadow: 0 16px 36px rgba(240, 115, 21, 0.25);
}

.hero-section .btn-primary {
    color: var(--primary-600);
    background: var(--white);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    max-width: 370px;
    justify-self: end;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: var(--shadow-xl);
}

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

.poster-glow {
    position: absolute;
    inset: auto 10% -26px;
    height: 80px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(28px);
}

.hero-mini-tags {
    position: absolute;
    right: 0;
    bottom: 90px;
    display: flex;
    flex-wrap: wrap;
    max-width: 360px;
    gap: 10px;
}

.hero-mini-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    font-size: 12px;
}

.hero-controls {
    position: absolute;
    left: 0;
    bottom: 42px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    background: var(--white);
}

.section {
    padding-top: 72px;
    padding-bottom: 72px;
}

.section-white {
    background: var(--white);
}

.gradient-section {
    background: linear-gradient(135deg, var(--accent-50), var(--primary-50));
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 10px 0 0;
    color: var(--neutral-800);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--primary-600);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

.movie-card-large .movie-cover {
    aspect-ratio: 21 / 9;
}

.movie-cover img,
.list-cover img,
.rank-cover img,
.category-tile img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img,
.movie-list-item:hover .list-cover img,
.rank-item:hover .rank-cover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
    transition: opacity 0.25s ease;
}

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

.movie-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: var(--white);
    background: rgba(0, 0, 0, 0.62);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
}

.movie-play {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--white);
    background: rgba(240, 115, 21, 0.9);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3,
.list-content h3,
.rank-item h2 {
    margin: 0 0 10px;
    color: var(--neutral-800);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover,
.list-content h3 a:hover,
.rank-item h2 a:hover {
    color: var(--primary-600);
}

.movie-card-body p,
.list-content p,
.rank-item p,
.detail-one-line,
.detail-text p,
.player-card p,
.page-hero p {
    color: var(--neutral-600);
}

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

.tag-row span,
.detail-tags a,
.genre-links a {
    color: var(--primary-700);
    background: var(--primary-100);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 22px;
    color: var(--white);
    background: var(--neutral-800);
    box-shadow: var(--shadow-sm);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.7;
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span {
    margin-top: 120px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.88;
}

.movie-list {
    display: grid;
    gap: 18px;
}

.movie-list-item,
.rank-item {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease;
}

.movie-list-item:hover,
.rank-item:hover {
    box-shadow: var(--shadow-md);
}

.list-cover,
.rank-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: var(--primary-100);
}

.page-hero,
.detail-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--neutral-900), var(--primary-700));
}

.page-hero .container {
    padding-top: 74px;
    padding-bottom: 74px;
}

.compact-hero .container {
    padding-top: 56px;
    padding-bottom: 56px;
}

.page-hero h1,
.page-hero p {
    color: var(--white);
}

.page-search {
    max-width: 640px;
    margin-top: 26px;
}

.page-search input {
    flex: 1;
    width: auto;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 42px;
}

.pagination a,
.pagination strong,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--neutral-200);
    padding: 0 13px;
    background: var(--white);
    color: var(--neutral-700);
    font-weight: 700;
}

.pagination strong {
    border-color: var(--primary-600);
    color: var(--white);
    background: var(--primary-600);
}

.detail-hero {
    padding: 54px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: var(--primary-100);
    box-shadow: var(--shadow-xl);
}

.detail-copy h1 {
    color: var(--white);
}

.detail-one-line {
    max-width: 760px;
    font-size: 19px;
}

.detail-copy .detail-meta,
.detail-copy .detail-one-line {
    color: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.player-card {
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(240, 115, 21, 0.92);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
    font-size: 32px;
}

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

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
    transition: opacity 0.2s ease;
}

.video-frame:hover .player-controls,
.video-frame.is-active .player-controls {
    opacity: 1;
}

.player-controls button {
    border: 0;
    border-radius: 10px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    padding: 8px 12px;
    cursor: pointer;
}

.player-spacer {
    flex: 1;
}

.player-card h2 {
    margin: 22px 0 8px;
    font-size: 28px;
}

.detail-text {
    max-width: 1000px;
}

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

.detail-text p + h2 {
    margin-top: 32px;
}

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

.rank-item {
    grid-template-columns: 64px 180px 1fr;
    align-items: center;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-radius: 14px;
    font-size: 20px;
    font-weight: 900;
}

.search-summary {
    margin-bottom: 24px;
    color: var(--neutral-700);
    font-size: 18px;
    font-weight: 800;
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-800);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding-top: 52px;
    padding-bottom: 46px;
}

.footer-brand {
    color: var(--white);
    font-size: 20px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
}

.site-footer p,
.site-footer ul {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--neutral-400);
    font-size: 14px;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a:hover {
    color: var(--primary-100);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 16px;
    text-align: center;
    color: var(--neutral-400);
    font-size: 14px;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

    .hero-mini-tags {
        right: auto;
        left: 0;
    }

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

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

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

    .hero-section,
    .hero-shell {
        min-height: 560px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-controls {
        bottom: 26px;
    }

    .section {
        padding-top: 48px;
        padding-bottom: 48px;
    }

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

    .movie-grid,
    .featured-grid,
    .movie-grid-three,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-list-item,
    .rank-item,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-item {
        align-items: start;
    }

    .list-cover,
    .rank-cover {
        width: 100%;
    }

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

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

    .page-search,
    .mobile-search {
        align-items: stretch;
        flex-direction: column;
    }

    .page-search input,
    .mobile-search input {
        width: 100%;
    }
}
