* {
    box-sizing: border-box;
}

:root {
    --rose: #e11d48;
    --rose-dark: #be123c;
    --amber: #f59e0b;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f8fafc 100%);
    line-height: 1.6;
}

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

img,
video,
svg {
    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.95);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.brand:hover {
    color: var(--rose);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    color: #fff;
    box-shadow: 0 12px 26px rgba(225, 29, 72, 0.25);
}

.brand-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #374151;
    font-weight: 700;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
    color: var(--rose);
}

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

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 10px 2px;
    font-weight: 700;
    color: #374151;
}

.mobile-nav a:hover {
    color: var(--rose);
}

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: linear-gradient(90deg, #881337, #92400e);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-bg,
.rank-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
    color: #fff;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    max-width: 760px;
    line-height: 1.05;
}

.hero-content h1 {
    font-size: clamp(42px, 7vw, 76px);
    letter-spacing: -0.05em;
}

.hero-content h2 {
    margin-top: 10px;
    font-size: clamp(30px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-pill {
    margin-bottom: 18px;
    padding: 6px 14px;
    color: #fff;
    background: var(--rose);
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.28);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 24px;
    color: #fff;
    background: var(--rose);
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.25);
}

.primary-button:hover {
    background: var(--rose-dark);
    transform: translateY(-2px);
}

.ghost-button {
    min-height: 46px;
    padding: 0 22px;
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 420px) auto;
    gap: 10px;
    width: min(100%, 560px);
    margin-top: 28px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-search input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 12px;
    padding: 0 16px;
    min-height: 44px;
    color: #111827;
    background: #fff;
}

.hero-search button {
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    color: #fff;
    font-weight: 800;
    background: var(--rose);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.is-active {
    width: 34px;
    border-radius: 999px;
    background: #fff;
}

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

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

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

.section-heading h2,
.page-hero h1,
.rank-hero h1,
.detail-info h1,
.detail-main h2,
.detail-side h2,
.player-section h2 {
    margin: 0;
    color: #1f2937;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--rose);
}

.section-link,
.text-button {
    color: var(--rose);
}

.section-link:hover,
.text-button:hover {
    color: var(--rose-dark);
}

.compact-heading {
    margin-bottom: 18px;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff1f2, #fef3c7);
}

.movie-card-large .movie-poster {
    height: 310px;
}

.movie-card-compact .movie-poster {
    height: 190px;
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
    pointer-events: none;
}

.movie-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    background: var(--rose);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f9fafb;
}

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #9f1239;
    background: #fff1f2;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card,
.category-overview-card,
.seo-panel,
.filter-panel,
.detail-main,
.detail-side,
.player-section {
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.category-card {
    overflow: hidden;
    padding: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-covers,
.category-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 14px;
    min-height: 92px;
    background: linear-gradient(135deg, #fff1f2, #fef3c7);
}

.category-covers img,
.category-preview img {
    width: 100%;
    height: 112px;
    object-fit: cover;
}

.category-card h3,
.category-overview-card h2 {
    margin: 15px 0 6px;
    color: #1f2937;
}

.category-card p,
.category-overview-card p,
.seo-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    padding: 56px 0;
}

.rank-list,
.mini-grid {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 34px 58px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 8px 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.rank-item:hover {
    color: var(--rose);
}

.rank-item strong {
    color: var(--rose);
    font-size: 18px;
}

.rank-item img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #fff1f2;
}

.rank-item span {
    font-weight: 800;
    color: #1f2937;
}

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

.seo-panel {
    padding: 32px;
    background: linear-gradient(135deg, #fff, #fff1f2);
}

.seo-panel h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 4vw, 36px);
}

.seo-panel .primary-button {
    margin-top: 22px;
}

.sub-page {
    padding-bottom: 70px;
}

.page-hero {
    padding: 58px 0 34px;
}

.page-hero h1,
.rank-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p,
.rank-hero p {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.page-hero .breadcrumb {
    color: var(--muted);
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
    padding: 18px;
}

.category-preview {
    min-height: 170px;
}

.category-preview img {
    height: 170px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    color: #111827;
    background: #fff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.filter-empty {
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

.rank-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.rank-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
}

.rank-hero img {
    position: absolute;
    inset: 0;
}

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

.rank-hero h1,
.rank-hero p {
    color: #fff;
}

.rank-hero .primary-button {
    margin-top: 24px;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    background: #fff1f2;
}

.detail-info h1 {
    max-width: 820px;
    margin-top: 14px;
    color: #fff;
    font-size: clamp(34px, 5vw, 62px);
}

.detail-info p {
    max-width: 800px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.detail-info .primary-button {
    margin-top: 26px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    padding: 44px 0 70px;
}

.player-section {
    grid-column: 1 / -1;
    padding: 22px;
}

.player-section h2,
.detail-main h2,
.detail-side h2 {
    font-size: 26px;
}

.player-card {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 20px;
    background: #020617;
    aspect-ratio: 16 / 9;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

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

.play-ring {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 18px 38px rgba(225, 29, 72, 0.35);
    font-size: 28px;
    padding-left: 4px;
}

.play-cover strong {
    padding: 0 22px;
    font-size: 22px;
}

.detail-main,
.detail-side {
    padding: 26px;
}

.detail-main p {
    margin: 12px 0 28px;
    color: #374151;
    font-size: 17px;
}

.detail-side dl {
    margin: 16px 0 0;
}

.detail-side div {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.detail-side dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: 4px 0 0;
    color: #1f2937;
    font-weight: 700;
}

.related-section {
    grid-column: 1 / -1;
    padding-top: 20px;
}

.site-footer {
    background: linear-gradient(180deg, #f9fafb, #f3f4f6);
    border-top: 1px solid var(--line);
}

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

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.site-footer p,
.footer-links a,
.footer-bottom {
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--rose);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid #d1d5db;
    text-align: center;
}

[hidden] {
    display: none !important;
}

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

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

    .hero {
        height: auto;
        min-height: 640px;
    }

    .hero-content {
        padding: 86px 0 92px;
    }

    .hero-control {
        display: none;
    }

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

    .split-section,
    .detail-layout,
    .footer-inner,
    .detail-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        width: min(300px, 80vw);
        margin-top: 40px;
    }

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

@media (max-width: 640px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 19px;
    }

    .hero-content,
    .page-shell,
    .footer-inner,
    .footer-bottom,
    .rank-hero-content,
    .detail-inner {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

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

    .movie-poster,
    .movie-card-large .movie-poster,
    .movie-card-compact .movie-poster {
        height: 240px;
    }

    .detail-cover img {
        height: 390px;
    }

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

    .rank-item em {
        display: none;
    }
}
