:root {
    --amber-50: #fff8ed;
    --amber-100: #ffedd5;
    --amber-200: #fed7aa;
    --amber-400: #f59e0b;
    --amber-500: #f97316;
    --amber-600: #ea580c;
    --amber-900: #7c2d12;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.22);
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 50px rgba(124, 45, 18, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(251, 191, 36, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 10%, rgba(249, 115, 22, 0.13), transparent 30rem),
        linear-gradient(180deg, #fff7ed 0%, #fff 42%, #fff7ed 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(124, 45, 18, 0.08);
    backdrop-filter: blur(16px);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.34);
}

.brand-text {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #b45309, #ea580c);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #4b5563;
    font-weight: 700;
}

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

.main-nav a:hover {
    color: var(--amber-600);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 340px;
}

.header-search input,
.toolbar input,
.toolbar select,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 2px solid rgba(251, 146, 60, 0.25);
    border-radius: 999px;
    padding: 11px 16px;
    color: #374151;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.toolbar input:focus,
.toolbar select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(249, 115, 22, 0.58);
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.btn,
.header-search button,
.hero-dot,
.mobile-toggle,
.player-start {
    border: 0;
    cursor: pointer;
}

.btn,
.header-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-600));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.header-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.3);
}

.btn.secondary {
    color: #9a3412;
    background: rgba(255, 247, 237, 0.92);
    border: 1px solid rgba(251, 146, 60, 0.22);
    box-shadow: none;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #9a3412;
    background: rgba(255, 237, 213, 0.8);
}

.mobile-panel {
    display: none;
    padding: 0 0 16px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 10px;
    padding-top: 8px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #fff;
    background: linear-gradient(135deg, #431407, #9a3412 48%, #f97316);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.24;
    background:
        radial-gradient(circle at 20% 15%, #fff 0 2px, transparent 3px),
        radial-gradient(circle at 80% 20%, #fff 0 2px, transparent 3px),
        radial-gradient(circle at 40% 80%, #fff 0 1px, transparent 2px);
    background-size: 220px 220px;
}

.hero-glow {
    position: absolute;
    inset: auto -20% -45% -20%;
    height: 420px;
    background: radial-gradient(circle, rgba(253, 186, 116, 0.58), transparent 62%);
    filter: blur(14px);
}

.hero-track {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(1.015);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(90deg, rgba(67, 20, 7, 0.92), rgba(67, 20, 7, 0.62), rgba(67, 20, 7, 0.22)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
    gap: 36px;
    align-items: center;
    padding: 64px 0 86px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 900;
    border-radius: 999px;
    background: #ffedd5;
}

.hero-kicker {
    color: #fff7ed;
    background: rgba(255, 237, 213, 0.18);
    border: 1px solid rgba(255, 247, 237, 0.22);
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

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

.hero-meta,
.movie-meta,
.detail-meta,
.card-tags,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta span,
.movie-meta span,
.detail-meta span,
.card-tags span,
.breadcrumb span,
.breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-poster-card {
    position: relative;
    padding: 16px;
    border-radius: 30px;
    background: rgba(255, 247, 237, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 28px 70px rgba(67, 20, 7, 0.34);
    backdrop-filter: blur(18px);
}

.hero-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.8), rgba(249, 115, 22, 0.85)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
}

.hero-poster img,
.poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card-caption {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 30px;
    padding: 14px;
    color: #fff;
    border-radius: 18px;
    background: rgba(67, 20, 7, 0.72);
    backdrop-filter: blur(8px);
}

.hero-card-caption strong {
    display: block;
    font-size: 18px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
    width: 34px;
    border-radius: 999px;
    background: #fff;
}

.section {
    padding: 64px 0 0;
}

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

.section-title {
    margin: 0;
    color: #1f2937;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid rgba(251, 146, 60, 0.16);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: 0 24px 64px rgba(124, 45, 18, 0.18);
}

.poster-link {
    display: block;
}

.poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(253, 186, 116, 0.92), rgba(249, 115, 22, 0.9)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
}

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(67, 20, 7, 0.72), transparent);
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(154, 52, 18, 0.86);
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 52px;
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title a:hover {
    color: var(--amber-600);
}

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

.movie-meta span,
.card-tags span {
    color: #9a3412;
    background: #ffedd5;
}

.card-tags span {
    color: #92400e;
    background: #fff7ed;
    border: 1px solid rgba(251, 146, 60, 0.18);
}

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

.category-tile {
    min-height: 146px;
    padding: 24px;
    border-radius: 24px;
    color: #7c2d12;
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.92), rgba(255, 247, 237, 0.98));
    border: 1px solid rgba(251, 146, 60, 0.18);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 56px rgba(124, 45, 18, 0.18);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: #92400e;
}

.toolbar,
.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(251, 146, 60, 0.18);
    box-shadow: var(--shadow);
}

.detail-main {
    padding-top: 42px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 237, 213, 0.74));
    border: 1px solid rgba(251, 146, 60, 0.18);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(253, 186, 116, 0.95), rgba(249, 115, 22, 0.9)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
    box-shadow: 0 24px 64px rgba(124, 45, 18, 0.22);
}

.breadcrumb {
    margin-bottom: 18px;
}

.breadcrumb a,
.breadcrumb span {
    color: #9a3412;
    background: rgba(255, 237, 213, 0.75);
}

.detail-hero h1 {
    margin: 0 0 16px;
    color: #111827;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-hero p {
    color: #4b5563;
    font-size: 17px;
}

.detail-meta span {
    color: #9a3412;
    background: #ffedd5;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
    padding-top: 32px;
}

.panel {
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(251, 146, 60, 0.16);
    box-shadow: var(--shadow);
}

.panel + .panel {
    margin-top: 22px;
}

.panel h2,
.panel h3 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 26px;
    line-height: 1.2;
}

.panel p {
    margin: 0;
    color: #4b5563;
}

.panel p + p {
    margin-top: 14px;
}

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

.watch-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.26), rgba(17, 24, 39, 0.72));
}

.player-start span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    padding-left: 6px;
    font-size: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    box-shadow: 0 20px 48px rgba(249, 115, 22, 0.34);
}

.watch-player.is-playing .player-start {
    display: none;
}

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

.related-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid rgba(251, 146, 60, 0.16);
}

.related-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(253, 186, 116, 0.92), rgba(249, 115, 22, 0.9)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
}

.related-card h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #6b7280;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(251, 146, 60, 0.16);
    box-shadow: 0 12px 36px rgba(124, 45, 18, 0.08);
}

.rank-number {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
}

.rank-row h2 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

.rank-row p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.site-footer {
    margin-top: 72px;
    padding: 48px 0;
    color: #ffedd5;
    background: linear-gradient(90deg, #7c2d12, #9a3412);
}

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

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer p,
.site-footer a {
    color: #fed7aa;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    color: #92400e;
    border-radius: 22px;
    background: #ffedd5;
}

.empty-state.is-visible {
    display: block;
}

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

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

    .hero-poster-card,
    .detail-poster {
        max-width: 360px;
    }

    .content-layout aside {
        order: 2;
    }
}

@media (max-width: 820px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-track {
        min-height: 720px;
    }

    .hero-inner {
        padding-top: 48px;
    }

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

    .section-head,
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .toolbar,
    .search-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 22px;
    }

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

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

    .detail-hero,
    .panel {
        padding: 18px;
        border-radius: 22px;
    }

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

    .rank-row .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}
