:root {
    --bg: #fffaf1;
    --surface: #ffffff;
    --surface-soft: #fff3df;
    --ink: #1f2937;
    --muted: #6b7280;
    --brand: #f59e0b;
    --brand-dark: #d97706;
    --accent: #f97316;
    --line: #fde68a;
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #9a3412;
    white-space: nowrap;
}

.site-logo__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.34);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    color: #713f12;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}

.top-search,
.mobile-panel form,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    border: 2px solid #fde68a;
    border-radius: 999px;
    padding: 11px 16px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
    transition: 0.24s ease;
}

.top-search input {
    width: 220px;
}

.top-search input:focus,
.mobile-panel input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.top-search button,
.mobile-panel button,
.wide-search button,
.btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.top-search button,
.mobile-panel button,
.wide-search button,
.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.26);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.btn:hover,
.top-search button:hover,
.mobile-panel button:hover,
.wide-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(249, 115, 22, 0.32);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 24px;
}

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

.mobile-panel a {
    display: block;
    padding: 12px 0;
    font-weight: 700;
    color: #713f12;
}

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-slide__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.26), transparent 36%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.72) 42%, rgba(17, 24, 39, 0.18) 100%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 420px;
    gap: 56px;
    align-items: center;
}

.hero-slide__text {
    color: #ffffff;
}

.eyebrow,
.section-head span,
.page-hero span {
    display: inline-block;
    margin-bottom: 12px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-slide h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-slide p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-card__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

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

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    border: 8px solid rgba(255, 255, 255, 0.18);
}

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: 0.24s ease;
}

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

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

.quick-search {
    padding: 52px 0 28px;
}

.wide-search {
    max-width: 820px;
    margin: 26px auto 0;
    padding: 8px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.wide-search input {
    flex: 1;
    border: 0;
    box-shadow: none;
    font-size: 16px;
}

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

.section-block--soft {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto;
    padding: 48px;
    border-radius: 34px;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    box-shadow: var(--shadow);
}

.section-block--tight {
    padding-top: 26px;
}

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

.section-head--center {
    display: block;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #431407;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.quick-search p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.section-head a {
    color: #d97706;
    font-weight: 900;
}

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

.category-card,
.category-overview {
    position: relative;
    min-height: 180px;
    padding: 20px;
    border-radius: 24px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-card::after,
.category-overview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.76));
}

.category-card img,
.category-overview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.36s ease;
}

.category-card:hover img,
.category-overview:hover img {
    transform: scale(1.08);
}

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

.category-card span,
.category-overview span {
    display: block;
    margin-top: 64px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p,
.category-overview p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.category-overview strong {
    display: block;
    margin-top: 10px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.11);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(120, 53, 15, 0.18);
}

.movie-card__cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.movie-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease;
}

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

.movie-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.86);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transition: 0.26s ease;
}

.movie-card:hover .movie-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card__type {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    font-size: 12px;
    font-weight: 800;
}

.movie-card__body {
    padding: 18px;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: #431407;
    font-size: 19px;
    line-height: 1.35;
}

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

.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    transition: 0.24s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    background: #ffffff;
    box-shadow: 0 14px 26px rgba(120, 53, 15, 0.12);
}

.ranking-item__num {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-weight: 900;
}

.ranking-item img {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-item__text strong,
.ranking-item__text em {
    display: block;
}

.ranking-item__text strong {
    color: #431407;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item__text em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.page-hero {
    margin: 22px 0 28px;
    padding: 54px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.35), transparent 34%),
        linear-gradient(135deg, #431407, #9a3412 60%, #f59e0b);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero--compact {
    padding: 42px;
}

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

.page-hero p {
    max-width: 780px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 220px;
    gap: 12px;
    margin: 22px 0;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(120, 53, 15, 0.09);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 28px 0 18px;
    color: #92400e;
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 42px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.22), transparent 34%),
        linear-gradient(135deg, #fff7ed, #ffffff);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 54px rgba(120, 53, 15, 0.22);
}

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

.detail-one-line {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

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

.detail-tags {
    margin-bottom: 24px;
}

.player-section {
    margin: 34px 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: 0 26px 60px rgba(17, 24, 39, 0.28);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.56));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-size: 34px;
    box-shadow: 0 20px 46px rgba(249, 115, 22, 0.42);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.detail-content article,
.detail-content aside {
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.09);
}

.detail-content h2 {
    margin: 0 0 14px;
    color: #431407;
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 28px;
    color: #4b5563;
    line-height: 1.9;
    font-size: 17px;
}

.detail-content aside a {
    display: block;
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    color: #92400e;
    background: #fff7ed;
    font-weight: 800;
}

.site-footer {
    margin-top: 64px;
    color: #fffbeb;
    background: linear-gradient(135deg, #78350f, #7c2d12);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner p {
    max-width: 520px;
    color: #fde68a;
    line-height: 1.75;
}

.footer-logo {
    color: #ffffff;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

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

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(253, 230, 138, 0.22);
    color: #fcd34d;
    text-align: center;
}

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

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

    .hero-poster {
        display: none;
    }

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

    .ranking-grid,
    .ranking-list-large {
        grid-template-columns: 1fr;
    }
}

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

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

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

    .hero-carousel {
        height: 560px;
    }

    .hero-slide__content {
        gap: 0;
        padding: 56px 0 70px;
    }

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

    .section-block--soft,
    .page-hero,
    .detail-hero {
        padding: 28px;
        border-radius: 26px;
    }

    .section-head {
        display: block;
    }

    .section-head a {
        display: inline-block;
        margin-top: 10px;
    }

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

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

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 22px;
    }
}

@media (max-width: 560px) {
    .site-header__inner {
        height: 64px;
    }

    .site-logo {
        font-size: 20px;
    }

    .site-logo__icon {
        width: 36px;
        height: 36px;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-slide p {
        font-size: 15px;
    }

    .hero-actions,
    .wide-search {
        align-items: stretch;
        flex-direction: column;
        border-radius: 26px;
    }

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

    .ranking-item {
        grid-template-columns: 38px 60px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 60px;
        height: 48px;
    }

    .detail-info h1,
    .page-hero h1 {
        font-size: 34px;
    }
}
