:root {
    --warm-50: #fbf7f4;
    --warm-100: #f4eae4;
    --warm-200: #eaded7;
    --warm-300: #d9c4ba;
    --warm-500: #aa7f6d;
    --warm-700: #745447;
    --warm-900: #241815;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --amber-400: #f59e0b;
    --amber-500: #d97706;
    --text: #1f1714;
    --muted: #7b665c;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(60, 35, 20, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--warm-50);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 8px 24px rgba(73, 46, 33, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--warm-900);
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--sky-600), var(--amber-500));
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
    color: var(--warm-700);
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--sky-600);
}

.menu-button {
    display: none;
    border: 0;
    background: var(--warm-100);
    color: var(--warm-900);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    color: var(--warm-700);
    font-weight: 700;
}

.mobile-nav.open {
    display: grid;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--warm-900);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 35%, rgba(14, 165, 233, 0.25), transparent 35%),
        linear-gradient(90deg, rgba(36, 24, 21, 0.96) 0%, rgba(36, 24, 21, 0.72) 45%, rgba(36, 24, 21, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    color: #fff;
}

.hero-kicker,
.card-kicker,
.rank-index {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--amber-500);
    color: #fff;
    padding: 5px 14px;
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -1.8px;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta,
.breadcrumb,
.tag-row,
.action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.breadcrumb a,
.breadcrumb span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    padding: 6px 12px;
    color: inherit;
}

.hero .action-row {
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.filter-button,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.filter-button,
.player-button {
    color: #fff;
    background: var(--sky-600);
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.25);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-primary:hover,
.btn-secondary:hover,
.filter-button:hover,
.player-button:hover {
    transform: translateY(-2px);
}

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

.hero-dots button {
    width: 48px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--sky-500);
}

main,
.section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 70px 0;
}

.section-alt {
    width: 100%;
    margin: 0;
    padding: 70px 0;
    background: linear-gradient(135deg, #eff9ff, var(--warm-50));
}

.section-alt > .section {
    padding: 0;
}

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

.section-head span {
    color: var(--sky-600);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section-head h1,
.section-head h2 {
    margin: 6px 0 0;
    color: var(--warm-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
}

.section-head p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    min-width: 0;
    background: var(--card);
    border: 1px solid rgba(170, 127, 109, 0.16);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(60, 35, 20, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(217, 119, 6, 0.18)),
        var(--warm-100);
}

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

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

.poster-badge,
.poster-type {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 10px;
    background: rgba(217, 119, 6, 0.86);
}

.poster-type {
    right: 10px;
    background: rgba(2, 132, 199, 0.82);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--warm-900);
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-meta {
    gap: 6px;
    color: var(--warm-700);
    font-size: 12px;
}

.movie-meta span {
    background: var(--warm-100);
    padding: 3px 8px;
}

.tag-row {
    margin-top: 10px;
    gap: 6px;
}

.tag-row span {
    border-radius: 999px;
    padding: 3px 8px;
    background: #edf8ff;
    color: var(--sky-700);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 175px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, rgba(36, 24, 21, 0.94), rgba(2, 132, 199, 0.78));
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -48px;
    bottom: -60px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.28);
}

.category-card h3,
.category-card p,
.category-card span {
    position: relative;
    z-index: 1;
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.category-card span {
    margin-top: 18px;
    font-weight: 900;
    color: var(--amber-400);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 104px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(170, 127, 109, 0.16);
    box-shadow: 0 8px 24px rgba(60, 35, 20, 0.06);
}

.rank-item img {
    width: 104px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 15px;
    background: var(--warm-100);
}

.rank-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--warm-900);
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px 150px;
    gap: 12px;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(60, 35, 20, 0.07);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    border: 1px solid var(--warm-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--warm-900);
    background: var(--warm-50);
}

.detail-hero {
    background: var(--warm-900);
    color: #fff;
}

.detail-hero-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 42px;
    padding: 58px 0 66px;
    align-items: center;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    background: var(--warm-100);
}

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

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

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.1;
}

.detail-one-line {
    margin: 0 0 22px;
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.player-shell {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #050505;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.48));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-button {
    min-width: 150px;
    min-height: 58px;
    font-size: 18px;
}

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

.article-panel,
.side-panel {
    padding: 28px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(60, 35, 20, 0.07);
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: var(--warm-900);
    font-size: 26px;
}

.article-panel p {
    margin: 0 0 18px;
    color: #46342d;
    font-size: 17px;
}

.side-panel dl {
    margin: 0;
}

.side-panel dt {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.side-panel dd {
    margin: 4px 0 0;
    color: var(--warm-900);
    font-weight: 800;
}

.empty-tip {
    display: none;
    padding: 30px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    margin-top: 70px;
    background: var(--warm-900);
    color: var(--warm-100);
}

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

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--amber-400);
}

.footer-grid p,
.footer-grid a {
    display: block;
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.62);
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

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

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

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

@media (max-width: 760px) {
    .hero {
        min-height: 620px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 90px;
    }

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

    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-item img {
        width: 100%;
    }

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

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

    .detail-hero-inner {
        padding: 32px 0 46px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid-wide,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta span,
    .detail-meta span,
    .movie-meta span,
    .breadcrumb a,
    .breadcrumb span {
        font-size: 13px;
    }
}
