:root {
    --page-bg: #fffbeb;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --ink: #3f2305;
    --muted: #8a5a18;
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-light: #fbbf24;
    --line: rgba(146, 64, 14, 0.18);
    --shadow: 0 20px 55px rgba(146, 64, 14, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.25), transparent 30rem),
        linear-gradient(180deg, #fffbeb 0%, #fff7ed 45%, #fffaf0 100%);
    line-height: 1.7;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 24px rgba(180, 83, 9, 0.28);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    color: #78350f;
}

.brand-text small {
    font-size: 12px;
    color: var(--muted);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
    color: #78350f;
}

.desktop-nav a {
    position: relative;
    padding: 9px 0;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, #f59e0b, #b45309);
    transition: transform 0.25s ease;
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: #fff7ed;
    color: #78350f;
}

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

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    border-top: 1px solid var(--line);
    background: rgba(255, 251, 235, 0.98);
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: #78350f;
    font-weight: 700;
}

.mobile-nav.is-open {
    display: block;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #fff;
    background: #201006;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(32, 16, 6, 0.95) 0%, rgba(32, 16, 6, 0.72) 42%, rgba(32, 16, 6, 0.18) 100%),
        linear-gradient(0deg, rgba(32, 16, 6, 0.78) 0%, rgba(32, 16, 6, 0.06) 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 92px 24px 110px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: end;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.42);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

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

.hero p {
    max-width: 720px;
    margin: 0;
    color: #ffedd5;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 30px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.16);
    color: #fde68a;
    font-weight: 800;
}

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

.btn-primary,
.btn-ghost,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 32px rgba(180, 83, 9, 0.34);
}

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

.btn-ghost {
    color: #fff7ed;
    border: 1px solid rgba(255, 237, 213, 0.42);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.hero-panel {
    padding: 20px;
    border: 1px solid rgba(255, 237, 213, 0.28);
    border-radius: 28px;
    background: rgba(69, 26, 3, 0.5);
    backdrop-filter: blur(16px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.22);
}

.hero-panel h2 {
    margin: 0 0 16px;
    color: #fde68a;
    font-size: 20px;
}

.hero-mini-list {
    display: grid;
    gap: 12px;
}

.hero-mini-list a {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
}

.hero-mini-list img {
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-mini-list strong {
    display: block;
    color: #fff7ed;
    line-height: 1.35;
}

.hero-mini-list small {
    color: #fde68a;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 32px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 237, 213, 0.45);
    cursor: pointer;
}

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

.main-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px 76px;
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    color: #78350f;
    letter-spacing: -0.02em;
}

.section-title p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    margin: 0 0 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
}

.search-panel input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(146, 64, 14, 0.2);
    border-radius: 999px;
    padding: 0 20px;
    color: var(--ink);
    background: #fff;
    outline: none;
    font-size: 16px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 24px 54px rgba(146, 64, 14, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #451a03;
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(69, 26, 3, 0.82), transparent);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: #9a5a0c;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta-line span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #ffedd5;
}

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 20px;
    line-height: 1.3;
    color: #78350f;
}

.movie-card p {
    min-height: 4.9em;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.text-link {
    min-height: 38px;
    padding: 0 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    font-size: 14px;
}

.muted-link {
    color: #9a5a0c;
    font-size: 14px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 12rem),
        linear-gradient(135deg, #fff7ed, #ffffff);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: #78350f;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 24px;
    color: var(--muted);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
}

.rank-item img {
    width: 68px;
    height: 90px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item strong {
    display: block;
    line-height: 1.35;
    color: #78350f;
}

.rank-item small {
    color: var(--muted);
}

.page-hero {
    padding: 70px 24px 46px;
    color: #fff7ed;
    background:
        linear-gradient(135deg, rgba(120, 53, 15, 0.94), rgba(146, 64, 14, 0.86)),
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 20rem);
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
}

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

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #ffedd5;
    font-size: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 30px 70px rgba(69, 26, 3, 0.28);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    padding: 18px 26px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 22px 42px rgba(180, 83, 9, 0.4);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.play-trigger span:first-child {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.detail-card,
.side-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.detail-card {
    margin-top: 26px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #78350f;
    font-size: 26px;
}

.detail-card p {
    margin: 0 0 18px;
    color: #673b0d;
}

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

.info-grid span {
    padding: 12px 14px;
    border-radius: 16px;
    color: #78350f;
    background: #ffedd5;
    font-weight: 800;
}

.side-card {
    position: sticky;
    top: 96px;
}

.side-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 24px;
    background: #451a03;
}

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

.no-results {
    display: none;
    padding: 26px;
    border-radius: 24px;
    color: #78350f;
    background: #fff7ed;
    border: 1px solid var(--line);
    font-weight: 800;
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    color: #fffbeb;
    background: linear-gradient(180deg, #78350f, #451a03);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 26px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 34px;
}

.footer-main h2 {
    margin: 0 0 12px;
    color: #fde68a;
}

.footer-main p {
    max-width: 720px;
    margin: 0;
    color: #ffedd5;
}

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

.footer-links a {
    color: #fde68a;
    font-weight: 800;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(253, 230, 138, 0.22);
    color: #ffedd5;
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-content,
    .rank-layout,
    .detail-layout,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .side-card {
        position: static;
    }

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

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

@media (max-width: 760px) {
    .site-header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 700px;
    }

    .hero-content {
        padding: 62px 18px 98px;
        gap: 26px;
    }

    .hero h1 {
        font-size: 42px;
    }

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

    .main-wrap {
        padding: 36px 16px 58px;
    }

    .section-title,
    .search-panel,
    .footer-bottom {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

    .movie-card h3 {
        font-size: 17px;
    }

    .movie-card p {
        min-height: auto;
    }

    .card-actions {
        align-items: flex-start;
        flex-direction: column;
    }

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

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