:root {
    --red-950: #450a0a;
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-100: #fef3c7;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 22px 45px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 12px 28px rgba(17, 24, 39, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-900);
    background: linear-gradient(180deg, #fff 0%, #fff7ed 45%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(127, 29, 29, 0.14);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red-700), var(--amber-600));
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.28);
}

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

.brand-text strong,
.footer-brand strong {
    font-size: 22px;
    color: transparent;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--red-900), var(--amber-700));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text em {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 12px;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a {
    padding: 10px 13px;
    color: var(--gray-700);
    white-space: nowrap;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--red-800);
    background: rgba(254, 226, 226, 0.8);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: rgba(254, 226, 226, 0.85);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--red-800);
    border-radius: 99px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: var(--white);
    background: linear-gradient(115deg, #450a0a 0%, #7f1d1d 45%, #92400e 100%);
}

.hero-pattern,
.page-hero::before,
.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: 0.22;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255, 255, 255, 0.12) 50px, rgba(255, 255, 255, 0.12) 51px), radial-gradient(circle at 25% 20%, rgba(251, 191, 36, 0.55), transparent 28%), radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.44), transparent 34%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-slides {
    width: 100%;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 54px;
}

.hero-slide.active {
    display: grid;
    animation: fadeIn 0.45s ease both;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #fee2e2;
    border: 1px solid rgba(254, 226, 226, 0.34);
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.5);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--red-700);
    border-color: rgba(220, 38, 38, 0.16);
    background: rgba(254, 226, 226, 0.72);
}

.hero-copy h1 {
    margin: 20px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #fecaca;
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-list span,
.info-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.14);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--red-600), var(--amber-600));
    box-shadow: 0 14px 26px rgba(185, 28, 28, 0.24);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
}

.btn-lite {
    color: var(--red-800);
    background: #fee2e2;
}

.btn-full {
    width: 100%;
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 32px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster::after {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), transparent);
}

.hero-poster img {
    width: 100%;
    height: min(520px, 58vw);
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 58px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.section {
    padding: 74px 0;
}

.section-soft {
    background: linear-gradient(90deg, #fff1f2, #fffbeb);
}

.section-categories {
    background: linear-gradient(180deg, #f9fafb, #ffffff);
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-heading h2,
.category-overview-head h2 {
    margin: 12px 0 8px;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
}

.section-heading p,
.category-overview-head p {
    max-width: 760px;
    margin: 0;
    color: var(--gray-600);
    line-height: 1.75;
}

.section-more {
    flex: none;
    color: var(--red-700);
    font-weight: 900;
}

.featured-grid,
.movie-grid,
.ranking-grid,
.category-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

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

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

.movie-card,
.category-tile,
.side-card,
.detail-main,
.category-overview-block {
    border: 1px solid rgba(127, 29, 29, 0.1);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: var(--shadow);
    transform: translateY(-7px);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-cover {
    position: relative;
    overflow: hidden;
    margin: 0;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #fee2e2, #fef3c7);
}

.movie-card-wide .movie-card-link,
.movie-card-compact .movie-card-link {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    height: 100%;
}

.movie-card-wide .movie-cover,
.movie-card-compact .movie-cover {
    height: 100%;
    min-height: 154px;
    aspect-ratio: auto;
}

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

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

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    padding: 0 8px;
    color: var(--white);
    border-radius: 999px;
    background: var(--red-600);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(185, 28, 28, 0.28);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-line span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--gray-100);
}

.movie-card h3 {
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list span {
    color: var(--red-700);
    background: #fee2e2;
}

.category-tile {
    padding: 26px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile a:first-child {
    display: block;
}

.category-tile span {
    color: var(--red-700);
    font-weight: 900;
}

.category-tile strong {
    display: block;
    margin: 10px 0;
    color: var(--gray-900);
    font-size: 34px;
}

.category-tile p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.75;
}

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-mini-links a {
    max-width: 100%;
    overflow: hidden;
    padding: 6px 10px;
    color: var(--red-800);
    border-radius: 999px;
    background: #fee2e2;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    color: var(--white);
    background: linear-gradient(115deg, var(--red-950), var(--red-800), var(--amber-700));
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    margin: 16px 0 16px;
    font-size: clamp(38px, 5vw, 62px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #fee2e2;
    font-size: 18px;
    line-height: 1.8;
}

.page-hero .eyebrow {
    color: #fffbeb;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

.overview-list {
    padding: 60px 0 80px;
}

.category-overview-block {
    padding: 28px;
    margin-bottom: 28px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(127, 29, 29, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 900;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    color: var(--gray-900);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--red-600);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.result-count {
    margin-bottom: 20px;
    color: var(--gray-600);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--gray-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 38px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #fee2e2;
    font-size: 14px;
}

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

.detail-title-wrap {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.detail-cover {
    width: 230px;
    height: 310px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.36);
}

.detail-title-wrap h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-title-wrap p {
    max-width: 780px;
    color: #fee2e2;
    font-size: 18px;
    line-height: 1.75;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    border: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red-600), var(--amber-600));
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.32);
}

.play-icon::before {
    display: block;
    width: 0;
    height: 0;
    margin: 23px 0 0 29px;
    content: "";
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 22px solid var(--white);
}

.play-overlay strong {
    font-size: 18px;
}

.detail-content {
    padding: 30px;
}

.info-pills {
    margin-bottom: 28px;
}

.info-pills span {
    color: var(--red-700);
    background: #fee2e2;
}

.detail-content h2,
.side-card h2 {
    margin: 0 0 16px;
    color: var(--gray-900);
    font-size: 24px;
}

.detail-content p {
    margin: 0 0 28px;
    color: var(--gray-700);
    font-size: 16px;
    line-height: 2;
    text-align: justify;
}

.detail-sidebar {
    position: sticky;
    top: 98px;
}

.side-card {
    padding: 22px;
}

.related-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.related-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: #fff7ed;
}

.related-item img {
    width: 88px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    background: #fee2e2;
}

.related-item strong,
.related-item em {
    display: block;
}

.related-item strong {
    overflow: hidden;
    color: var(--gray-900);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-item em {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    padding: 56px 0;
    color: #d1d5db;
    background: linear-gradient(180deg, var(--gray-900), var(--gray-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.2fr;
    gap: 42px;
}

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

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #fbbf24;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

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

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

    .detail-sidebar {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .site-nav a {
        padding: 13px 14px;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 54px 0 86px;
    }

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

    .hero-poster {
        max-width: 460px;
        transform: none;
    }

    .movie-grid,
    .featured-grid,
    .small-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-title-wrap h1 {
        letter-spacing: -0.03em;
    }

    .hero-copy p,
    .page-hero p,
    .detail-title-wrap p {
        font-size: 16px;
    }

    .section {
        padding: 50px 0;
    }

    .section-heading,
    .category-overview-head {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 14px;
    }

    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .ranking-page-grid,
    .category-grid,
    .small-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-compact .movie-card-link,
    .movie-card-wide .movie-card-link {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .movie-card-compact .movie-cover,
    .movie-card-wide .movie-cover {
        min-height: 142px;
    }

    .detail-cover {
        width: 180px;
        height: 240px;
    }

    .detail-content {
        padding: 22px;
    }
}
