:root {
    --primary-50: #fef7ed;
    --primary-100: #fdecd0;
    --primary-500: #f17925;
    --primary-600: #e2591b;
    --primary-700: #bd4517;
    --accent-50: #fef4ee;
    --accent-500: #f04f1f;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
    --shadow-lg: 0 18px 38px rgba(28, 25, 23, 0.12);
    --shadow-xl: 0 25px 55px rgba(28, 25, 23, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(214, 211, 209, 0.7);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    box-shadow: 0 8px 22px rgba(240, 79, 31, 0.3);
}

.brand-text,
.footer-brand,
.logo-gradient {
    background: linear-gradient(90deg, var(--primary-600), var(--accent-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text {
    font-size: 21px;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.nav-link {
    color: var(--neutral-700);
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-600);
}

.header-search {
    position: relative;
    width: 260px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--neutral-300);
    border-radius: 999px;
    background: var(--white);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(241, 121, 37, 0.15);
}

.header-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 14px 10px 18px;
    background: transparent;
}

.header-search button {
    border: 0;
    padding: 10px 16px;
    color: var(--white);
    background: var(--primary-500);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--neutral-700);
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-inner {
    width: min(680px, 100%);
    color: var(--white);
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    padding: 7px 14px;
    font-size: 14px;
    backdrop-filter: blur(8px);
}

.detail-tags span,
.card-tags span {
    color: var(--primary-700);
    background: var(--primary-50);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -1px;
    font-weight: 900;
}

.hero p {
    max-width: 640px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px) scale(1.02);
}

.btn-primary {
    color: var(--white);
    background: var(--primary-500);
    box-shadow: 0 12px 28px rgba(240, 79, 31, 0.32);
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.main-space {
    padding: 56px 0 70px;
}

.content-section {
    margin-top: 54px;
}

.content-section:first-child {
    margin-top: 0;
}

.section-panel {
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    box-shadow: var(--shadow-xl);
}

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

.section-heading h2 {
    margin: 0;
    color: var(--neutral-900);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 850;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--neutral-500);
}

.section-link {
    flex-shrink: 0;
    color: var(--primary-600);
    font-weight: 750;
}

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

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

.movie-strip {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.movie-strip .movie-card {
    width: 250px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.62));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
    opacity: 1;
}

.card-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.card-year {
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
}

.card-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(241, 121, 37, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--neutral-900);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
}

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

.card-body p {
    margin: 0 0 12px;
    min-height: 46px;
    color: var(--neutral-500);
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-500);
    font-size: 13px;
}

.card-meta span {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--neutral-100);
}

.movie-card.compact .card-body {
    padding: 13px;
}

.movie-card.compact .card-body p {
    display: none;
}

.feature-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
}

.feature-grid .movie-card:first-child {
    grid-row: span 2;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 22px;
    border-radius: 24px;
    color: var(--neutral-900);
    background: linear-gradient(135deg, var(--white), var(--primary-50));
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.category-card p {
    margin: 0 0 16px;
    color: var(--neutral-500);
    font-size: 14px;
}

.category-card span {
    color: var(--primary-600);
    font-weight: 750;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 82px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    font-weight: 850;
}

.ranking-thumb {
    width: 72px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--primary-50);
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-title h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 820;
}

.ranking-title p {
    margin: 0;
    color: var(--neutral-500);
}

.ranking-meta {
    color: var(--primary-700);
    font-weight: 750;
}

.page-hero {
    padding: 58px 0 34px;
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.page-hero h1 {
    margin: 0 0 12px;
    color: var(--neutral-900);
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--neutral-500);
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 28px 0;
}

.filter-bar input,
.filter-bar select,
.search-panel input {
    width: 100%;
    border: 1px solid var(--neutral-300);
    border-radius: 999px;
    padding: 13px 18px;
    background: var(--white);
    outline: 0;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(241, 121, 37, 0.15);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--neutral-500);
    font-size: 14px;
}

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

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

.player-card,
.detail-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
}

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

.play-large {
    position: relative;
    z-index: 2;
    width: 90px;
    height: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(241, 121, 37, 0.92);
    font-size: 38px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.player-tools {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-shell:hover .player-tools,
.player-shell.active .player-tools {
    opacity: 1;
}

.player-tools button {
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    padding: 10px 14px;
    cursor: pointer;
}

.detail-main {
    padding: 24px;
}

.detail-main h1 {
    margin: 0 0 12px;
    color: var(--neutral-900);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
    font-weight: 900;
}

.detail-subtitle {
    margin: 0 0 18px;
    color: var(--neutral-500);
    font-size: 18px;
}

.detail-info {
    padding: 22px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--neutral-200);
}

.info-list span:first-child {
    color: var(--neutral-500);
}

.info-list span:last-child {
    color: var(--neutral-900);
    font-weight: 750;
    text-align: right;
}

.article-panel {
    margin-top: 28px;
    padding: 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.article-panel h2 {
    margin: 0 0 14px;
    color: var(--neutral-900);
    font-size: 25px;
    font-weight: 850;
}

.article-panel p {
    margin: 0 0 16px;
    color: var(--neutral-700);
    font-size: 16px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 26px 0;
}

.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    color: var(--white);
    background: var(--primary-500);
    font-weight: 750;
    cursor: pointer;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 20px;
    color: var(--neutral-500);
    background: var(--white);
    text-align: center;
}

.empty-state.show {
    display: block;
}

.site-footer {
    color: rgba(255, 255, 255, 0.76);
    background: var(--neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.footer-grid p {
    max-width: 560px;
    margin: 0;
}

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

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-copy {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

@media (max-width: 1050px) {
    .header-search {
        width: 210px;
    }

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

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

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

@media (max-width: 780px) {
    .nav-wrap {
        flex-wrap: wrap;
        min-height: 66px;
        padding: 10px 0;
    }

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

    .site-nav {
        order: 3;
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-left: 0;
        padding: 8px 0;
    }

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

    .nav-link {
        padding: 12px 4px;
        border-bottom: 1px solid var(--neutral-200);
    }

    .header-search {
        order: 4;
        width: 100%;
    }

    .hero {
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 48px 66px 1fr;
    }

    .ranking-meta {
        grid-column: 2 / -1;
    }

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

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

    .brand-text {
        max-width: 230px;
        overflow: hidden;
        font-size: 18px;
        text-overflow: ellipsis;
    }

    .hero {
        min-height: 580px;
    }

    .hero-tags span,
    .detail-tags span {
        font-size: 12px;
        padding: 6px 10px;
    }

    .section-panel,
    .article-panel,
    .detail-main,
    .detail-info {
        padding: 20px;
    }

    .movie-grid,
    .movie-grid.six {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

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

    .card-body p {
        min-height: 0;
        font-size: 13px;
    }

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

    .search-panel button {
        min-height: 44px;
    }
}
