:root {
    --bg: #fff7f7;
    --surface: #ffffff;
    --surface-strong: #fff1f1;
    --text: #1f2937;
    --muted: #6b7280;
    --light: #f9fafb;
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-soft: rgba(220, 38, 38, 0.12);
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(127, 29, 29, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.18), transparent 32rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(220, 38, 38, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.32);
}

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

.brand-text strong {
    font-size: 22px;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--red), var(--red-dark));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    font-style: normal;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    position: relative;
    color: #374151;
    font-weight: 700;
    padding: 10px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 2px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red), var(--orange));
    transition: right 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--red);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    right: 0;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 180px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    border: 1px solid rgba(220, 38, 38, 0.14);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
}

.dropdown-link:hover {
    color: var(--red);
    background: var(--red-soft);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--red-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 21px;
    height: 2px;
    background: var(--red);
    border-radius: 999px;
}

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

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.hero-section {
    position: relative;
    min-height: 680px;
    padding: 46px 0 34px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(220, 38, 38, 0.26), transparent 28rem),
        radial-gradient(circle at 86% 0%, rgba(249, 115, 22, 0.18), transparent 25rem),
        linear-gradient(135deg, #fff7f7 0%, #ffffff 44%, #fee2e2 100%);
}

.hero-stage {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 22px;
}

.hero-slide {
    display: none;
    min-height: 470px;
    grid-template-columns: 0.86fr 1.14fr;
    align-items: center;
    gap: 44px;
    padding: 34px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(220, 38, 38, 0.16);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.hero-slide.is-active {
    display: grid;
    animation: fadeUp 0.48s ease both;
}

.hero-media {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 80px rgba(127, 29, 29, 0.24);
    transform: rotate(-1.5deg);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.34));
}

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

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

.hero-content h1,
.page-hero h1,
.detail-main h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    color: #111827;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    color: #4b5563;
    font-size: 18px;
    max-width: 760px;
}

.hero-tags,
.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #7f1d1d;
    background: #fee2e2;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.32);
}

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

.primary-btn.slim {
    min-height: 40px;
    padding: 0 16px;
}

.ghost-btn {
    color: var(--red);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(220, 38, 38, 0.26);
}

.ghost-btn.dark {
    background: #ffffff;
}

.hero-search {
    margin-top: -2px;
}

.hero-search form {
    display: flex;
    max-width: 760px;
    padding: 8px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.14);
    box-shadow: 0 16px 40px rgba(127, 29, 29, 0.12);
}

.hero-search input,
.filter-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #111827;
    background: transparent;
}

.hero-search input {
    padding: 0 18px;
}

.hero-search button {
    border: 0;
    color: #ffffff;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
}

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

.hero-thumb {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(220, 38, 38, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    text-align: left;
    color: #4b5563;
}

.hero-thumb img {
    width: 46px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-thumb span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.hero-thumb.is-active {
    color: var(--red);
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.14);
}

.content-section,
.page-hero,
.detail-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 42px 0;
}

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

.section-title p {
    margin: 0 0 5px;
    color: var(--red);
    font-weight: 800;
    font-size: 13px;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--red);
    font-weight: 800;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--red), #7f1d1d);
    color: #ffffff;
    min-height: 156px;
    padding: 24px;
    box-shadow: 0 22px 55px rgba(127, 29, 29, 0.22);
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #f97316, #b91c1c);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #7c3aed, #b91c1c);
}

.category-tile strong {
    display: block;
    font-size: 23px;
    margin-bottom: 10px;
}

.category-tile span {
    color: rgba(255, 255, 255, 0.82);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(220, 38, 38, 0.1);
    box-shadow: 0 14px 40px rgba(127, 29, 29, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(127, 29, 29, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #fee2e2;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.52));
}

.play-dot,
.rank-badge {
    position: absolute;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 38px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 13px;
}

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

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 7px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--red);
}

.movie-card p {
    min-height: 44px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-card .tag-row {
    margin: 12px 0 0;
}

.movie-card .tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 110px 1fr;
}

.movie-card-compact .poster-wrap {
    aspect-ratio: auto;
    height: 100%;
    min-height: 156px;
}

.page-hero {
    margin-top: 34px;
    padding: 54px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(254, 226, 226, 0.82));
    border: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: var(--shadow);
}

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

.filter-panel {
    display: grid;
    gap: 14px;
    margin-top: 26px;
}

.filter-panel input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.16);
    box-shadow: 0 10px 30px rgba(127, 29, 29, 0.08);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-actions button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #7f1d1d;
    background: #fee2e2;
    font-weight: 800;
    cursor: pointer;
}

.filter-actions button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.empty-state {
    display: none;
    margin: 26px 0;
    padding: 22px;
    border-radius: 18px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

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

.overview-list {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(220, 38, 38, 0.12);
}

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

.category-overview-head span {
    color: var(--red);
    font-weight: 800;
}

.category-overview-head h2 {
    margin: 4px 0;
    font-size: 30px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

.mini-poster-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.mini-poster-row img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
}

.detail-shell {
    margin-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 18px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: stretch;
    padding: 34px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 25px 70px rgba(127, 29, 29, 0.18);
}

.detail-main {
    align-self: center;
}

.detail-main h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.detail-player-section {
    padding-top: 34px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

.player-cover strong {
    font-size: clamp(22px, 4vw, 42px);
}

.player-cover em {
    font-style: normal;
    opacity: 0.86;
}

.large-play {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 18px 45px rgba(220, 38, 38, 0.44);
}

.player-box.is-ready .player-cover {
    display: none;
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    margin: 0;
    color: #ffffff;
    text-align: center;
    pointer-events: none;
}

.detail-text {
    color: #374151;
    font-size: 17px;
}

.detail-text p {
    margin: 0 0 22px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.1);
    box-shadow: 0 12px 36px rgba(127, 29, 29, 0.06);
}

.detail-text h2 {
    margin: 20px 0 14px;
    font-size: 28px;
}

.site-footer {
    margin-top: 38px;
    padding: 44px 0 26px;
    color: #fee2e2;
    background: linear-gradient(135deg, #7f1d1d, #111827);
}

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

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 460px;
}

.site-footer h3 {
    color: #ffffff;
    margin: 0 0 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.78);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.62);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .mobile-toggle {
        display: flex;
    }

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

    .hero-section {
        min-height: auto;
        padding-top: 24px;
    }

    .hero-slide,
    .page-hero,
    .detail-grid {
        padding: 22px;
        border-radius: 26px;
    }

    .hero-media {
        max-width: 360px;
        margin: 0 auto;
    }

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

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

    .movie-card-compact {
        grid-template-columns: 96px 1fr;
    }
}

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

    .brand-text strong {
        font-size: 18px;
    }

    .hero-thumbs,
    .category-grid,
    .movie-grid,
    .ranking-grid,
    .mini-poster-row {
        grid-template-columns: 1fr;
    }

    .hero-search form {
        border-radius: 20px;
        flex-direction: column;
        gap: 8px;
    }

    .hero-search input {
        min-height: 46px;
    }

    .hero-search button {
        min-height: 46px;
    }

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

    .movie-card-compact .poster-wrap {
        aspect-ratio: 3 / 4;
    }

    .category-overview-head,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }
}
