:root {
    --primary-50: #fff7ed;
    --primary-100: #ffedd5;
    --primary-400: #fb923c;
    --primary-500: #f97316;
    --primary-600: #ea580c;
    --primary-700: #c2410c;
    --accent-50: #fdf8f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #000000;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50) 42%, var(--gray-50));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.5;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-900);
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    box-shadow: 0 14px 30px rgba(234, 88, 12, .25);
}

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

.primary-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 600;
}

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

.header-search {
    width: min(300px, 30vw);
    position: relative;
}

.header-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--white);
    color: var(--gray-900);
    outline: none;
    padding: 11px 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .14);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    max-height: 390px;
    overflow: auto;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    padding: 8px;
}

.search-results.is-open {
    display: block;
}

.search-result-item {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--gray-700);
}

.search-result-item:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.search-result-title {
    display: block;
    color: var(--gray-900);
    font-weight: 700;
}

.search-result-meta {
    display: block;
    margin-top: 2px;
    color: var(--gray-500);
    font-size: 12px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    border-top: 1px solid var(--gray-100);
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
}

.main-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 0;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border-radius: 28px;
    background: var(--gray-900);
    box-shadow: var(--shadow-xl);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .86), rgba(0, 0, 0, .52) 48%, rgba(0, 0, 0, .10)),
        linear-gradient(0deg, rgba(0, 0, 0, .78), transparent 42%);
}

.hero-content {
    position: absolute;
    left: clamp(28px, 6vw, 76px);
    right: clamp(28px, 38vw, 520px);
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
}

.hero-kicker,
.section-kicker,
.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--primary-700);
    background: var(--primary-100);
    font-size: 13px;
    font-weight: 800;
}

.hero-kicker {
    color: var(--white);
    background: rgba(249, 115, 22, .92);
}

.hero h1,
.hero-title {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: .98;
    letter-spacing: -.05em;
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .86);
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--gray-600);
    font-size: 14px;
}

.hero-meta {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, .78);
}

.hero-actions,
.section-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 18px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    box-shadow: 0 14px 26px rgba(234, 88, 12, .25);
}

.btn-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .28);
    backdrop-filter: blur(10px);
}

.btn-light {
    color: var(--primary-700);
    background: var(--white);
    border-color: var(--primary-100);
}

.hero-thumbs {
    position: absolute;
    right: 28px;
    bottom: 28px;
    display: grid;
    gap: 12px;
    width: min(320px, 34vw);
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    padding: 10px;
    color: var(--white);
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(16px);
    cursor: pointer;
    text-align: left;
    opacity: .72;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
    opacity: 1;
    transform: translateX(-4px);
    background: rgba(249, 115, 22, .85);
}

.hero-thumb img {
    width: 58px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, .1);
}

.hero-thumb strong {
    display: block;
    font-size: 14px;
}

.hero-thumb span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
}

.section {
    margin-top: 48px;
}

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

.section-title h1,
.section-title h2 {
    margin: 10px 0 8px;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -.03em;
}

.section-title p {
    max-width: 780px;
    margin: 0;
    color: var(--gray-600);
    font-size: 16px;
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-card,
.player-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, .82);
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(249, 115, 22, .28);
}

.movie-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: var(--gray-100);
}

.movie-cover.wide {
    aspect-ratio: 16 / 9;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.movie-card:hover .movie-cover img,
.rank-card:hover .movie-cover img {
    transform: scale(1.08);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .78));
}

.cover-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--primary-600);
    opacity: 0;
    transform: translate(-50%, -50%) scale(.88);
    transition: opacity .25s ease, transform .25s ease;
}

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

.movie-body,
.category-body,
.rank-body,
.info-body {
    padding: 18px;
}

.movie-body h3,
.category-body h3,
.rank-body h3 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card:hover h3,
.category-card:hover h3,
.rank-card:hover h3 {
    color: var(--primary-600);
}

.movie-desc,
.category-desc {
    margin: 10px 0 14px;
    min-height: 44px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.55;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

.category-card {
    min-height: 100%;
}

.category-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary-600);
    font-size: 13px;
    font-weight: 800;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.category-preview img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: var(--gray-100);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 190px 190px;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    font-weight: 900;
}

.rank-card .movie-cover {
    border-radius: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--primary-600);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
    gap: 24px;
    align-items: stretch;
}

.player-card {
    background: #050505;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, .70), rgba(0, 0, 0, .18));
}

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

.big-play {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--primary-600);
    box-shadow: 0 20px 45px rgba(234, 88, 12, .35);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.big-play:hover {
    transform: scale(1.06);
    background: var(--primary-500);
}

.player-message {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--white);
    background: rgba(17, 24, 39, .84);
    font-size: 14px;
    text-align: center;
}

.player-message.is-visible {
    display: block;
}

.detail-panel {
    padding: 24px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.detail-cover {
    overflow: hidden;
    margin-top: 20px;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    background: var(--gray-100);
}

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

.article-card {
    padding: 26px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-card p {
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

.footer {
    margin-top: 64px;
    background: var(--gray-900);
    color: var(--gray-300);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer h2,
.footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.footer p,
.footer a {
    color: var(--gray-300);
    font-size: 14px;
    line-height: 1.75;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: var(--gray-500);
    font-size: 13px;
    text-align: center;
}

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

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 22px;
    color: var(--gray-600);
    background: var(--white);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-search {
        width: min(360px, 45vw);
    }

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

    .hero-thumbs {
        width: auto;
        left: 28px;
        right: 28px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-thumb:nth-child(n + 4) {
        display: none;
    }

    .hero-content {
        right: clamp(28px, 6vw, 76px);
        top: 42%;
    }
}

@media (max-width: 840px) {
    .header-inner {
        min-height: 66px;
        padding: 0 16px;
    }

    .header-search {
        display: none;
    }

    .main-wrap {
        padding: 22px 16px 0;
    }

    .hero {
        min-height: 640px;
        border-radius: 22px;
    }

    .hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, .88), rgba(0, 0, 0, .18));
    }

    .hero-content {
        left: 22px;
        right: 22px;
        top: 38%;
    }

    .hero-summary {
        font-size: 16px;
    }

    .hero-thumbs {
        bottom: 20px;
        left: 18px;
        right: 18px;
        grid-template-columns: 1fr;
    }

    .hero-thumb:nth-child(n + 3) {
        display: none;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

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

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

    .rank-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .rank-number {
        display: none;
    }

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

    .detail-cover {
        display: none;
    }

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 17px;
    }

    .mobile-panel.is-open {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 620px;
    }

    .hero h1,
    .hero-title {
        font-size: 36px;
    }

    .hero-actions,
    .section-actions,
    .player-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }

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