:root {
    --bg: #fff8ec;
    --paper: #ffffff;
    --paper-soft: #fff3dc;
    --text: #3f130f;
    --muted: #8a4b32;
    --red: #9f1d1d;
    --red-dark: #6f1414;
    --amber: #d49a30;
    --amber-light: #ffe0a3;
    --line: rgba(141, 56, 28, 0.18);
    --shadow: 0 18px 48px rgba(90, 24, 18, 0.16);
    --radius: 24px;
}

* {
    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(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 220, 145, 0.45), transparent 32rem),
        linear-gradient(180deg, #fffaf1 0%, #fff3df 42%, #fff8ed 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 2px solid rgba(190, 116, 34, 0.35);
    background: linear-gradient(90deg, rgba(255, 250, 241, 0.96), rgba(255, 241, 219, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(89, 34, 14, 0.09);
}

.header-inner {
    max-width: 1240px;
    min-height: 78px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.logo-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 25px;
    background: linear-gradient(135deg, var(--red), var(--amber));
    box-shadow: 0 12px 28px rgba(159, 29, 29, 0.24);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text strong {
    font-size: 23px;
    letter-spacing: 0.04em;
    color: var(--red-dark);
}

.logo-text small {
    margin-top: 4px;
    font-size: 11px;
    color: #a66820;
    letter-spacing: 0.18em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--red-dark);
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
    position: relative;
    padding: 9px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--amber);
}

.desktop-nav a.is-active::after,
.desktop-nav a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--amber);
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--line);
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 14px;
    color: var(--red-dark);
    background: #fff;
    box-shadow: 0 10px 25px rgba(90, 24, 18, 0.1);
    cursor: pointer;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    color: var(--red-dark);
    font-weight: 700;
}

.mobile-nav.is-open {
    display: grid;
}

.hero-slider {
    position: relative;
    max-width: 1240px;
    min-height: 630px;
    margin: 28px auto 0;
    padding: 0 24px 88px;
}

.hero-slides {
    position: relative;
    min-height: 560px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #5a1414;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.56fr);
    align-items: center;
    gap: 36px;
    padding: 64px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-content {
    color: #fffaf0;
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 5px 13px;
    border-radius: 999px;
    color: #ffefc5;
    background: rgba(255, 216, 122, 0.16);
    border: 1px solid rgba(255, 223, 156, 0.35);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.hero-content h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    font-size: 19px;
    line-height: 1.9;
    color: rgba(255, 250, 239, 0.9);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 24px 65px rgba(10, 0, 0, 0.42);
    transform: rotate(2deg);
    border: 6px solid rgba(255, 240, 198, 0.32);
}

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

.hero-actions,
.detail-info .btn-primary {
    margin-top: 26px;
}

.btn-primary,
.btn-ghost,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--red), #c45b1d 52%, var(--amber));
    box-shadow: 0 16px 32px rgba(120, 28, 22, 0.22);
}

.btn-ghost {
    margin-left: 12px;
    color: #fff8e7;
    border: 1px solid rgba(255, 236, 188, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover {
    transform: translateY(-2px);
}

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

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

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 31px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

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

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

.hero-dots button.is-active {
    width: 28px;
    background: var(--amber-light);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(220px, 520px) auto;
    width: min(calc(100% - 48px), 720px);
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 250, 242, 0.92);
    box-shadow: 0 18px 45px rgba(91, 28, 13, 0.18);
    transform: translateX(-50%);
}

.hero-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid transparent;
    outline: none;
    color: var(--text);
    background: #fff;
}

.hero-search input {
    border-radius: 999px 0 0 999px;
    padding: 0 22px;
    background: transparent;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 13px 25px;
    color: #fff;
    font-weight: 800;
    background: var(--red);
    cursor: pointer;
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 58px 24px;
}

.warm-section {
    max-width: none;
    background: linear-gradient(90deg, rgba(255, 232, 184, 0.54), rgba(255, 244, 226, 0.75));
}

.warm-section > .section-heading,
.warm-section > .movie-grid {
    max-width: 1192px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-heading span {
    color: var(--amber);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1.1;
    color: var(--red-dark);
}

.section-link {
    color: var(--red-dark);
    border: 1px solid rgba(159, 29, 29, 0.18);
    background: #fff;
}

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(93, 35, 12, 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(212, 154, 48, 0.68);
    box-shadow: var(--shadow);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    background: #5a1414;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.055);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(103, 23, 20, 0.86);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.movie-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff0d5;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.35;
    color: var(--red-dark);
}

.movie-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag-row span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #7a3519;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 226, 166, 0.72);
}

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

.category-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 8px;
    padding: 22px;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    box-shadow: var(--shadow);
    background: var(--red-dark);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(90, 20, 20, 0.1), rgba(74, 18, 14, 0.96));
}

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

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

.category-card span,
.category-card strong {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card strong {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 249, 234, 0.88);
}

.rank-section {
    max-width: 1240px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(93, 35, 12, 0.07);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--amber));
}

.rank-thumb {
    overflow: hidden;
    border-radius: 16px;
}

.rank-thumb img {
    width: 86px;
    height: 118px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 7px;
    font-size: 20px;
    color: var(--red-dark);
}

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

