:root {
    --bg: #fffaf0;
    --bg-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(120, 53, 15, 0.16);
    --brand: #d97706;
    --brand-dark: #78350f;
    --brand-soft: #fbbf24;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(120, 53, 15, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 46%, #fff7ed 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #78350f 0%, #9a3412 56%, #7c2d12 100%);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(69, 26, 3, 0.25);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.22);
    border: 1px solid rgba(253, 230, 138, 0.38);
    color: #fde68a;
    font-size: 16px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 600;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #fde68a;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 46px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 88px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 74% 36%, rgba(245, 158, 11, 0.26), transparent 32%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.72) 54%, rgba(17, 24, 39, 0.46)),
        linear-gradient(180deg, rgba(120, 53, 15, 0.55), rgba(17, 24, 39, 0.96));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(253, 230, 138, 0.32);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.35);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    box-shadow: 0 16px 32px rgba(217, 119, 6, 0.32);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.hero-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

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

.hero-dot {
    width: 36px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #fbbf24;
}

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

.section-title {
    margin-bottom: 24px;
}

.section-title h2,
.detail-text h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.16;
    color: #1f2937;
}

.section-title p,
.detail-text p,
.category-overview-card p,
.category-tile p {
    margin: 0;
    color: var(--muted);
}

.section-title.with-link {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-title.with-link a {
    color: #b45309;
    font-weight: 800;
}

.home-search {
    padding-top: 34px;
    padding-bottom: 22px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.search-input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.search-input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(120, 53, 15, 0.10);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(120, 53, 15, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.92);
    font-size: 12px;
    font-weight: 700;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.86);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.32;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

.card-meta span {
    padding: 2px 7px;
    border-radius: 999px;
    background: #fffbeb;
}

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

.category-tile,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 251, 235, 0.88));
    box-shadow: var(--shadow);
}

.category-tile {
    padding: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 60px rgba(120, 53, 15, 0.16);
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    color: #78350f;
    font-size: 22px;
}

.category-tile div,
.mini-title-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-tile span,
.mini-title-list span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 700;
}

.page-main {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    border-radius: 30px;
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.24), transparent 32%),
        linear-gradient(135deg, #78350f, #9a3412 55%, #111827);
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 64px;
    color: #ffffff;
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 14px;
    color: #fde68a;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.04;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.category-cover-row img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    color: #78350f;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(120, 53, 15, 0.10);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

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

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: #d97706;
    font-weight: 900;
}

.rank-item h3 {
    margin: 4px 0 8px;
    font-size: 19px;
}

.rank-item p {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    padding: 34px;
    color: #ffffff;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.detail-info {
    align-self: center;
}

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

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

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

.one-line {
    max-width: 760px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta span,
.tag-list a {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
}

.player-section {
    padding-bottom: 28px;
}

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    box-shadow: 0 18px 40px rgba(217, 119, 6, 0.34);
    font-size: 34px;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-text article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.compact-card .card-body h3 {
    font-size: 15px;
}

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: linear-gradient(90deg, #111827, #1f2937);
}

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

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

.footer-grid p {
    margin: 0;
    max-width: 520px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.to-top {
    border: 0;
    color: #fbbf24;
    background: transparent;
    cursor: pointer;
}

.is-filtered-out {
    display: none !important;
}

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

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

@media (max-width: 820px) {
    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 20px 18px;
        background: #92400e;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 12px 0;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 78vh;
        padding-top: 48px;
        gap: 24px;
    }

    .hero-poster {
        width: min(220px, 62vw);
        transform: none;
    }

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

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

    .category-grid,
    .category-overview-grid,
    .rank-grid,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-card,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero {
        padding: 28px;
        border-radius: 22px;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 20px;
    }

    .section-wrap {
        padding: 42px 0;
    }

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

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

    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }
}
