:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --accent: #f97316;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

body {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    font-size: 15px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

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

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

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.42) 46%, rgba(2, 6, 23, 0.12) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.52) 42%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 88px;
}

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

.hero-tags,
.detail-meta,
.card-meta,
.meta-row,
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
}

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

.hero-tags span:last-child {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.hero p {
    max-width: 720px;
    margin: 0 0 20px;
    color: #e5e7eb;
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.8;
}

.hero-meta {
    margin-bottom: 26px;
    color: #f9fafb;
    font-weight: 700;
}

.hero-meta span + span:before {
    content: "·";
    margin-right: 10px;
    color: rgba(255, 255, 255, 0.65);
}

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

.primary-button,
.secondary-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
}

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

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    transform: translateY(-50%);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
    transition: 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.55);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.search-panel {
    position: relative;
    z-index: 3;
    margin-top: -40px;
}

.search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-inner h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 900;
}

.search-inner p {
    margin: 0;
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #f9fafb;
    padding: 0 16px;
}

.search-box input {
    width: 100%;
    height: 52px;
    outline: none;
    background: transparent;
    font-size: 15px;
}

.page-stack {
    padding: 70px 0;
    display: grid;
    gap: 74px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.section-heading > span {
    width: 5px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    margin-top: 4px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

.poster-wrap img,
.wide-cover img,
.category-card img,
.overview-cover img,
.ranking-card img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img,
.movie-card:hover .wide-cover img,
.category-card:hover img,
.overview-cover:hover img {
    transform: scale(1.08);
}

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    font-weight: 900;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 26px;
    opacity: 0;
    background: rgba(2, 6, 23, 0.24);
    transition: opacity 0.22s ease;
}

.card-play:before {
    content: "";
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}

.card-play {
    text-shadow: 18px 0 transparent;
}

.card-play::after {
    content: "▶";
    position: relative;
    z-index: 2;
    color: var(--primary);
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-body {
    padding: 16px;
}

.card-body h3,
.wide-info h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p,
.wide-info p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    justify-content: space-between;
    color: #6b7280;
    font-size: 12px;
}

.soft-section {
    border-radius: 34px;
    padding: 34px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 138px;
}

.wide-cover {
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
}

.play-pill {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    font-weight: 900;
    font-size: 12px;
}

.wide-info {
    padding: 18px;
    display: grid;
    align-content: space-between;
    min-width: 0;
}

.meta-row {
    justify-content: space-between;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.small-meta {
    color: #6b7280;
    font-size: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

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

.category-card {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.16);
}

.category-card:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.12));
}

.category-card img {
    position: absolute;
    inset: 0;
}

.category-card div {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 1;
    color: #ffffff;
}

.category-card h3 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.6;
}

.rank-panel {
    position: sticky;
    top: 92px;
    border-radius: 28px;
    padding: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.rank-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.rank-head a,
.text-link {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 32px 52px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: #f3f4f6;
}

.rank-row strong {
    color: var(--primary);
    font-weight: 900;
}

.rank-row img {
    width: 52px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-row span {
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em,
.ranking-card em {
    color: #f59e0b;
    font-weight: 900;
    font-style: normal;
}

.top-page {
    padding-top: 72px;
}

.page-hero {
    padding: 86px 0 76px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.35), transparent 30%), linear-gradient(135deg, #0f172a, #1d4ed8 52%, #7c3aed);
}

.page-hero p {
    margin: 0 0 10px;
    font-weight: 900;
    color: #bfdbfe;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    font-weight: 900;
    letter-spacing: -0.06em;
}

.page-hero span {
    display: block;
    max-width: 760px;
    color: #dbeafe;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    border-radius: 26px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.overview-cover {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
    background: #e5e7eb;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.sample-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 800;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 58px 94px minmax(0, 1fr) 60px;
    gap: 18px;
    align-items: center;
    border-radius: 22px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.ranking-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.ranking-card strong {
    color: var(--primary);
    font-size: 24px;
    font-weight: 900;
}

.ranking-card img {
    width: 94px;
    height: 124px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 900;
}

.ranking-card p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.65;
}

.ranking-card span {
    color: #6b7280;
    font-size: 13px;
}

.detail-wrap {
    padding: 34px 0 80px;
    display: grid;
    gap: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: end;
    border-radius: 34px;
    padding: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.34), transparent 32%), linear-gradient(135deg, #020617, #111827 56%, #1e3a8a);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    background: #1f2937;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.detail-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 16px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list span {
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.22);
}

.player-section {
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 360px;
    background: #000000;
}

.movie-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    background: #000000;
}

.player-cover:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.player-cover span {
    position: relative;
    z-index: 3;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

.player-cover.is-hidden {
    display: none;
}

.movie-article {
    border-radius: 28px;
    padding: 34px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.movie-article h2 {
    margin: 0 0 12px;
    font-size: 25px;
    font-weight: 900;
}

.movie-article p {
    margin: 0 0 26px;
    color: #374151;
    font-size: 16px;
    line-height: 2;
}

.movie-article p:last-child {
    margin-bottom: 0;
}

.site-footer {
    padding: 46px 0;
    color: #d1d5db;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 16px;
}

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

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-weight: 900;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 9px 0;
    color: #9ca3af;
}

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

.filter-card.is-hidden {
    display: none;
}

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

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: relative;
        top: auto;
    }
}

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

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

    .hero {
        height: 720px;
        min-height: 720px;
    }

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

    .search-inner,
    .wide-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .home-grid,
    .compact-grid,
    .category-movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .movie-card-wide,
    .category-overview-card,
    .detail-hero,
    .ranking-card {
        grid-template-columns: 1fr;
    }

    .wide-cover,
    .ranking-card img {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
    }

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

    .player-shell {
        min-height: 230px;
    }

    .soft-section,
    .movie-article,
    .detail-hero {
        padding: 22px;
        border-radius: 24px;
    }
}

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

    .header-inner {
        height: 64px;
    }

    .brand {
        font-size: 19px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .hero-control {
        display: none;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-copy p {
        font-size: 15px;
    }

    .search-panel {
        margin-top: -24px;
    }

    .search-inner {
        padding: 18px;
        border-radius: 22px;
    }

    .page-stack {
        padding: 46px 0;
        gap: 50px;
    }

    .movie-grid,
    .home-grid,
    .compact-grid,
    .category-movie-grid,
    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p {
        display: none;
    }

    .page-hero {
        padding: 62px 0 54px;
    }

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