.rank-item > strong {
    color: var(--amber);
    font-size: 22px;
}

.page-hero,
.detail-hero {
    max-width: 1240px;
    margin: 28px auto 0;
    padding: 56px 24px;
}

.simple-hero,
.category-hero {
    border-radius: 36px;
    color: #fff8eb;
    background:
        radial-gradient(circle at top right, rgba(255, 220, 131, 0.26), transparent 20rem),
        linear-gradient(135deg, #6c1212, #9e251d 52%, #bb7b23);
    box-shadow: var(--shadow);
}

.simple-hero h1,
.category-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.05;
}

.simple-hero p,
.category-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 250, 239, 0.88);
    font-size: 18px;
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    color: rgba(255, 250, 239, 0.88);
    font-weight: 700;
}

.category-overview {
    display: grid;
    gap: 28px;
}

.category-block {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(93, 35, 12, 0.07);
}

.category-block-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 20px;
}

.category-block h2 {
    margin: 0 0 8px;
    color: var(--red-dark);
    font-size: 28px;
}

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

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

.movie-card-compact .movie-body {
    padding: 15px;
}

.movie-card-compact .movie-card p,
.movie-card-compact p {
    -webkit-line-clamp: 2;
}

.search-panel {
    position: sticky;
    top: 92px;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 170px 170px;
    gap: 12px;
    padding: 14px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 250, 241, 0.94);
    box-shadow: 0 12px 28px rgba(93, 35, 12, 0.09);
    backdrop-filter: blur(14px);
}

.search-panel input,
.search-panel select {
    min-height: 48px;
    padding: 0 15px;
    border-radius: 15px;
    border-color: rgba(154, 59, 29, 0.18);
}

.search-empty {
    display: none;
    padding: 22px;
    margin-bottom: 20px;
    border-radius: 20px;
    color: var(--red-dark);
    background: #fff;
    box-shadow: 0 12px 28px rgba(93, 35, 12, 0.07);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    color: #fff8eb;
    border-radius: 36px;
    background:
        radial-gradient(circle at top right, rgba(255, 221, 143, 0.27), transparent 22rem),
        linear-gradient(135deg, #5a1111, #95211d 54%, #b67520);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    border: 7px solid rgba(255, 236, 189, 0.26);
    box-shadow: 0 24px 65px rgba(10, 0, 0, 0.38);
}

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

.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
}

.detail-one-line {
    max-width: 780px;
    color: rgba(255, 250, 239, 0.9);
    font-size: 19px;
    line-height: 1.9;
}

.detail-info .detail-meta span {
    color: #ffe9b5;
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 38px 24px 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-element,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-element {
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.72;
}

.play-orb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 36px;
    background: linear-gradient(135deg, var(--red), var(--amber));
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
    transform: translate(-50%, -50%);
}

.player-card.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-error {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 4;
    display: none;
    padding: 14px 16px;
    border-radius: 16px;
    color: #fff;
    background: rgba(128, 17, 17, 0.9);
}

.player-error.is-visible {
    display: block;
}

.detail-text {
    padding-top: 40px;
}

.detail-copy {
    max-width: 980px;
    padding: 30px;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(93, 35, 12, 0.07);
}

.detail-copy h2 {
    margin: 0 0 12px;
    color: var(--red-dark);
    font-size: 28px;
}

.detail-copy h2:not(:first-child) {
    margin-top: 28px;
}

.detail-copy p {
    margin: 0;
    color: #69301d;
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    margin-top: 48px;
    color: #ffeccc;
    background: linear-gradient(135deg, #681212, #8c1d1b 48%, #5a1111);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 24px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    font-size: 24px;
    color: #fff;
}

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
    color: rgba(255, 236, 204, 0.82);
    line-height: 1.8;
}

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

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

    .menu-toggle {
        display: flex;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 46px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .detail-hero {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 68px;
        padding: 0 16px;
    }

    .logo-mark {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .logo-text strong {
        font-size: 19px;
    }

    .mobile-nav {
        padding: 0 16px 18px;
    }

    .hero-slider {
        min-height: auto;
        margin-top: 16px;
        padding: 0 16px 88px;
    }

    .hero-slides {
        min-height: 570px;
        border-radius: 28px;
    }

    .hero-slide {
        padding: 34px 24px;
    }

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

    .hero-content p,
    .detail-one-line {
        font-size: 16px;
        line-height: 1.75;
    }

    .hero-controls {
        bottom: 102px;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .hero-search input {
        min-height: 44px;
        border-radius: 18px;
    }

    .content-section,
    .page-hero,
    .detail-hero,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading,
    .category-block-head,
    .footer-inner {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .movie-body {
        padding: 14px;
    }

    .movie-card h3 {
        font-size: 17px;
    }

    .movie-card p {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .rank-item {
        grid-template-columns: 44px 70px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-item > strong {
        display: none;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .rank-thumb img {
        width: 70px;
        height: 98px;
    }

    .rank-item p {
        display: none;
    }

    .search-panel {
        position: static;
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        border-radius: 28px;
    }

    .detail-poster {
        max-width: 240px;
    }

    .player-card {
        border-radius: 22px;
    }

    .play-orb {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-slides {
        min-height: 610px;
    }

    .btn-ghost {
        margin: 12px 0 0;
    }
}
