:root {
    --page-bg: #fff7ed;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fde68a;
    --soft: #fffbeb;
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-strong: #f59e0b;
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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: 80;
    border-bottom: 1px solid rgba(251, 191, 36, 0.36);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

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

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

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand-dark);
    background: #fef3c7;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 4px;
    background: #ffffff;
}

.header-search input,
.mobile-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 9px 10px 9px 14px;
    background: transparent;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.filter-bar button,
.play-layer button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 14px 28px rgba(180, 83, 9, 0.22);
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 8px 14px;
}

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

.secondary-btn {
    color: var(--brand-dark);
    background: #ffffff;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-bar button:hover,
.play-layer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(180, 83, 9, 0.28);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--brand-dark);
    background: #fef3c7;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid #fde68a;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    color: #ffffff;
    background: radial-gradient(circle at 10% 10%, #f59e0b 0%, #b45309 30%, #78350f 72%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.26;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.9), transparent 16%), radial-gradient(circle at 80% 18%, rgba(253,230,138,0.65), transparent 18%), linear-gradient(135deg, rgba(255,255,255,0.16), transparent 48%);
}

.hero-slider {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.72fr);
    gap: 48px;
    align-items: center;
    padding: 58px 0 82px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
}

.kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    font-weight: 900;
    font-size: 13px;
}

.hero h1 {
    margin: 20px 0 20px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #fffbeb;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.72;
}

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

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.hero-art {
    position: relative;
    z-index: 2;
    border-radius: 34px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.hero-art img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    background: rgba(255, 251, 235, 0.16);
}

.hero-art-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #fffbeb;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 0;
    bottom: 26px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #78350f;
    background: rgba(255, 255, 255, 0.92);
    font-size: 20px;
    font-weight: 900;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
}

.hero-dot.active {
    width: 28px;
    background: #ffffff;
}

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

.section {
    padding: 68px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-link {
    color: var(--brand);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.75);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.poster-link img,
.compact-card img,
.related-card img,
.rank-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .poster-link img,
.compact-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.type-badge,
.rating-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.type-badge {
    left: 12px;
    background: rgba(180, 83, 9, 0.92);
}

.rating-badge {
    right: 12px;
    background: rgba(17, 24, 39, 0.76);
}

.card-body {
    padding: 18px;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--brand);
}

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

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

.category-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid #fde68a;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #fffbeb);
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile span {
    margin-top: 18px;
    color: var(--brand);
    font-weight: 900;
}

.page-hero {
    margin: 34px 0 16px;
    padding: 44px;
    border-radius: 32px;
    color: #ffffff;
    background: radial-gradient(circle at 10% 20%, #fbbf24, transparent 28%), linear-gradient(135deg, #92400e, #b45309 48%, #f59e0b);
    box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(140px, 0.45fr)) auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid #fde68a;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(146, 64, 14, 0.07);
    margin: 22px 0 32px;
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    width: 100%;
    border: 1px solid #fcd34d;
    border-radius: 14px;
    outline: 0;
    padding: 0 14px;
    color: var(--text);
    background: #fffbeb;
}

.filter-bar button {
    padding: 0 20px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid #fde68a;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(146, 64, 14, 0.06);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #92400e);
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    height: 116px;
    border-radius: 16px;
    background: #fde68a;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-score {
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 900;
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(280px, 0.38fr);
    gap: 30px;
    margin: 34px 0 62px;
}

.player-card,
.detail-side,
.text-panel {
    border: 1px solid #fde68a;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    background: #111827;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(17,24,39,0.2), rgba(17,24,39,0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-layer button {
    min-width: 132px;
    min-height: 52px;
    padding: 0 26px;
    font-size: 17px;
}

.detail-title {
    padding: 24px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.detail-meta span {
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 13px;
}

.detail-side {
    padding: 20px;
    align-self: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    background: #fde68a;
}

.side-facts {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.side-facts div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #fef3c7;
}

.side-facts strong {
    color: #92400e;
}

.text-panel {
    padding: 28px;
    margin-bottom: 24px;
}

.text-panel h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 26px;
}

.text-panel p {
    margin: 0;
    color: #4b5563;
    line-height: 1.95;
    font-size: 16px;
}

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

.related-card,
.compact-card {
    overflow: hidden;
    border: 1px solid #fde68a;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(146, 64, 14, 0.06);
}

.related-card img,
.compact-card img {
    aspect-ratio: 3 / 4;
    background: #fde68a;
}

.related-card span,
.compact-card span {
    display: block;
    padding: 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.breadcrumb {
    margin: 28px 0 0;
    color: #92400e;
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.empty-result {
    display: none;
    padding: 32px;
    border-radius: 24px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.empty-result.show {
    display: block;
}

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

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

    .detail-shell {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero,
    .hero-slider {
        min-height: 860px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 34px;
    }

    .hero-art {
        max-width: 360px;
    }

    .hero-controls {
        bottom: 18px;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        display: inline-block;
        margin-top: 12px;
    }

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

@media (max-width: 640px) {
    .nav-shell,
    main,
    .hero-slider,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

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

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

    .page-hero {
        padding: 28px;
        border-radius: 24px;
    }

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

    .rank-score {
        grid-column: 2 / -1;
        font-size: 18px;
    }

    .rank-poster {
        height: 96px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h2,
    .card-body h3 {
        font-size: 16px;
    }

    .card-body p {
        min-height: 42px;
        font-size: 13px;
    }

    .detail-title,
    .text-panel {
        padding: 20px;
    }

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

.site-footer {
    margin-top: 54px;
    color: #fffbeb;
    background: linear-gradient(135deg, #78350f, #92400e 52%, #b45309);
}

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

.footer-brand {
    color: #fffbeb;
}

.site-footer p {
    max-width: 460px;
    color: #fde68a;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

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

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(253, 230, 138, 0.2);
    padding: 18px 0;
    color: #fde68a;
    text-align: center;
}
