:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-soft: #fff7ed;
    --accent: #fb923c;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --page: #f9fafb;
    --card: #ffffff;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 4px 22px rgba(15, 23, 42, 0.08);
}

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

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.30);
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-dark);
}

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

.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-weight: 700;
}

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

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    min-height: 620px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
    background-image: linear-gradient(110deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.60), rgba(249, 115, 22, 0.40)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.38), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.60));
}

.hero-content {
    position: relative;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 54px;
    align-items: center;
    color: #ffffff;
    padding: 64px 0 88px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.16);
    color: #fed7aa;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 0 0 14px;
    font-size: clamp(26px, 3.2vw, 44px);
    line-height: 1.1;
}

.hero-copy p,
.detail-copy p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    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 {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.34);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.70);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

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

.hero-controls button {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
}

.hero-dots button.is-active {
    width: 30px;
    background: var(--primary);
}

.search-panel,
.content-section {
    margin-top: 34px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.text-card h2,
.side-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.2;
}

.search-panel p,
.section-head p {
    margin: 0;
    color: var(--muted);
}

.search-controls,
.toolbar {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
}

.multi-toolbar {
    grid-template-columns: 1.4fr 150px 170px 150px;
}

input,
select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    padding: 0 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 28px 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);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-card:hover img {
    transform: scale(1.06);
}

.card-type,
.play-mark,
.rank-badge {
    position: absolute;
    z-index: 2;
}

.card-type {
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--primary);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    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: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-meta a {
    color: var(--primary-dark);
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--primary-dark);
}

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

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

.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-number {
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    margin-bottom: 4px;
    font-size: 16px;
}

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

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 20px;
    border-radius: var(--radius);
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.45s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.86));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    display: block;
    margin-top: 90px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.category-card.large {
    min-height: 260px;
}

.soft-section {
    padding: 26px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.small-hero {
    padding: 74px 0;
}

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

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

.toolbar {
    margin-bottom: 22px;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

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

.rank-card a {
    position: relative;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 9px 26px rgba(15, 23, 42, 0.07);
}

.rank-card img {
    width: 110px;
    height: 148px;
    border-radius: 16px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
}

.rank-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.rank-card p {
    margin: 0 0 10px;
    color: var(--muted);
}

.rank-card span:last-child {
    color: var(--primary-dark);
    font-weight: 800;
}

.detail-hero {
    min-height: 540px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(110deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.70), rgba(249, 115, 22, 0.36)), var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.06);
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    min-height: 540px;
    padding: 56px 0;
}

.detail-poster img {
    width: 280px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    margin-top: 34px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.24), rgba(0, 0, 0, 0.55));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.38);
    font-size: 32px;
}

.player-cover strong {
    font-size: 18px;
}

.video-player.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
}

.text-card,
.side-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.text-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.detail-side {
    align-self: start;
    position: sticky;
    top: 90px;
}

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

.related-section {
    margin-top: 24px;
}

.hidden-card {
    display: none !important;
}

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

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

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

    .detail-side {
        position: static;
    }
}

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

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

    .hero-content,
    .detail-layout,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 280px;
        transform: none;
    }

    .hero-slider,
    .hero-track,
    .hero-slide {
        min-height: 780px;
    }

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

    .search-controls,
    .toolbar,
    .multi-toolbar {
        grid-template-columns: 1fr;
    }

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

    .detail-poster img {
        width: min(260px, 100%);
    }
}

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

    .brand {
        font-size: 17px;
    }

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

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

    .movie-grid,
    .all-grid,
    .related-grid,
    .category-grid,
    .category-grid.wide,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .rank-card a {
        grid-template-columns: 92px 1fr;
    }

    .rank-card img {
        width: 92px;
        height: 124px;
    }

    .hero-slider,
    .hero-track,
    .hero-slide {
        min-height: 840px;
    }

    .small-hero {
        padding: 52px 0;
    }
}
