:root {
    --color-primary: #dc2626;
    --color-primary-dark: #7f1d1d;
    --color-orange: #f97316;
    --color-amber: #f59e0b;
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #f3f4f6;
    --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.10);
    --shadow-hover: 0 22px 55px rgba(15, 23, 42, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
}

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

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

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

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #111827;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.55), transparent 26%), linear-gradient(135deg, #7f1d1d 0%, #b91c1c 38%, #f97316 100%);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-track {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.66fr);
    gap: 58px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(32px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-copy h1 {
    margin: 22px 0 16px;
    max-width: 760px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(17px, 2.1vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.centered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.centered {
    justify-content: center;
}

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

.primary-button {
    background: #ffffff;
    color: var(--color-primary-dark);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.cta-band a:hover {
    transform: translateY(-2px);
}

.ghost-button {
    border: 2px solid rgba(255, 255, 255, 0.78);
    color: #ffffff;
}

.ghost-button.dark {
    border-color: rgba(17, 24, 39, 0.12);
    color: #111827;
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
    aspect-ratio: 4 / 5;
    transform: rotate(1.5deg);
}

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

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

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 30px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-prev,
.hero-next,
.hero-dot {
    pointer-events: auto;
    border: 0;
    color: #ffffff;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 32px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
}

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

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

.soft-bg {
    width: 100%;
    max-width: none;
    padding: 72px max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 0;
    color: var(--color-muted);
}

.section-more {
    background: #fff7ed;
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.18);
}

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

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

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

.movie-card-link {
    display: block;
    height: 100%;
    border-radius: var(--radius-md);
    background: var(--color-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
}

.poster-frame {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

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

.movie-card-link:hover .poster-frame img {
    transform: scale(1.08);
}

.poster-badge,
.poster-year {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    bottom: 12px;
    background: var(--color-primary);
}

.poster-year {
    top: 12px;
    right: 12px;
    background: rgba(17, 24, 39, 0.70);
    backdrop-filter: blur(10px);
}

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

.movie-card-body h2,
.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

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

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

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

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

.category-tile {
    position: relative;
    min-height: 150px;
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -48px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.16);
}

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

.category-tile span {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 10px;
    color: #991b1b;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--color-muted);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
}

.rank-card,
.category-panel,
.detail-card,
.side-card {
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-card {
    padding: 28px;
}

.rank-card.full {
    grid-column: 1 / -1;
}

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

.compact-item {
    display: grid;
    grid-template-columns: auto 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-item:hover {
    background: #fff7ed;
    transform: translateX(3px);
}

.compact-item img {
    width: 86px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #fee2e2;
}

.compact-item strong,
.compact-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-item strong {
    font-size: 15px;
}

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

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
    color: #ffffff;
    font-weight: 900;
}

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

.category-panel {
    padding: 20px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-head h3 {
    margin: 0;
    font-size: 22px;
}

.panel-head a {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 800;
}

.cta-band {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 72px;
    padding: 42px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, #b91c1c, #f97316);
    color: #ffffff;
    box-shadow: var(--shadow-hover);
}

.cta-band h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 38px);
}

.cta-band p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.cta-band a {
    background: #ffffff;
    color: var(--color-primary);
}

.page-hero {
    position: relative;
    padding: 86px max(16px, calc((100% - 1180px) / 2));
    text-align: center;
    background: radial-gradient(circle at 75% 5%, rgba(253, 186, 116, 0.55), transparent 30%), linear-gradient(135deg, #7f1d1d, #dc2626 55%, #f97316);
    color: #ffffff;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
    background-size: 28px 28px;
}

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

.page-hero h1 {
    margin: 22px auto 16px;
    max-width: 920px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.category-page-hero .hero-actions,
.search-hero .hero-actions {
    margin-top: 28px;
}

.search-panel {
    max-width: 900px;
    margin: 30px auto 0;
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 110px;
    gap: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.search-panel input,
.search-panel select,
.search-panel button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    outline: 0;
}

.search-panel input,
.search-panel select {
    background: #ffffff;
    color: #111827;
}

.search-panel button {
    background: #111827;
    color: #ffffff;
    font-weight: 800;
}

.search-status {
    margin-bottom: 22px;
    color: var(--color-muted);
    font-weight: 700;
}

.searchable-card.hidden {
    display: none;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--color-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--color-primary);
    font-weight: 800;
}

.watch-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
    color: #ffffff;
    text-align: center;
}

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

.play-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-orange));
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.38);
    font-size: 28px;
    padding-left: 4px;
}

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

.detail-card {
    margin-top: 24px;
    padding: 30px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4.6vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.detail-meta span,
.detail-meta a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.detail-card section {
    margin-top: 26px;
}

.detail-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.side-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    background: #fee2e2;
}

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

.side-card {
    margin-top: 22px;
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.detail-related {
    padding-top: 54px;
}

.site-footer {
    margin-top: 30px;
    background: #111827;
    color: #e5e7eb;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner strong {
    color: #ffffff;
    font-size: 18px;
}

.footer-inner p {
    margin: 6px 0 0;
    color: #9ca3af;
}

.footer-inner nav {
    color: #fca5a5;
    font-size: 14px;
}

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

    .watch-layout,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .watch-side {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 22px;
    }

    .side-card {
        margin-top: 0;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .hero-slider,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
        padding: 74px 0 90px;
    }

    .hero-poster {
        max-width: 280px;
        margin: 0 auto;
        transform: none;
    }

    .section-heading,
    .cta-band,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .watch-side {
        grid-template-columns: 1fr;
    }
}

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

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

    .brand-text em {
        display: none;
    }

    .hero-slider,
    .hero-track {
        min-height: 720px;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-controls {
        bottom: 18px;
    }

    .hero-prev,
    .hero-next {
        width: 38px;
        height: 38px;
        font-size: 26px;
    }

    .section-block,
    .soft-bg {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .movie-grid,
    .category-movie-grid,
    .category-grid,
    .category-grid.large,
    .category-stack {
        grid-template-columns: 1fr;
    }

    .compact-item {
        grid-template-columns: auto 74px minmax(0, 1fr);
    }

    .compact-item img {
        width: 74px;
        height: 58px;
    }

    .detail-card,
    .rank-card,
    .side-card {
        padding: 20px;
    }

    .cta-band {
        padding: 28px;
    }
}
