:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-900: #7c2d12;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 8px 20px rgba(124, 45, 18, 0.08);
    --shadow-md: 0 18px 45px rgba(124, 45, 18, 0.14);
    --shadow-lg: 0 30px 70px rgba(124, 45, 18, 0.20);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--amber-50), var(--white) 38%, var(--orange-50));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
    border-bottom: 1px solid rgba(253, 186, 116, 0.55);
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner,
.section-inner,
.footer-inner,
.hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark,
.footer-logo span {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-400), var(--amber-600));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(4deg);
}

.brand-text strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--orange-600);
}

.brand-text small {
    display: block;
    color: var(--gray-600);
    font-size: 0.76rem;
}

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

.main-nav a {
    color: var(--gray-700);
    font-weight: 700;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--orange-600);
}

.header-search {
    position: relative;
    display: flex;
    width: 300px;
    border: 1px solid rgba(251, 146, 60, 0.45);
    border-radius: 999px;
    overflow: hidden;
    background: var(--white);
}

.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 14px 10px 18px;
    color: var(--gray-800);
}

.header-search button {
    border: 0;
    padding: 0 18px;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 14px;
    padding: 9px 12px;
    color: var(--orange-600);
    cursor: pointer;
    background: var(--orange-100);
}

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(253, 186, 116, 0.55), transparent 28%), linear-gradient(135deg, #fff7ed 0%, #ffedd5 52%, #f59e0b 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -38% 35%;
    height: 420px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    filter: blur(18px);
}

.hero-slider {
    position: relative;
    z-index: 1;
    min-height: 620px;
}

.hero-slide {
    display: none;
    min-height: 620px;
    align-items: center;
    gap: 54px;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
    padding: 64px 0;
}

.hero-slide.is-active {
    display: grid;
}

.hero-content {
    color: var(--gray-900);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--orange-700);
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(251, 146, 60, 0.35);
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero h1 span {
    color: var(--orange-600);
}

.hero-copy {
    max-width: 730px;
    margin: 0 0 28px;
    color: var(--gray-700);
    font-size: clamp(1.05rem, 2vw, 1.32rem);
}

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

.hero-tags span,
.tag-row span,
.poster-badge,
.detail-meta span,
.card-meta span,
.category-chip,
.rank-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-tags span,
.tag-row span {
    padding: 7px 12px;
    color: var(--orange-700);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(251, 146, 60, 0.28);
}

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

.button-primary,
.button-secondary,
.filter-button,
.search-submit,
.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.search-submit,
.play-overlay span {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 15px 32px rgba(249, 115, 22, 0.28);
}

.button-primary,
.button-secondary {
    min-height: 48px;
    padding: 0 24px;
}

.button-secondary {
    color: var(--orange-700);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(251, 146, 60, 0.32);
}

.button-primary:hover,
.button-secondary:hover,
.search-submit:hover,
.play-overlay:hover span {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-visual {
    position: relative;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    background: linear-gradient(135deg, var(--orange-100), var(--amber-200));
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(17, 24, 39, 0.76));
}

.hero-poster-caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 1;
    color: var(--white);
}

.hero-poster-caption strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 34px;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.hero-dots button {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(194, 65, 12, 0.28);
}

.hero-dots button.is-active {
    background: var(--orange-600);
}

.section {
    padding: 70px 0;
}

.section.alt {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.68), rgba(254, 243, 199, 0.76));
}

.section.orange {
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--amber-600));
}

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

.section-header.centered {
    display: block;
    text-align: center;
}

.section-kicker {
    margin: 0 0 8px;
    color: var(--orange-600);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section.orange .section-kicker,
.section.orange .section-lead,
.section.orange .section-header a {
    color: var(--amber-50);
}

.section-title {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.15;
}

.section.orange .section-title {
    color: var(--white);
}

.section-lead {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--gray-600);
    font-size: 1.05rem;
}

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

.movie-card {
    min-width: 0;
}

.movie-card a,
.category-card,
.info-card,
.search-card {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover,
.category-card:hover,
.info-card:hover,
.search-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.poster-wrap {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--orange-100), var(--amber-200));
}

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

.movie-card a:hover .poster-wrap img,
.wide-card a:hover img {
    transform: scale(1.08);
}

.poster-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 10px;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    font-size: 0.76rem;
    box-shadow: 0 8px 22px rgba(124, 45, 18, 0.18);
}

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

.card-meta,
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--gray-500);
    font-size: 0.8rem;
}

.card-meta span {
    padding: 4px 9px;
    color: var(--orange-700);
    background: var(--orange-50);
}

.movie-card h3,
.wide-card h3,
.rank-item h3,
.search-card h3 {
    margin: 10px 0 8px;
    color: var(--gray-900);
    line-height: 1.25;
}

.movie-card p,
.wide-card p,
.rank-item p,
.search-card p {
    margin: 0;
    color: var(--gray-600);
}

.card-foot {
    margin-top: 14px;
}

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

