:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-500: #f97316;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(180, 83, 9, 0.18);
    --card: rgba(255, 255, 255, 0.88);
    --shadow: 0 24px 60px rgba(146, 64, 14, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.94));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    color: var(--amber-900);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text em {
    color: var(--amber-600);
    font-size: 12px;
    font-style: normal;
    margin-top: 3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-links a,
.mobile-panel a {
    color: var(--amber-800);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: var(--amber-600);
}

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

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--amber-900);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.42);
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.text-link {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
}

.header-search button {
    padding: 10px 14px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

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

.ghost-btn.light {
    color: var(--amber-900);
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(217, 119, 6, 0.2);
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--amber-900);
    background: rgba(254, 243, 199, 0.7);
}

.mobile-panel {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    display: grid;
    gap: 12px;
}

.mobile-search {
    display: flex;
    gap: 10px;
}

.mobile-search input {
    flex: 1;
    padding: 12px 15px;
}

.mobile-search button {
    padding: 0 16px;
}

.hero-slider {
    position: relative;
    height: min(720px, 72vh);
    min-height: 540px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.9s ease, transform 1.1s ease;
    pointer-events: none;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(251, 191, 36, 0.24), transparent 34%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48) 52%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1220px) / 2));
    right: max(24px, calc((100vw - 1220px) / 2));
    bottom: 86px;
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.movie-tags,
.hero-actions,
.detail-actions,
.card-actions,
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-kicker span,
.movie-tags span,
.side-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-kicker span {
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.9);
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 700px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.75;
}

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

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-400);
}

.quick-search-section,
.section-block,
.subpage-main,
.detail-main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-section {
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.quick-search-card,
.page-hero,
.detail-hero,
.detail-content,
.player-shell,
.category-overview-card,
.amber-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    padding: 26px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 13px;
    font-weight: 850;
}

.quick-search-card h2,
.section-heading h2,
.page-hero h1,
.detail-intro h1,
.detail-content h2,
.detail-side h2 {
    margin: 10px 0 0;
    color: var(--amber-900);
    letter-spacing: -0.04em;
}

.quick-search-card h2,
.section-heading h2 {
    font-size: clamp(26px, 3vw, 40px);
}

.wide-search {
    display: flex;
    gap: 12px;
}

.wide-search input {
    flex: 1;
    min-width: 0;
    padding: 15px 18px;
}

.wide-search button {
    padding: 0 24px;
}

.section-block {
    padding: 76px 0 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
}

.section-heading a,
.text-link {
    color: var(--amber-700);
    font-weight: 850;
}

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

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

.page-grid {
    padding: 28px 0 82px;
}

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

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(146, 64, 14, 0.16);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.movie-card-compact .movie-info p {
    display: none;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-200), var(--orange-500));
}

.movie-card-horizontal .movie-poster {
    height: 100%;
    aspect-ratio: auto;
}

.movie-poster img,
.category-tile img,
.mini-card img,
.rank-poster img,
.category-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.mini-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.06);
}

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.54);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 18px;
}

.movie-tags {
    margin-bottom: 12px;
}

.movie-tags span,
.side-tags span {
    padding: 6px 10px;
    color: var(--amber-800);
    background: var(--amber-100);
}

.movie-info h3,
.rank-info h2,
.category-overview-card h2 {
    margin: 0 0 10px;
    color: var(--amber-900);
    font-size: 20px;
    line-height: 1.28;
}

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

.card-actions {
    justify-content: space-between;
    margin-top: 18px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.amber-panel {
    margin-top: 76px;
    padding: 34px;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.9));
}

.category-grid,
.mini-grid,
.category-overview-grid {
    display: grid;
    gap: 22px;
}

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

.category-tile,
.mini-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 26px;
    color: #ffffff;
    background: #111827;
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.14);
}

.category-tile::after,
.mini-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.12));
}

.category-tile img,
.mini-card img {
    position: absolute;
    inset: 0;
}

.category-tile span,
.category-tile em,
.mini-card span,
.mini-card em {
    position: relative;
    z-index: 1;
}

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

.category-tile em,
.mini-card em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
    line-height: 1.58;
}

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

.site-footer {
    margin-top: 86px;
    padding: 38px 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 251, 235, 0.7);
}

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

.footer-brand {
    color: var(--amber-900);
    font-size: 20px;
    font-weight: 900;
}

.footer-links a {
    color: var(--amber-700);
    font-weight: 800;
}

.subpage-main,
.detail-main {
    padding-top: 34px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 58px);
    background:
        radial-gradient(circle at 88% 15%, rgba(251, 191, 36, 0.34), transparent 30%),
        linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.88));
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 18px;
}

.filter-bar {
    margin-top: 24px;
    display: flex;
    gap: 14px;
}

.filter-bar input {
    flex: 1;
    padding: 14px 18px;
}

.filter-bar select {
    min-width: 190px;
    padding: 0 16px;
}

.category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 20px;
}

.category-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 20px;
    background: var(--amber-100);
}

.category-samples {
    display: grid;
    gap: 8px;
    margin: 14px 0 18px;
}

.category-samples span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.22);
    color: var(--amber-900);
    font-weight: 750;
}

.category-samples em {
    color: var(--amber-600);
    font-style: normal;
}

.ranking-list {
    display: grid;
    gap: 14px;
    padding: 28px 0 82px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 72px 90px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    font-size: 22px;
    font-weight: 950;
}

.rank-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--amber-100);
}

.ranking-row strong {
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
}

.search-panel {
    padding-top: 24px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 330px) 1fr;
    gap: clamp(26px, 5vw, 52px);
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    background: var(--amber-100);
    box-shadow: 0 24px 54px rgba(146, 64, 14, 0.22);
}

.detail-intro h1 {
    margin-top: 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
}

.detail-one-line {
    max-width: 780px;
    margin: 18px 0 26px;
    font-size: 19px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.32));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.42);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 18px;
}

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

.detail-content {
    margin-top: 28px;
    padding: clamp(24px, 4vw, 42px);
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 34px;
}

.content-column h2,
.detail-side h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.content-column p + h2 {
    margin-top: 30px;
}

.detail-side dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.detail-side dl div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.24);
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: var(--amber-900);
    font-weight: 850;
    text-align: right;
}

.side-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.related-section {
    padding-top: 56px;
}

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

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

    .movie-grid.two-columns,
    .category-overview-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .header-inner {
        height: 66px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 560px;
        height: 76vh;
    }

    .hero-content {
        bottom: 96px;
    }

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

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

    .movie-card-horizontal {
        grid-template-columns: 150px 1fr;
    }

    .filter-bar,
    .wide-search,
    .page-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .ranking-row strong {
        width: fit-content;
    }
}

@media (max-width: 560px) {
    .brand-text em {
        display: none;
    }

    .hero-content h1 {
        font-size: 40px;
    }

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

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    .movie-card-horizontal {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
