:root {
    --bg: #f9fafb;
    --bg-soft: #f3f4f6;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --pink: #db2777;
    --blue: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f9fafb 0%, #eef2ff 100%);
    -webkit-font-smoothing: antialiased;
}

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.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.28);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

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

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--red);
    background: #fee2e2;
}

.nav-toggle {
    display: none;
    border: 0;
    background: #f3f4f6;
    color: var(--text);
    border-radius: 12px;
    padding: 9px 12px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 18px 76px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    color: #ffffff;
}

.hero-tags,
.meta-pills,
.card-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.hero-tags a {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span:first-child {
    background: var(--red);
}

.hero h1 {
    margin: 18px 0 8px;
    max-width: 820px;
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.hero h2 {
    margin: 8px 0 14px;
    max-width: 760px;
    font-size: clamp(30px, 4vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    font-size: 18px;
    color: #e5e7eb;
    line-height: 1.8;
}

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

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

.primary-button {
    min-height: 46px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.26);
}

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

.ghost-button {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.small-button {
    min-height: 40px;
    padding: 0 18px;
    white-space: nowrap;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 36px;
    line-height: 1;
    display: grid;
    place-items: center;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel,
.content-section,
.rank-section,
.page-shell,
.site-footer {
    max-width: 1280px;
    margin: 0 auto;
}

.search-panel {
    margin-top: -36px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.side-card h2,
.detail-card h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.global-search,
.filter-bar {
    display: flex;
    gap: 12px;
}

.global-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 15px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.global-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 4px #fee2e2;
}

.global-search button {
    min-width: 96px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    font-weight: 750;
}

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

.white-box,
.gradient-box,
.rank-section,
.rank-table-box,
.search-board,
.detail-card,
.player-card,
.side-card,
.category-overview-card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.white-box,
.rank-section,
.rank-table-box,
.search-board,
.detail-card,
.player-card,
.side-card,
.category-overview-card {
    background: var(--card);
}

.white-box,
.gradient-box,
.rank-section,
.rank-table-box,
.search-board {
    padding: 28px;
}

.gradient-box {
    background: linear-gradient(135deg, #eff6ff, #fdf2f8);
}

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

.section-heading a,
.text-button {
    color: var(--red);
    font-weight: 750;
}

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

.full-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 15px;
    background: #e5e7eb;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

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

.card-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
    transition: opacity 0.25s ease;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.75);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.poster-link:hover .card-shade,
.poster-link:hover .card-play {
    opacity: 1;
}

.poster-link:hover .card-play {
    transform: translate(-50%, -50%) scale(1);
}

.card-badge {
    position: absolute;
    top: 10px;
    padding: 5px 9px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.badge-year {
    left: 10px;
    background: var(--red);
}

.badge-type {
    right: 10px;
    background: rgba(17, 24, 39, 0.68);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 10px 2px 0;
}

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

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

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

.card-line {
    min-height: 3.1em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    margin-top: 8px;
}

.card-tags span,
.tag-cloud span,
.meta-pills span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 12px;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rank-list a {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.rank-no {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    font-weight: 850;
}

.rank-list strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-list em,
.compact-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.category-tile {
    min-height: 180px;
    padding: 22px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #7f1d1d);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.category-tile span {
    font-size: 24px;
    font-weight: 850;
}

.category-tile strong {
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 500;
}

.category-tile em {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-style: normal;
}

.category-tile em a {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
}

.page-shell {
    padding: 32px 18px 64px;
}

.page-hero {
    margin-bottom: 28px;
    padding: 42px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #991b1b, #db2777);
    box-shadow: var(--shadow);
}

.slim-hero,
.search-hero {
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.ranking-hero {
    background: linear-gradient(135deg, #1e3a8a, #7e22ce);
}

.category-hero {
    background: linear-gradient(135deg, #7f1d1d, #be185d);
}

.page-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 4vw, 52px);
    letter-spacing: -0.04em;
}

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

.breadcrumb {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.page-hero .breadcrumb {
    color: #fecaca;
}

.filter-bar {
    margin-bottom: 24px;
    align-items: center;
}

.filter-bar select {
    width: auto;
    min-width: 150px;
}

.filter-bar.wide {
    display: grid;
    grid-template-columns: 1fr repeat(3, minmax(140px, 180px));
}

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

.category-overview-card {
    padding: 26px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: center;
}

.category-overview-card span {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--red);
    background: #fee2e2;
    font-weight: 800;
}

.category-overview-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.45;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    transition: transform 0.2s ease, border 0.2s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    border-color: #fecaca;
}

.compact-card img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
    background: #e5e7eb;
}

.compact-card span {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.compact-card strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.search-board {
    padding: 28px;
}

.rank-table-box {
    margin-top: 28px;
    padding: 28px;
    overflow-x: auto;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.rank-table th {
    color: #374151;
    background: #f9fafb;
}

.rank-table a {
    color: var(--red);
    font-weight: 760;
}

.detail-shell {
    max-width: 1320px;
}

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

.detail-main {
    min-width: 0;
    display: grid;
    gap: 24px;
}

.player-card {
    padding: 10px;
    background: #050505;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #000000;
}

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

.video-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-cover span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 20px 42px rgba(220, 38, 38, 0.34);
}

.video-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.detail-title-row h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-title-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.meta-pills {
    margin: 0 0 24px;
}

.detail-card section {
    margin: 24px 0;
}

.detail-card p {
    color: #374151;
    line-height: 1.9;
}

.tag-cloud {
    margin-top: 20px;
}

.side-poster {
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #e5e7eb;
    box-shadow: var(--shadow);
}

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

.detail-side {
    position: sticky;
    top: 92px;
}

.related-block {
    padding: 26px;
    background: transparent;
}

.detail-pager {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.detail-pager a {
    padding: 12px 18px;
    border-radius: 14px;
    color: var(--red);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    font-weight: 750;
}

.site-footer {
    padding: 44px 18px;
    margin-top: 42px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.site-footer strong {
    color: var(--text);
    margin-right: 12px;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 700;
}

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

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

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

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 20px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 18px;
        right: 18px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .hero {
        height: 76vh;
        min-height: 520px;
    }

    .hero-content {
        padding-bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-left: 18px;
        margin-right: 18px;
    }

    .global-search,
    .filter-bar,
    .filter-bar.wide {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filter-bar select {
        width: 100%;
    }

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

    .rank-list,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 30px;
    }
}

@media (max-width: 620px) {
    .brand-text small {
        display: none;
    }

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

    .white-box,
    .gradient-box,
    .rank-section,
    .rank-table-box,
    .search-board,
    .detail-card,
    .side-card,
    .category-overview-card {
        padding: 18px;
    }

    .content-section,
    .rank-section {
        padding-top: 40px;
    }

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

    .detail-title-row {
        display: grid;
    }

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

    .side-poster {
        max-width: 280px;
    }

    .site-footer {
        align-items: start;
        flex-direction: column;
    }
}
