* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #1f2937;
    background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 45%, #fef3c7 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #ea580c 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 12px 35px rgba(146, 64, 14, 0.25);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #f97316;
    background: #fff7ed;
    box-shadow: inset 0 0 0 2px rgba(255, 237, 213, 0.6);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text b {
    font-size: 24px;
    letter-spacing: -0.03em;
}

.logo-text em {
    margin-top: 4px;
    color: #ffedd5;
    font-size: 12px;
    font-style: normal;
    letter-spacing: 0.1em;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff7ed;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.header-search {
    display: flex;
    align-items: center;
    width: 260px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
}

.header-search input,
.mobile-nav input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #111827;
    background: #fff;
    border-radius: 10px;
    padding: 9px 11px;
}

.header-search button,
.mobile-nav button,
.search-page-form button {
    border: 0;
    cursor: pointer;
    color: #fff;
    background: #7c2d12;
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 800;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    color: #fff;
    cursor: pointer;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-nav form {
    display: flex;
    gap: 8px;
}

main {
    min-height: 60vh;
}

.hero-carousel {
    position: relative;
    height: min(600px, 78vh);
    min-height: 480px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(110deg, #7c2d12, #92400e);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-kicker {
    margin: 0 0 14px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    text-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.hero-desc {
    max-width: 700px;
    margin: 0 0 24px;
    font-size: clamp(17px, 2vw, 22px);
    color: #ffedd5;
    line-height: 1.7;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #7c2d12;
    background: #ffedd5;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 12px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #fff;
    background: #ea580c;
    box-shadow: 0 16px 35px rgba(234, 88, 12, 0.35);
}

.ghost-button {
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

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

.section-stack {
    display: grid;
    gap: 54px;
    padding: 54px 0;
}

.section-block {
    border-radius: 24px;
}

.white-block,
.warm-block,
.category-overview-card,
.ranking-panel,
.side-card,
.detail-main {
    background: #fff;
    box-shadow: 0 18px 45px rgba(146, 64, 14, 0.12);
}

.white-block,
.warm-block,
.category-overview-card {
    padding: clamp(22px, 4vw, 36px);
}

.warm-block {
    background: linear-gradient(120deg, #ffedd5, #fef3c7);
}

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

.section-heading h2,
.center-heading h2,
.ranking-panel h2,
.side-card h2,
.story-section h2,
.category-toolbar h2 {
    margin: 0;
    color: #1f2937;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading > a {
    color: #c2410c;
    font-weight: 900;
}

.center-heading {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
}

.center-heading p,
.section-heading p,
.category-toolbar p {
    margin: 10px 0 0;
    color: #6b7280;
    line-height: 1.7;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 45px rgba(146, 64, 14, 0.2);
}

.poster-link {
    display: block;
}

.poster-wrap {
    position: relative;
    display: block;
    height: 270px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5, #fde68a);
}

.movie-card-large .poster-wrap {
    height: 360px;
}

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

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

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 28px;
    border-radius: 9px;
    color: #fff;
    background: #f97316;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 900;
}

.year-badge {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: #7c2d12;
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: #ea580c;
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 13px;
}

.tag-row span {
    padding: 5px 9px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 12px;
}

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

.category-tile {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 18px;
    color: #7c2d12;
    background: linear-gradient(145deg, #fff7ed, #fde68a);
    padding: 18px;
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.18);
}

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

.category-tile span {
    color: #92400e;
    font-size: 13px;
    line-height: 1.55;
}

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

.ranking-panel,
.side-card {
    border-radius: 22px;
    padding: 24px;
}

.ranking-panel h2,
.side-card h2 {
    margin-bottom: 18px;
}

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

.mini-card {
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 15px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 10px 22px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(146, 64, 14, 0.14);
}

.mini-card img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: cover;
    background: #ffedd5;
}

.mini-card span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mini-card strong {
    color: #ea580c;
    font-size: 15px;
}

.mini-card b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card em {
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
}

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

.compact-section h3 {
    margin: 0 0 16px;
    color: #c2410c;
    font-size: 22px;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 12% 20%, rgba(253, 186, 116, 0.32), transparent 28%), linear-gradient(110deg, #7c2d12, #d97706);
}

.small-hero {
    padding: 72px 0;
}

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

.page-hero p {
    margin: 0 0 10px;
    color: #fed7aa;
    font-weight: 900;
}

.page-hero h1 {
    max-width: 860px;
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero span {
    display: block;
    max-width: 760px;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.7;
}

.top-category-grid {
    margin-bottom: 10px;
}

.category-overview-card {
    border-radius: 24px;
}

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

.movie-filter-input,
.search-page-form input,
.search-page-form select {
    border: 1px solid #fed7aa;
    border-radius: 14px;
    outline: none;
    background: #fff;
    padding: 12px 14px;
}

.movie-filter-input {
    width: min(360px, 100%);
}

.search-panel {
    min-height: 420px;
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px 120px;
    gap: 12px;
    margin-bottom: 28px;
}

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

.search-empty {
    grid-column: 1 / -1;
    border-radius: 18px;
    color: #92400e;
    background: #fff7ed;
    padding: 40px;
    text-align: center;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    color: #fff;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.55;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.32));
}

.detail-hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 52px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 38px;
    color: #fed7aa;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-intro {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    width: 260px;
    height: 380px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.detail-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-intro p:not(.hero-kicker) {
    max-width: 780px;
    margin: 0 0 22px;
    color: #ffedd5;
    font-size: 19px;
    line-height: 1.8;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 48px 0 64px;
}

.detail-main {
    overflow: hidden;
    border-radius: 24px;
}

.player-section {
    background: #0f172a;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-video,
.player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.player-video {
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.64;
}

.player-cover.is-hidden {
    display: none;
}

.play-symbol {
    position: absolute;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(234, 88, 12, 0.9);
    box-shadow: 0 20px 55px rgba(234, 88, 12, 0.35);
    font-size: 34px;
    line-height: 1;
    padding-left: 5px;
}

.story-section {
    padding: 28px;
    border-bottom: 1px solid #ffedd5;
}

.story-section:last-child {
    border-bottom: 0;
}

.story-section h2 {
    margin-bottom: 16px;
    font-size: 27px;
}

.story-section p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.review-block {
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
}

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

.info-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    border-radius: 14px;
    background: #fff7ed;
    padding: 12px;
}

.info-list dt {
    color: #9a3412;
    font-weight: 900;
}

.info-list dd {
    margin: 0;
    color: #374151;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 14px;
}

.site-footer {
    color: #ffedd5;
    background: linear-gradient(90deg, #7c2d12, #92400e);
    padding: 48px 0 26px;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    margin: 0 auto;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 16px;
    color: #fff;
}

.footer-grid p {
    margin: 0;
    line-height: 1.8;
}

.footer-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    border-top: 1px solid rgba(255, 237, 213, 0.24);
    padding-top: 22px;
    color: #fed7aa;
    text-align: center;
}

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

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

    .movie-grid,
    .compact-grid,
    .full-grid,
    .search-result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .side-card {
        position: static;
    }
}

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

    .logo-text b {
        font-size: 20px;
    }

    .logo-text em {
        display: none;
    }

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

    .hero-content {
        bottom: 78px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .full-grid,
    .search-result-grid,
    .category-grid,
    .region-group-grid,
    .mini-card-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card-large .poster-wrap {
        height: 320px;
    }

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

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

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

    .detail-poster {
        width: 210px;
        height: 310px;
    }

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

    .story-section {
        padding: 22px;
    }
}
