:root {
    --page-bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-soft: #fff7ed;
    --orange: #ea580c;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 12px 28px rgba(17, 24, 39, 0.08);
    --radius: 22px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
}

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

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

main {
    min-height: 60vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.site-logo__mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
    font-size: 15px;
}

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

.nav-link {
    position: relative;
    padding: 24px 0;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 17px;
    height: 2px;
    background: var(--amber);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

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

.icon-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #374151;
    box-shadow: inset 0 0 0 1px var(--line);
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
    color: var(--amber-dark);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35), 0 8px 20px rgba(217, 119, 6, 0.16);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
}

.header-search {
    border-top: 1px solid var(--line);
    background: #fff;
}

.header-search__form {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.header-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0 15px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.header-search button,
.primary-button,
.secondary-button,
.search-panel button,
.player-cover__button {
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(217, 119, 6, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.primary-button:hover,
.search-panel button:hover,
.player-cover__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(217, 119, 6, 0.34);
}

.secondary-button {
    color: var(--amber-dark);
    background: #fff;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

.mobile-nav {
    display: none;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: linear-gradient(135deg, #fffbeb, #fff7ed 48%, #fef3c7);
}

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

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

.hero-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: saturate(1.05);
}

.hero-slide__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.97) 0%, rgba(255, 247, 237, 0.88) 42%, rgba(255, 255, 255, 0.38) 100%);
}

.hero-slide__inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    gap: 48px;
    align-items: center;
    padding: 58px 0 76px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--amber-dark);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 0 0 18px;
    max-width: 720px;
    color: #111827;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy h1 span {
    display: block;
    color: var(--amber-dark);
}

.hero-copy p {
    max-width: 640px;
    margin: 0 0 28px;
    color: #4b5563;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--amber-dark);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.16);
    font-size: 13px;
    font-weight: 700;
}

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

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(100%, 420px);
    border-radius: 34px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

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

.hero-poster__meta {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 18px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.35), rgba(17, 24, 39, 0.82));
    backdrop-filter: blur(10px);
}

.hero-poster__meta strong {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.36);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 30px;
    background: var(--amber-dark);
}

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

.section--wide {
    width: 100%;
    padding: 76px 0;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

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

.section-head h1,
.section-head h2,
.page-hero h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-card p,
.detail-intro p {
    color: var(--muted);
    line-height: 1.75;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card__link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card__poster {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-card__poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card__link:hover img {
    transform: scale(1.08);
}

.movie-card__poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.62));
    opacity: 0.86;
}

.movie-card__poster figcaption {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 2;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.32);
}

.rank-badge {
    left: 14px;
    right: auto;
    background: rgba(17, 24, 39, 0.78);
}

.movie-card__body {
    flex: 1;
    padding: 18px;
}

.movie-card__body h2 {
    margin: 0 0 9px;
    color: #111827;
    font-size: 19px;
    line-height: 1.3;
}

.movie-card__body p {
    margin: 0 0 14px;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.movie-card__meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f3f4f6;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -38px;
    top: -38px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.24), rgba(217, 119, 6, 0));
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 22px;
}

.category-card span {
    position: absolute;
    left: 24px;
    bottom: 22px;
    color: var(--amber-dark);
    font-weight: 800;
}

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

.rank-list {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.rank-line {
    display: grid;
    grid-template-columns: 48px 1fr 54px;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 16px;
    color: #374151;
    background: #f9fafb;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
    color: var(--amber-dark);
    background: var(--amber-soft);
    transform: translateX(4px);
}

.rank-line span {
    color: var(--amber-dark);
    font-weight: 900;
}

.rank-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-line em {
    font-style: normal;
    color: #fff;
    background: var(--amber);
    border-radius: 999px;
    text-align: center;
    padding: 5px 0;
    font-size: 13px;
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-dark), var(--orange));
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -46% auto;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero h1,
.page-hero p {
    color: #fff;
}

.page-hero p {
    max-width: 720px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 14px;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.hidden-card {
    display: none !important;
}

.empty-message {
    display: none;
    padding: 42px;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.empty-message.active {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-dark);
    font-weight: 700;
}

.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 80px;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 30px;
    align-items: start;
}

.player-panel,
.detail-side,
.content-card {
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.player-panel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111827;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: #fff;
    background: #111827;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

.player-cover__content {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 14px;
    text-align: center;
}

.play-circle {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 45px rgba(217, 119, 6, 0.38);
    font-size: 28px;
    padding-left: 4px;
}

.detail-side {
    padding: 26px;
}

.detail-side h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.2;
}

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

.detail-meta div {
    padding: 13px;
    border-radius: 16px;
    background: #f9fafb;
}

.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.detail-meta strong {
    color: #111827;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    margin-top: 30px;
}

.content-card {
    padding: 30px;
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.content-card p {
    color: #374151;
    line-height: 1.9;
    margin: 0 0 18px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-item img {
    width: 84px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    margin-bottom: 5px;
    color: #111827;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.site-footer__inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.site-logo--footer {
    color: #fff;
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    max-width: 440px;
    color: #9ca3af;
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s ease;
}

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

.site-footer__bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .site-nav {
        gap: 16px;
    }

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

    .hero-poster {
        justify-self: start;
        width: min(100%, 340px);
    }

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

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

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

@media (max-width: 760px) {
    .site-header__inner {
        width: min(100% - 24px, 1180px);
        height: 62px;
    }

    .site-logo {
        font-size: 18px;
    }

    .site-logo__mark {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .site-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .mobile-nav {
        display: grid;
        gap: 6px;
        padding: 10px 12px 14px;
        border-top: 1px solid var(--line);
        background: #fff;
    }

    .mobile-link {
        padding: 12px 14px;
        border-radius: 12px;
        color: #374151;
        font-weight: 700;
    }

    .mobile-link.active,
    .mobile-link:hover {
        color: var(--amber-dark);
        background: var(--amber-soft);
    }

    .header-search__form {
        grid-template-columns: 1fr;
    }

    .hero-slider,
    .hero-slide__inner {
        min-height: auto;
    }

    .hero-slide__inner {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 42px 0 78px;
    }

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

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

    .hero-poster {
        width: 100%;
        transform: none;
        border-radius: 26px;
    }

    .section,
    .page-section,
    .section--wide {
        padding: 50px 0;
    }

    .section-head {
        display: block;
    }

    .section-head .secondary-button,
    .section-head .primary-button {
        margin-top: 18px;
        display: inline-flex;
        align-items: center;
    }

    .grid-cards,
    .grid-cards--dense,
    .category-grid,
    .search-panel,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .movie-card__poster img {
        aspect-ratio: 16 / 11;
    }

    .page-hero {
        padding: 58px 0;
    }

    .detail-wrap {
        padding: 28px 0 56px;
    }

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

    .content-card {
        padding: 22px;
    }

    .rank-line {
        grid-template-columns: 42px minmax(0, 1fr) 48px;
    }
}
