* {
    box-sizing: border-box;
}

:root {
    --site-bg: #fff7ed;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-soft: #6b7280;
    --line: #f3e8dd;
    --orange: #f97316;
    --orange-deep: #ea580c;
    --pink: #ec4899;
    --amber: #f59e0b;
    --shadow: 0 18px 45px rgba(127, 55, 18, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --container: 1180px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background: linear-gradient(180deg, #fff7ed 0%, #fff1f2 42%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(249, 115, 22, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: var(--container);
    height: 66px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fb923c, #ec4899);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.26);
}

.brand-name {
    font-size: 22px;
    line-height: 1;
    background: linear-gradient(90deg, #f97316, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff3e8;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #9a3412;
}

.mobile-nav {
    padding: 8px 20px 18px;
    border-top: 1px solid var(--line);
}

.mobile-link {
    display: block;
    padding: 12px 0;
    font-weight: 700;
    color: #374151;
}

.mobile-link.active {
    color: var(--orange);
}

.header-categories {
    border-top: 1px solid rgba(249, 115, 22, 0.08);
}

.header-categories-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 9px 20px;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
}

.header-categories a {
    color: #7c2d12;
    font-size: 14px;
    font-weight: 600;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fce7f3, #fde68a);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: calc((100vw - min(var(--container), 100vw)) / 2 + 20px);
    top: 50%;
    transform: translateY(-50%);
    max-width: 680px;
    color: #ffffff;
}

.hero-kicker,
.detail-kicker {
    display: inline-flex;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(44px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 24px;
    color: #f3f4f6;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.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;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ec4899);
    box-shadow: 0 18px 38px rgba(236, 72, 153, 0.34);
}

.btn-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

.page-top {
    padding-top: 42px;
}

.quick-search-section {
    margin-top: -52px;
    position: relative;
    z-index: 5;
    padding: 0 20px;
}

.quick-search-card {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    align-items: center;
    backdrop-filter: blur(16px);
}

.quick-search-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.quick-search-card p {
    margin: 0;
    color: var(--text-soft);
}

.quick-search {
    display: flex;
    gap: 10px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid #fed7aa;
    border-radius: 14px;
    color: #374151;
    background: #ffffff;
    outline: none;
}

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

.quick-search button {
    min-width: 96px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ec4899);
    font-weight: 800;
    cursor: pointer;
}

.content-section {
    margin: 74px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

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

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.five-cols {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.12);
    border-radius: 22px;
    background: var(--card-bg);
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(124, 45, 18, 0.16);
}

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

.small-card .movie-cover,
.five-cols .movie-cover {
    height: 220px;
}

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

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

.movie-badge,
.movie-score {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.movie-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.54);
    backdrop-filter: blur(8px);
}

.movie-score {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    color: #78350f;
    background: #fde68a;
}

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

.movie-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

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

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

.movie-meta {
    display: flex;
    gap: 12px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.tag-row span {
    color: #9a3412;
    background: #ffedd5;
}

.channel-section,
.latest-section {
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.year-section {
    padding: 34px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.year-tabs {
    display: flex;
    gap: 12px;
    padding-bottom: 18px;
    overflow-x: auto;
}

.year-tab {
    flex: 0 0 auto;
    padding: 12px 24px;
    border: 2px solid #fed7aa;
    border-radius: 16px;
    color: #7c2d12;
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.year-tab.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.22);
}

.year-panel {
    display: none;
}

.year-panel.active {
    display: block;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 92px 1fr 60px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(124, 45, 18, 0.14);
}

.rank-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb {
    width: 92px;
    height: 62px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffedd5;
}

.rank-thumb img {
    height: 100%;
    object-fit: cover;
}

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

.rank-main strong,
.rank-main em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-main strong {
    font-size: 17px;
    margin-bottom: 6px;
}

.rank-main em {
    color: var(--text-soft);
    font-size: 13px;
    font-style: normal;
}

.rank-rating {
    color: #d97706;
    font-size: 20px;
    font-weight: 900;
    text-align: right;
}

.page-hero {
    padding: 46px;
    margin-bottom: 32px;
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.soft-hero {
    background: linear-gradient(135deg, #ffffff, #fff7ed 48%, #fce7f3);
}

.ranking-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #ec4899);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 54px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: inherit;
    opacity: 0.86;
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card a {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    min-height: 190px;
    padding: 20px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-card a:hover {
    transform: translateY(-4px);
}

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

.category-thumbs img {
    height: 82px;
    object-fit: cover;
    border-radius: 14px;
    background: #ffedd5;
}

.category-info h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.category-info p {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.7;
}

.category-info span {
    color: var(--orange);
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: #9a3412;
    font-weight: 700;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 190px 210px;
    gap: 16px;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.08);
}

.search-box span,
.select-box span {
    display: block;
    margin-bottom: 8px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.listing-grid {
    margin-bottom: 70px;
}

.detail-page {
    padding-bottom: 70px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 34px;
    align-items: center;
    padding: 42px;
    border-radius: 32px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.7), transparent 36%), linear-gradient(135deg, #111827, #7c2d12);
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.detail-copy p {
    margin: 0 0 24px;
    color: #f3f4f6;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

.detail-poster img {
    height: 420px;
    object-fit: cover;
    background: #ffedd5;
}

.player-section {
    margin: 32px 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.26);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.52), rgba(124, 45, 18, 0.45));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}

.play-overlay[hidden] {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ec4899);
    box-shadow: 0 18px 44px rgba(236, 72, 153, 0.36);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    align-items: start;
}

.detail-main,
.detail-side {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-main {
    padding: 34px;
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-main p {
    margin: 0 0 26px;
    color: #4b5563;
    font-size: 17px;
    line-height: 2;
}

.detail-side {
    padding: 26px;
}

.detail-side dl {
    margin: 0;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #ffedd5;
}

.detail-side dt {
    color: #9a3412;
    font-weight: 900;
}

.detail-side dd {
    margin: 0;
    color: #4b5563;
}

.detail-next-prev {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 32px;
}

.detail-next-prev a {
    padding: 18px;
    border-radius: 18px;
    color: #9a3412;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.08);
    font-weight: 800;
}

.detail-next-prev a:hover {
    color: var(--orange);
}

.site-footer {
    margin-top: 86px;
    color: #4b5563;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 46px 20px 28px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.footer-brand p {
    max-width: 520px;
    margin: 18px 0 0;
    line-height: 1.8;
}

.footer-links h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

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

.footer-grid a {
    color: #7c2d12;
    font-weight: 700;
}

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

.footer-copy {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 20px 28px;
    color: #9ca3af;
    border-top: 1px solid var(--line);
}

.searchable-item.is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .four-cols,
    .five-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .quick-search-card,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-card,
    .page-hero,
    .detail-hero,
    .detail-main,
    .detail-side,
    .channel-section,
    .latest-section,
    .year-section {
        padding: 24px;
        border-radius: 24px;
    }

    .quick-search,
    .detail-next-prev {
        grid-template-columns: 1fr;
        display: grid;
    }

    .three-cols,
    .four-cols,
    .five-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .movie-cover,
    .small-card .movie-cover,
    .five-cols .movie-cover {
        height: 210px;
    }

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

    .category-card a {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 74px 1fr;
    }

    .rank-rating {
        grid-column: 3;
        text-align: left;
    }

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

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

@media (max-width: 480px) {
    .page-container {
        width: min(100% - 28px, var(--container));
    }

    .three-cols,
    .four-cols,
    .five-cols {
        grid-template-columns: 1fr;
    }

    .movie-cover,
    .small-card .movie-cover,
    .five-cols .movie-cover {
        height: 280px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .detail-poster img {
        height: 360px;
    }
}
