:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #281508;
    --muted: #7c5d3c;
    --line: rgba(120, 53, 15, 0.14);
    --primary: #f97316;
    --primary-dark: #c2410c;
    --gold: #f59e0b;
    --dark: #120806;
    --card: rgba(255, 255, 255, 0.88);
    --shadow: 0 24px 70px rgba(124, 45, 18, 0.18);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(67, 20, 7, 0.78);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(255, 237, 213, 0.18);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #fff7ed;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #f97316, #dc2626);
    color: white;
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.42);
}

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

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

.nav-link {
    color: #ffedd5;
    padding: 10px 15px;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.mobile-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.mobile-category-row a {
    color: #fed7aa;
    border: 1px solid rgba(255, 237, 213, 0.2);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #1c0a05;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(249, 115, 22, 0.24), transparent 34%),
        linear-gradient(90deg, rgba(18, 8, 6, 0.94) 0%, rgba(18, 8, 6, 0.68) 44%, rgba(18, 8, 6, 0.1) 100%),
        linear-gradient(0deg, rgba(18, 8, 6, 0.94) 0%, rgba(18, 8, 6, 0.14) 55%, rgba(18, 8, 6, 0.5) 100%);
}

.hero-content {
    position: absolute;
    left: max(28px, calc((100vw - 1240px) / 2 + 22px));
    bottom: 90px;
    max-width: 680px;
    color: white;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    text-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    margin: 0;
    max-width: 600px;
    color: #ffedd5;
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags {
    margin: 22px 0 28px;
}

.hero-tags span,
.detail-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.14);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.22);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-actions,
.section-title-row,
.filter-selects,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.more-link,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.quick-search button {
    color: white;
    background: linear-gradient(135deg, #f59e0b, #f97316, #dc2626);
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

.ghost-button {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.quick-search-section {
    max-width: 920px;
    margin: -36px auto 0;
    position: relative;
    z-index: 8;
    padding: 0 22px;
}

.quick-search,
.filter-panel {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.quick-search input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border-radius: 18px;
    border: 1px solid rgba(146, 64, 14, 0.14);
    background: #fffaf0;
    color: var(--text);
    padding: 0 16px;
    outline: none;
}

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

.section-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 74px 22px 0;
}

.section-title-row {
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-title-row h2,
.page-hero h1,
.detail-main h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.04em;
    line-height: 1.06;
}

.more-link {
    color: #9a3412;
    background: #ffedd5;
}

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

.category-tile,
.category-card-large a {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius);
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 45%),
        linear-gradient(135deg, #451a03, #9a3412 55%, #f97316);
    color: white;
    box-shadow: 0 20px 46px rgba(124, 45, 18, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card-large a:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 62px rgba(124, 45, 18, 0.26);
}

.category-tile span,
.category-card-large span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.category-card-large h2,
.category-card-large p {
    color: #ffedd5;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 600;
    margin: 0;
}

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

.category-card-large a {
    min-height: 220px;
}

.category-card-large span {
    font-size: 28px;
}

.category-card-large h2 {
    font-size: 18px;
}

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

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

.movie-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(124, 45, 18, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(124, 45, 18, 0.18);
}

.poster-link {
    display: block;
    aspect-ratio: 3 / 4.2;
    background: linear-gradient(135deg, #431407, #f97316);
    overflow: hidden;
}

.poster-link img,
.rank-poster img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
}

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

.meta-line,
.detail-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.meta-line span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-line span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #d97706;
}

.movie-card h3 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.25;
    min-height: 45px;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: var(--primary-dark);
}

.movie-card p,
.rank-info p,
.page-hero p,
.detail-one-line,
.content-card p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    margin: 0 0 14px;
    font-size: 14px;
    min-height: 73px;
}

.tag-list {
    min-height: 29px;
}

.rank-section {
    padding-bottom: 0;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 86px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    box-shadow: 0 12px 36px rgba(124, 45, 18, 0.08);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    font-weight: 900;
}

.rank-poster {
    height: 118px;
    border-radius: 18px;
    overflow: hidden;
    background: #fed7aa;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
}

.full-rank-list .rank-item {
    grid-template-columns: 70px 110px 1fr;
}

.filter-panel {
    margin-bottom: 26px;
    align-items: center;
}

.filter-input {
    flex: 1 1 360px;
}

.filter-selects {
    flex: 0 0 auto;
}

.filter-select {
    width: 156px;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

.page-hero,
.detail-hero {
    max-width: 1240px;
    margin: 32px auto 0;
    padding: 54px 22px;
}

.small-hero > div,
.detail-hero {
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.26), transparent 38%),
        linear-gradient(135deg, #fff7ed, #ffffff 45%, #ffedd5);
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: var(--shadow);
}

.small-hero > div {
    padding: 46px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 38px;
    align-items: center;
}

.detail-cover {
    aspect-ratio: 3 / 4.1;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #431407, #f97316);
    box-shadow: 0 26px 70px rgba(124, 45, 18, 0.24);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #9a3412;
    font-weight: 800;
    margin-bottom: 18px;
}

.detail-one-line {
    font-size: 18px;
    margin: 18px 0;
}

.detail-tags {
    margin: 18px 0 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #0c0503;
    box-shadow: 0 30px 80px rgba(18, 8, 6, 0.32);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #0c0503;
}

.video-play-button {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(18, 8, 6, 0.42);
    color: white;
    font-weight: 900;
    cursor: pointer;
    backdrop-filter: blur(18px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.video-play-button::before {
    content: "▶";
    display: block;
    font-size: 42px;
    line-height: 1;
    margin-bottom: 8px;
}

.video-play-button:hover {
    transform: scale(1.04);
}

.video-shell.is-playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}

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

.content-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 16px 46px rgba(124, 45, 18, 0.1);
}

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

.content-card p {
    margin: 0;
}

.site-footer {
    margin-top: 88px;
    background: linear-gradient(135deg, #431407, #7c2d12 60%, #9a3412);
    color: #ffedd5;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 22px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 28px;
}

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

.footer-inner p {
    color: #fed7aa;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    border: 1px solid rgba(255, 237, 213, 0.2);
    border-radius: 999px;
    padding: 8px 12px;
}

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

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

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 86px;
    }

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

    .hero-arrow {
        display: none;
    }

    .quick-search,
    .filter-panel {
        flex-direction: column;
    }

    .filter-selects {
        width: 100%;
    }

    .filter-select {
        flex: 1;
        width: auto;
    }

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

    .category-grid,
    .category-large-grid,
    .home-rank-list,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    .header-inner {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 17px;
    }

    .section-wrap {
        padding: 54px 16px 0;
    }

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

    .rank-item,
    .full-rank-list .rank-item {
        grid-template-columns: 48px 76px 1fr;
        gap: 10px;
    }

    .rank-poster {
        height: 102px;
    }

    .rank-info p {
        display: none;
    }

    .small-hero > div,
    .detail-hero {
        padding: 28px;
        border-radius: 26px;
    }

    .detail-main h1,
    .section-title-row h2,
    .page-hero h1 {
        font-size: 30px;
    }

    .video-play-button {
        width: 126px;
        height: 126px;
    }
}
