:root {
    --red: #dc2626;
    --red-dark: #b91c1c;
    --orange: #ea580c;
    --amber: #fbbf24;
    --slate: #0f172a;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 45%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon,
.footer-brand span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.brand-name {
    font-size: 20px;
    line-height: 1;
    background: linear-gradient(90deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    color: transparent;
}

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

.nav-link {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #374151;
}

.mobile-nav {
    display: none;
    padding: 8px 24px 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav.open {
    display: grid;
    gap: 6px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    color: #374151;
}

.mobile-link:hover {
    background: #fef2f2;
    color: var(--red);
}

.hero {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 42%, #f97316 100%);
}

.hero-pattern,
.page-hero::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: auto, 60px 60px, 60px 60px;
    opacity: 0.42;
}

.hero-stage {
    position: relative;
    max-width: 1280px;
    min-height: 540px;
    margin: 0 auto;
    padding: 72px 24px 86px;
}

.hero-slide {
    position: absolute;
    inset: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
    align-items: center;
    gap: 56px;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
    max-width: 780px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-list,
.quick-filters,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-pill {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.hero-actions {
    margin-top: 28px;
}

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

.primary-btn {
    color: var(--red);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(88, 28, 15, 0.36);
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

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

.hero-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    border: 0 !important;
    padding: 0;
    background: rgba(255, 255, 255, 0.45) !important;
}

.hero-dot.active {
    width: 28px !important;
    background: #ffffff !important;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red-dark), var(--red), var(--orange));
}

.page-hero > div {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 76px 24px;
}

.compact-hero > div,
.category-hero > div {
    padding-top: 58px;
    padding-bottom: 58px;
}

.search-panel,
.content-section,
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
}

.search-panel {
    display: grid;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.search-box span {
    color: var(--red);
    font-size: 22px;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.quick-filters button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: #4b5563;
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.quick-filters button.active,
.quick-filters button:hover {
    color: #ffffff;
    border-color: var(--red);
    background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.section-heading h2 {
    margin: 0 0 5px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

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

.section-more,
.text-link {
    min-height: 38px;
    color: var(--red);
    background: #fef2f2;
}

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

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

.year-badge,
.rank-badge,
.play-mark {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.year-badge {
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    color: var(--red);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.play-mark {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: var(--red);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 7px;
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 15px;
    line-height: 1.35;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.card-desc {
    margin-top: 8px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-section {
    border-radius: 26px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.ranking-row img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.ranking-meta {
    color: var(--muted);
    font-size: 13px;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid var(--line);
}

.category-tile {
    min-height: 250px;
    color: #ffffff;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(127, 29, 29, 0.92));
}

.category-tile > div {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 22px;
}

.category-tile h3,
.category-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile p,
.category-card p {
    margin: 0;
    line-height: 1.7;
}

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

.tile-links a,
.category-mini-links a {
    max-width: 100%;
    overflow: hidden;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.category-card {
    display: grid;
    grid-template-columns: 170px 1fr;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    min-height: 210px;
    background: #fee2e2;
}

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

.category-card-body {
    padding: 22px;
}

.category-mini-links a {
    color: var(--red);
    background: #fef2f2;
}

.detail-wrap {
    padding-top: 28px;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.player-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.player-card.is-playing .player-overlay {
    display: none;
}

.player-start {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--red);
    background: rgba(255, 255, 255, 0.94);
    font-size: 30px;
    box-shadow: var(--shadow);
}

.player-overlay strong {
    max-width: 80%;
    text-align: center;
    font-size: clamp(20px, 3vw, 32px);
}

.detail-panel,
.aside-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-panel {
    padding: 28px;
}

.detail-panel h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
}

.detail-panel h2 {
    margin: 28px 0 12px;
    font-size: 22px;
}

.detail-panel p {
    margin: 0;
    color: #374151;
    line-height: 1.95;
    font-size: 16px;
}

.detail-meta a,
.detail-meta span {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--red);
    background: #fef2f2;
    font-size: 14px;
    font-weight: 800;
}

.tag-list {
    margin-top: 18px;
}

.tag-pill {
    color: var(--red);
    background: #fff7ed;
}

.lead-text {
    padding: 18px 20px;
    border-left: 4px solid var(--red);
    border-radius: 14px;
    background: #fef2f2;
    font-size: 18px !important;
    font-weight: 700;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 20px;
}

.aside-card {
    padding: 18px;
}

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

.poster-side h2 {
    margin: 16px 0 6px;
    font-size: 22px;
}

.poster-side p {
    margin: 0;
    color: var(--muted);
}

.side-list {
    display: grid;
    gap: 12px;
}

.aside-card .ranking-row {
    grid-template-columns: 30px 46px minmax(0, 1fr);
    padding: 8px;
}

.aside-card .ranking-row img {
    width: 46px;
    height: 62px;
}

.aside-card .ranking-meta {
    display: none;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #0f172a 60%, #1f2937);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

.footer-grid p {
    margin: 12px 0 0;
    line-height: 1.8;
    color: #94a3b8;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #ffffff;
}

.footer-brand {
    color: #ffffff !important;
    font-size: 20px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 14px;
}

.hidden-by-filter {
    display: none !important;
}

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

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero-stage {
        min-height: 760px;
        padding-top: 42px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-poster {
        max-width: 300px;
    }

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

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

    .ranking-row {
        grid-template-columns: 36px 52px minmax(0, 1fr);
    }

    .ranking-meta {
        display: none;
    }

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

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

@media (max-width: 560px) {
    .nav-shell,
    .hero-stage,
    .search-panel,
    .content-section,
    .detail-wrap,
    .page-hero > div,
    .footer-grid,
    .footer-bottom {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-name {
        font-size: 17px;
    }

    .hero {
        min-height: 780px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p {
        font-size: 16px;
    }

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

    .card-body {
        padding: 12px;
    }

    .category-grid,
    .category-overview-grid,
    .detail-aside,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-panel {
        padding: 20px;
    }

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