:root {
    color-scheme: light;
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #ea580c;
    --orange-soft: #ffedd5;
    --red: #dc2626;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --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;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #fff;
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.32);
}

.brand-name,
.footer-brand {
    font-size: 19px;
    white-space: nowrap;
    background: linear-gradient(90deg, #ea580c, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 650;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--orange);
}

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

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

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

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

.mobile-nav-link {
    padding: 10px 0;
    font-size: 15px;
    font-weight: 650;
    color: #374151;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 18%, rgba(249, 115, 22, 0.26), transparent 34%),
        linear-gradient(135deg, #111827, #1f2937 42%, #111827);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -24px;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.28;
    filter: blur(10px);
    transform: scale(1.05);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0.45) 48%, rgba(17, 24, 39, 0.15) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    min-height: 600px;
    margin: 0 auto;
    padding: 64px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: center;
}

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

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
    font-size: 14px;
    font-weight: 800;
}

.section-kicker {
    margin-bottom: 8px;
    color: var(--orange);
    background: var(--orange-soft);
}

.hero h1 {
    margin: 24px 0 20px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
    color: #fff;
}

.hero p {
    max-width: 720px;
    margin: 0 0 30px;
    color: #d1d5db;
    font-size: 21px;
    line-height: 1.8;
}

.hero-actions,
.detail-title-row,
.category-block-head,
.section-heading,
.detail-meta-row,
.movie-card-meta,
.hero-meta,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.hero-actions {
    gap: 14px;
    margin-bottom: 22px;
}

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

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, #f97316, #dc2626);
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.28);
}

.secondary-button,
.section-more {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.15);
}

.section-more {
    color: var(--orange);
    background: #fff;
    border-color: var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-search {
    width: min(100%, 640px);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    font: inherit;
    outline: none;
    background: #fff;
}

.hero-search input {
    border: 0;
    background: rgba(255, 255, 255, 0.92);
}

.hero-search button {
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(90deg, #f97316, #dc2626);
    cursor: pointer;
}

.hero-meta {
    gap: 12px;
    color: #d1d5db;
    font-size: 14px;
}

.hero-meta span,
.detail-meta-row span,
.movie-card-meta span,
.tag-row span,
.score-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 750;
}

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

.hero-poster-card {
    position: relative;
    min-height: 460px;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    transform: perspective(1200px) rotateY(-8deg);
}

.hero-poster-card img,
.hero-poster-card .poster-fallback {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.hero-poster-card span {
    position: absolute;
    left: 22px;
    bottom: 22px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    font-weight: 800;
}

.category-overview-strip,
.page-shell,
.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
}

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

.category-tile,
.category-block,
.filter-panel,
.detail-content-card,
.sidebar-card,
.player-card,
.movie-card,
.rank-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.category-tile {
    min-height: 140px;
    padding: 20px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.rank-card:hover,
.category-block:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    color: var(--orange);
    font-weight: 850;
}

.category-tile strong {
    font-size: 34px;
    line-height: 1;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
}

.content-section {
    padding-top: 24px;
}

.section-heading,
.category-block-head {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-heading h2,
.category-block h2,
.sidebar-card h2,
.sitemap-page h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

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

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

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

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

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-frame,
.rank-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.2s ease;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    color: #fff;
    font-weight: 850;
    background:
        radial-gradient(circle at 20% 16%, rgba(249, 115, 22, 0.55), transparent 35%),
        linear-gradient(135deg, #111827, #7f1d1d);
    opacity: 0;
}

.poster-image.is-missing {
    opacity: 0;
}

.poster-image.is-missing + .poster-fallback {
    opacity: 1;
}

.movie-card:hover .poster-image:not(.is-missing),
.rank-card:hover .poster-image:not(.is-missing) {
    transform: scale(1.08);
}

.poster-year,
.poster-play,
.rank-num {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    font-weight: 850;
}

.poster-year {
    top: 12px;
    right: 12px;
    padding: 5px 8px;
    font-size: 12px;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card-meta,
.tag-row,
.detail-meta-row {
    gap: 8px;
}

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

.movie-card p,
.rank-card p,
.detail-content-card p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.score-pill {
    color: #b45309 !important;
    background: #fef3c7 !important;
}

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

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

.rank-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card a {
    display: grid;
    grid-template-columns: 170px 1fr;
    min-height: 128px;
}

.rank-poster {
    height: 100%;
    aspect-ratio: auto;
}

.rank-num {
    left: 10px;
    top: 10px;
    min-width: 38px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #f97316, #dc2626);
}

.rank-info {
    padding: 14px;
    min-width: 0;
}

.rank-info h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(249, 115, 22, 0.24), transparent 34%),
        linear-gradient(135deg, #111827, #1f2937 58%, #7f1d1d);
    color: #fff;
}

.small-hero > div {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.small-hero h1 {
    margin: 20px 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.small-hero p {
    max-width: 860px;
    color: #d1d5db;
    line-height: 1.8;
    font-size: 18px;
}

.category-block {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px auto;
    gap: 12px;
    align-items: center;
}

.search-panel {
    grid-template-columns: minmax(220px, 1fr) 190px 170px auto;
}

.filter-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
    white-space: nowrap;
}

.detail-hero {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(249, 250, 251, 1) 430px),
        var(--detail-image) center top / cover no-repeat;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.detail-hero-inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 70px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #e5e7eb;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fdba74;
}

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

.player-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

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

.player-overlay-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.96), rgba(220, 38, 38, 0.96));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-overlay-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.player-card.is-playing .player-overlay-button {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    font-weight: 750;
}

.detail-content-card,
.sidebar-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 18px;
}

.detail-title-row {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

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

.detail-title-row .secondary-button {
    color: var(--orange);
    background: #fff7ed;
    border-color: #fed7aa;
}

.detail-meta-row {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-content-card h2 {
    margin: 26px 0 12px;
    font-size: 22px;
}

.detail-content-card p {
    margin: 0;
    font-size: 16px;
}

.detail-sidebar {
    position: sticky;
    top: 90px;
}

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

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

.sidebar-rank-list .rank-card a {
    grid-template-columns: 132px 1fr;
}

.sitemap-page section {
    margin-bottom: 32px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.sitemap-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.sitemap-list li {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

.sitemap-list span {
    color: var(--muted);
    font-size: 13px;
}

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

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

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

.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px;
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
    gap: 28px;
}

.site-footer p {
    margin: 10px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 12px 18px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fdba74;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 14px;
    }

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-poster-card {
        min-height: 320px;
        transform: none;
    }

    .hero-poster-card img,
    .hero-poster-card .poster-fallback {
        min-height: 320px;
    }

    .detail-layout,
    .site-footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

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

    .movie-index-list,
    .two-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .site-header-inner {
        padding: 0 16px;
    }

    .brand-name {
        max-width: 230px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-inner,
    .small-hero > div,
    .category-overview-strip,
    .page-shell,
    .content-section,
    .detail-hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        min-height: auto;
    }

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

    .hero p {
        font-size: 17px;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .hero-search input,
    .hero-search button {
        border-radius: 16px;
    }

    .movie-grid,
    .all-grid,
    .compact-grid,
    .category-tile-grid,
    .rank-list,
    .large-rank-list {
        grid-template-columns: 1fr;
    }

    .rank-card a,
    .sidebar-rank-list .rank-card a {
        grid-template-columns: 128px 1fr;
    }

    .rank-info p {
        -webkit-line-clamp: 1;
    }
}