.wide-card a {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 0;
    overflow: hidden;
    min-height: 176px;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-card a:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.wide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.wide-card div {
    padding: 22px;
}

.wide-card span {
    color: var(--orange-600);
    font-weight: 900;
    font-size: 0.86rem;
}

.wide-card small {
    display: inline-flex;
    margin-right: 10px;
    color: var(--gray-500);
}

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

.category-card {
    padding: 28px;
    border: 1px solid rgba(251, 146, 60, 0.18);
}

.category-card strong {
    display: block;
    color: var(--orange-600);
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--gray-600);
}

.category-chip {
    padding: 7px 12px;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    font-size: 0.82rem;
}

.page-hero {
    padding: 64px 0;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(135deg, var(--orange-500), var(--amber-600));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.1;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--amber-50);
    font-size: 1.15rem;
}

.catalog-tools,
.search-panel {
    display: grid;
    grid-template-columns: 1fr 200px 200px;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.catalog-tools input,
.catalog-tools select,
.search-panel input {
    width: 100%;
    border: 1px solid rgba(251, 146, 60, 0.28);
    border-radius: 999px;
    outline: 0;
    padding: 12px 16px;
    color: var(--gray-800);
    background: var(--white);
}

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

.search-submit {
    border: 0;
    min-height: 48px;
    padding: 0 26px;
    cursor: pointer;
}

.empty-state {
    display: none;
    margin: 32px 0 0;
    padding: 24px;
    border-radius: 20px;
    color: var(--gray-600);
    background: var(--white);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

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

.rank-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 74px 86px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.rank-number {
    color: var(--orange-600);
    font-size: 1.4rem;
    font-weight: 1000;
    text-align: center;
}

.rank-item img {
    width: 86px;
    height: 112px;
    object-fit: cover;
    border-radius: 16px;
    background: var(--orange-100);
}

.rank-tag {
    padding: 6px 10px;
    color: var(--orange-700);
    background: var(--orange-50);
    font-size: 0.82rem;
}

.detail-hero {
    padding: 54px 0;
    background: linear-gradient(135deg, var(--amber-50), var(--orange-100));
}

.detail-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--orange-100), var(--amber-200));
    box-shadow: var(--shadow-lg);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--orange-700);
    font-weight: 800;
}

.detail-content h1 {
    margin: 0 0 18px;
    color: var(--gray-900);
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.12;
}

.detail-lead {
    margin: 0 0 22px;
    color: var(--gray-700);
    font-size: 1.2rem;
}

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

.detail-meta span {
    padding: 8px 13px;
    color: var(--orange-700);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(251, 146, 60, 0.24);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.58));
}

.play-overlay span {
    width: 96px;
    height: 96px;
    font-size: 2.4rem;
    padding-left: 6px;
}

.play-overlay.is-hidden {
    display: none;
}

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

.story-card,
.side-panel,
.info-card {
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.story-card {
    padding: 30px;
}

.story-card h2,
.side-panel h2,
.info-card h2 {
    margin: 0 0 16px;
    color: var(--gray-900);
}

.story-card p {
    margin: 0 0 18px;
    color: var(--gray-700);
    font-size: 1.05rem;
}

.side-panel {
    padding: 24px;
    align-self: start;
}

.side-panel ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-panel a {
    display: block;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--gray-700);
    background: var(--amber-50);
    transition: color 0.2s ease, background 0.2s ease;
}

.side-panel a:hover {
    color: var(--orange-700);
    background: var(--orange-100);
}

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

.related-grid .movie-card-body {
    padding: 13px;
}

.related-grid .movie-card p,
.related-grid .card-foot {
    display: none;
}

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

.search-card a {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 16px;
    padding: 14px;
}

.search-card img {
    width: 116px;
    height: 150px;
    object-fit: cover;
    border-radius: 18px;
    background: var(--orange-100);
}

.search-card small {
    color: var(--orange-600);
    font-weight: 900;
}

.site-footer {
    color: var(--amber-50);
    background: linear-gradient(135deg, var(--orange-900), #78350f);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.35rem;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 1rem;
}

.site-footer p,
.site-footer a {
    color: var(--amber-100);
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--white);
}

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

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

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

    .detail-layout,
    .detail-article {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 360px;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 70px;
        flex-wrap: wrap;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        margin: 0;
        padding: 0 0 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 10px 12px;
        border-radius: 14px;
        background: rgba(255, 237, 213, 0.75);
    }

    .hero-slide {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 42px 0 78px;
    }

    .hero-visual {
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-dots {
        bottom: 28px;
    }

    .section {
        padding: 48px 0;
    }

    .section-header {
        display: block;
    }

    .movie-grid,
    .category-grid,
    .wide-grid,
    .search-results,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item a {
        grid-template-columns: 54px 72px 1fr;
    }

    .rank-tag {
        display: none;
    }

    .rank-item img {
        width: 72px;
        height: 96px;
    }

    .search-card a {
        grid-template-columns: 96px 1fr;
    }

    .search-card img {
        width: 96px;
        height: 128px;
    }

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