:root {
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef8ff 42%, #f8fafc 100%);
    color: var(--slate-800);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-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(--cyan), var(--blue));
    box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
    font-size: 14px;
}

.logo-text {
    font-size: 22px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 15px;
    font-weight: 650;
}

.nav-link {
    color: var(--slate-700);
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--slate-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--slate-700);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
}

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

.mobile-link {
    padding: 11px 4px;
    color: var(--slate-700);
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(8, 145, 178, 0.42), transparent 32%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.22) 100%);
}

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

.hero-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 78px;
    color: var(--white);
}

.hero-copy h1 {
    max-width: 780px;
    margin: 16px 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.02;
    font-weight: 850;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
    max-width: 690px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero-pills,
.hero-tags,
.hero-actions,
.tag-row,
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-pills span,
.hero-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 650;
}

.hero-pills span:first-child {
    background: var(--cyan);
}

.hero-actions {
    margin-top: 28px;
}

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

.primary-button {
    color: var(--white);
    background: var(--cyan);
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.35);
}

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

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.outline-button {
    color: var(--cyan);
    background: var(--white);
    border: 1px solid rgba(8, 145, 178, 0.18);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

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

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

.search-panel,
.content-section,
.page-hero,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: var(--slate-800);
    letter-spacing: -0.03em;
}

.search-panel h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.search-panel p,
.section-heading p,
.page-hero p {
    color: var(--slate-600);
    line-height: 1.75;
}

.search-box {
    position: relative;
}

.search-box input,
.category-search input {
    width: 100%;
    height: 54px;
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 16px;
    padding: 0 18px;
    color: var(--slate-800);
    background: var(--slate-50);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.category-search input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 9;
    display: none;
    max-height: 430px;
    overflow: auto;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.search-result-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    padding: 12px;
    border-bottom: 1px solid var(--slate-100);
}

.search-result-item img {
    width: 76px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.search-result-item h3 {
    margin: 0 0 4px;
    color: var(--slate-800);
    font-size: 15px;
}

.search-result-item p {
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
    line-height: 1.45;
}

.content-section {
    padding: 68px 0 0;
}

.section-inner {
    position: relative;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(27px, 3vw, 36px);
}

.section-heading p {
    max-width: 720px;
    margin: 8px 0 0;
}

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-900), var(--cyan-dark));
}

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

.card-link:hover .poster-wrap img {
    transform: scale(1.09);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.05));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.card-link:hover .poster-shade {
    opacity: 1;
}

.poster-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.poster-badges span,
.poster-year,
.rank-badge {
    border-radius: 9px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 750;
}

.poster-badges span:first-child {
    background: var(--cyan);
}

.poster-badges span {
    padding: 5px 8px;
}

.poster-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 8px;
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.68);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 9px;
    color: var(--slate-800);
    font-size: 18px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link:hover .card-body h3 {
    color: var(--cyan);
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 12px;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding: 6px 4px 24px;
    scrollbar-width: thin;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    color: var(--white);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.5s ease;
}

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

.category-card:hover img {
    transform: scale(1.08);
}

.category-card div {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
}

.category-card span {
    display: block;
    margin-bottom: 8px;
    font-size: 21px;
    font-weight: 850;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.55;
}

.page-hero {
    padding: 58px 0 22px;
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 840px;
    margin-top: 14px;
    font-size: 18px;
}

.category-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 480px) 1fr;
    gap: 20px;
    align-items: center;
    margin: 28px 0;
}

.filter-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--white);
    cursor: pointer;
    font-weight: 700;
}

.filter-button.active,
.filter-button:hover {
    color: var(--white);
    background: var(--cyan);
}

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

.ranking-item a {
    display: grid;
    grid-template-columns: 64px 132px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.ranking-num {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.ranking-item img {
    width: 132px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-info h3 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 18px;
}

.ranking-info p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ranking-info span {
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 12px;
}

.ranking-action {
    padding: 10px 15px;
    border-radius: 12px;
    color: var(--white);
    background: var(--cyan);
    font-size: 14px;
    font-weight: 800;
}

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

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: stretch;
}

.detail-title {
    padding: 34px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.detail-title h1 {
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
}

.detail-title p {
    color: var(--slate-600);
    font-size: 18px;
    line-height: 1.8;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.meta-line span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 13px;
    font-weight: 750;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: var(--slate-900);
}

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

.player-block {
    margin-top: 32px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-950);
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.25), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.play-overlay.hidden {
    display: none;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--cyan);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    font-size: 34px;
    text-indent: 4px;
}

.player-caption {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    color: #cbd5e1;
    background: #020617;
}

.player-caption strong {
    color: var(--white);
}

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

.detail-main,
.detail-side {
    padding: 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 14px;
    color: var(--slate-800);
    font-size: 22px;
}

.detail-main p {
    color: var(--slate-600);
    line-height: 1.9;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--slate-600);
}

.info-list strong {
    color: var(--slate-800);
    text-align: right;
}

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

.site-footer {
    margin-top: 84px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #0f172a 48%, #111827);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 28px;
    margin: 0 auto;
    padding: 46px 0 34px;
}

.footer-logo {
    color: var(--white);
    font-size: 20px;
}

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #64748b;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 22px;
    color: var(--slate-600);
    background: var(--white);
    text-align: center;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        height: 540px;
    }

    .search-panel-inner,
    .detail-hero,
    .detail-grid,
    .category-toolbar,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-item a {
        grid-template-columns: 48px 104px 1fr;
    }

    .ranking-action {
        display: none;
    }
}

@media (max-width: 640px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .logo-text {
        font-size: 19px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-copy {
        width: min(100% - 28px, 1180px);
        padding-bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .search-panel,
    .content-section,
    .page-hero,
    .detail-wrap {
        width: min(100% - 24px, 1180px);
    }

    .search-panel-inner,
    .detail-title,
    .detail-main,
    .detail-side {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item a {
        grid-template-columns: 44px 1fr;
    }

    .ranking-item img {
        display: none;
    }

    .player-caption {
        flex-direction: column;
    }
}
