:root {
    --primary-50: #fdf8f3;
    --primary-100: #f8eadb;
    --primary-500: #d4884b;
    --primary-600: #c6703f;
    --primary-700: #a95d34;
    --accent-500: #ed7516;
    --secondary-50: #faf9f7;
    --secondary-100: #f1ede7;
    --secondary-200: #e8e4dc;
    --secondary-500: #74685d;
    --secondary-600: #5f554c;
    --secondary-700: #463f39;
    --secondary-900: #1c1917;
    --white: #ffffff;
    --black: #000000;
    --shadow-soft: 0 10px 25px rgba(28, 25, 23, 0.08);
    --shadow-soft-lg: 0 22px 45px rgba(28, 25, 23, 0.16);
    --radius-lg: 18px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    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(--secondary-900);
    background: var(--secondary-50);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(232, 228, 220, 0.9);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--secondary-900);
}

.site-logo-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--white);
    background: var(--primary-500);
    border-radius: 12px;
    box-shadow: 0 10px 18px rgba(212, 136, 75, 0.25);
}

.site-logo-text {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link,
.mobile-nav-link {
    font-weight: 650;
    color: var(--secondary-700);
    transition: color 0.25s ease, background 0.25s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: var(--secondary-700);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--secondary-200);
    padding: 10px 16px 18px;
    background: var(--white);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
    animation: slideDown 0.28s ease-out;
}

.mobile-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: var(--primary-50);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--secondary-900);
}

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

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-slide.is-active .hero-image {
    animation: slowZoom 6s ease-out forwards;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 50%, rgba(0, 0, 0, 0.08)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.04) 70%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    z-index: 5;
    color: var(--white);
}

.hero-copy {
    max-width: 720px;
    animation: slideUp 0.55s ease-out;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-500);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 14px 0 8px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 4vw, 46px);
    line-height: 1.12;
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
}

.hero-meta,
.detail-meta,
.movie-tags,
.card-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 16px 28px rgba(212, 136, 75, 0.32);
}

.secondary-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft-lg);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-2px);
}

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

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
    padding: 56px 0;
}

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

.section-heading h2,
.page-heading h1 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--secondary-600);
}

.section-more {
    flex: none;
    color: var(--primary-600);
    font-weight: 800;
}

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

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

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

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

.movie-card a {
    display: block;
    height: 100%;
}

.movie-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--secondary-200);
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.movie-card:hover .movie-poster::after {
    background: rgba(0, 0, 0, 0.28);
}

.movie-duration {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 4px 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.62);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

.movie-card-body h3 {
    display: -webkit-box;
    min-height: 30px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--secondary-900);
    font-size: 18px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    transition: color 0.25s ease;
}

.movie-card:hover h3 {
    color: var(--primary-600);
}

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

.movie-tags {
    gap: 6px;
    margin-bottom: 14px;
}

.movie-tags span {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--secondary-200);
    color: var(--secondary-600);
    font-size: 13px;
}

.movie-card-meta strong,
.rank-score {
    color: var(--accent-500);
}

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

.category-tile {
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 160px;
    overflow: hidden;
    background: var(--secondary-200);
}

.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-tile-body {
    padding: 22px;
}

.category-tile-body span {
    color: var(--primary-600);
    font-size: 13px;
    font-weight: 800;
}

.category-tile-body h2 {
    margin: 6px 0 8px;
    font-size: 24px;
}

.category-tile-body p {
    margin: 0;
    color: var(--secondary-600);
}

.rank-panel {
    display: grid;
    gap: 12px;
}

.rank-item {
    overflow: hidden;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.rank-item a {
    display: grid;
    grid-template-columns: 58px 108px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 18px 12px 10px;
}

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

.rank-item img {
    width: 108px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

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

.rank-info strong {
    display: block;
    overflow: hidden;
    color: var(--secondary-900);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    display: block;
    overflow: hidden;
    color: var(--secondary-600);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px;
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--secondary-900);
    background: var(--secondary-50);
    border: 1px solid var(--secondary-200);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(212, 136, 75, 0.12);
}

.page-hero {
    padding: 64px 0 18px;
    background:
        radial-gradient(circle at 10% 20%, rgba(212, 136, 75, 0.14), transparent 28%),
        linear-gradient(180deg, #ffffff, var(--secondary-50));
}

.detail-hero {
    padding: 54px 0;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.74)),
        radial-gradient(circle at 18% 16%, rgba(212, 136, 75, 0.34), transparent 32%);
}

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

.breadcrumb a {
    color: rgba(255, 255, 255, 0.88);
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.detail-intro h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-intro p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.detail-meta span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.player-card {
    overflow: hidden;
    background: var(--secondary-900);
    border-radius: 24px;
    box-shadow: var(--shadow-soft-lg);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--black);
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--black);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.player-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    font-size: 34px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

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

.content-card {
    padding: 30px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.content-card + .content-card {
    margin-top: 22px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: var(--secondary-600);
    font-size: 16px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    padding: 12px 14px;
    color: var(--secondary-700);
    background: var(--secondary-50);
    border-radius: 12px;
}

.info-list strong {
    color: var(--secondary-900);
}

.empty-result {
    display: none;
    padding: 24px;
    color: var(--secondary-600);
    text-align: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.empty-result.is-visible {
    display: block;
}

.site-footer {
    margin-top: 50px;
    padding: 48px 0 24px;
    color: var(--secondary-200);
    background: var(--secondary-900);
}

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

.footer-logo {
    color: var(--white);
    font-size: 22px;
}

.site-footer p {
    max-width: 520px;
    color: #bdb6ad;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: #cfc8bf;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(232, 228, 220, 0.18);
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slowZoom {
    from {
        transform: scale(1.04);
    }
    to {
        transform: scale(1.11);
    }
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .site-nav {
        min-height: 66px;
    }

    .site-logo-text {
        font-size: 19px;
    }

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

    .hero-content {
        bottom: 70px;
    }

    .hero-control {
        display: none;
    }

    .section-heading,
    .page-heading,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-item a {
        grid-template-columns: 44px 86px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }
}

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

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

    .hero-copy p {
        font-size: 15px;
    }

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

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

    .info-list {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 22px;
    }

    .rank-item a {
        grid-template-columns: 38px 78px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-number {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .rank-item img {
        width: 78px;
        height: 50px;
    }
}
