:root {
    --mist-50: #f8fafc;
    --mist-100: #f1f5f9;
    --mist-200: #e2e8f0;
    --mist-300: #cbd5e1;
    --mist-600: #475569;
    --mist-700: #334155;
    --mist-800: #1e293b;
    --mist-900: #0f172a;
    --fog-50: #f0f9ff;
    --fog-100: #e0f2fe;
    --fog-400: #38bdf8;
    --fog-600: #0284c7;
    --fog-700: #0369a1;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--mist-50), #ffffff 40%, var(--mist-50));
    color: var(--mist-900);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--fog-600), var(--mist-900));
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.28);
}

.brand-name {
    font-size: 20px;
    color: var(--mist-900);
    white-space: nowrap;
}

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

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

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

.header-search {
    width: 300px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: var(--mist-100);
}

.header-search input,
.mobile-search input,
.local-filter input,
.big-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mist-900);
}

.header-search button,
.mobile-search button,
.big-search button,
.search-form button {
    border: 0;
    cursor: pointer;
    color: white;
    background: var(--fog-600);
    border-radius: 999px;
    padding: 9px 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.search-form button:hover {
    background: var(--fog-700);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--mist-700);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 18px;
    padding: 18px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.mobile-menu.open {
    display: grid;
    gap: 14px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: var(--mist-100);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: opacity 0.9s ease, transform 4s ease;
}

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

.hero-overlay,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.4) 52%, rgba(15, 23, 42, 0.1));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1180px) / 2));
    right: 24px;
    bottom: 84px;
    max-width: 720px;
    color: white;
    animation: slideUp 0.7s ease both;
}

.hero-eyebrow,
.detail-info .breadcrumb,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fog-400);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
    margin: 14px 0 18px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-actions,
.quick-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: white;
    background: var(--fog-600);
    box-shadow: 0 14px 32px rgba(2, 132, 199, 0.32);
}

.primary-button:hover {
    background: var(--fog-700);
    transform: translateY(-2px) scale(1.02);
}

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

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.content-section,
.detail-content,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.quick-search-panel {
    padding: 34px;
    margin-top: -42px;
    position: relative;
    z-index: 5;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.big-search {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 22px;
    background: var(--mist-100);
}

.big-search input {
    padding: 0 12px;
    font-size: 18px;
}

.quick-tags {
    margin-top: 18px;
}

.quick-tags a,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--fog-50);
    color: var(--fog-700);
    font-weight: 700;
}

.quick-tags a {
    padding: 10px 16px;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--mist-900);
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--mist-600);
    line-height: 1.7;
}

.section-heading a {
    color: var(--fog-600);
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--mist-200);
}

.movie-card.compact .card-cover {
    aspect-ratio: 1 / 1.22;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.55));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.88);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.92);
    color: white;
    font-weight: 800;
    opacity: 0;
    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-title {
    display: block;
    color: var(--mist-900);
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: var(--fog-600);
}

.card-meta {
    margin: 6px 0 8px;
    color: var(--mist-600);
    font-size: 13px;
}

.card-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--mist-700);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tags span {
    padding: 5px 9px;
    font-size: 12px;
}

.horizontal-section {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: var(--mist-50);
}

.horizontal-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.wide-card {
    position: relative;
    flex: 0 0 280px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: var(--mist-200);
    box-shadow: var(--soft-shadow);
}

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

.wide-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.05));
}

.wide-card span {
    position: absolute;
    z-index: 2;
    left: 16px;
    right: 16px;
    bottom: 14px;
    color: white;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.highlight-list {
    display: grid;
    gap: 28px;
}

.highlight-card {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    overflow: hidden;
    border-radius: 30px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.highlight-image {
    min-height: 320px;
    overflow: hidden;
    background: var(--mist-200);
}

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

.highlight-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
}

.highlight-text span {
    color: var(--fog-600);
    font-weight: 800;
}

.highlight-text h3 {
    margin: 10px 0 12px;
    color: var(--mist-900);
    font-size: 30px;
    letter-spacing: -0.04em;
}

.highlight-text p,
.highlight-text small {
    color: var(--mist-700);
    line-height: 1.75;
}

.highlight-text small {
    margin-top: 12px;
}

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

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 26px;
    padding: 22px;
    background: var(--mist-900);
    color: white;
    box-shadow: var(--soft-shadow);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.2));
}

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

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

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.page-main,
.detail-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: var(--mist-900);
    color: white;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.42));
}

.page-hero > div {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 82px 0 60px;
}

.slim-hero {
    min-height: 300px;
    background-image: radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.36), transparent 28%), linear-gradient(135deg, #0f172a, #1e293b);
}

.filter-panel {
    padding-top: 36px;
}

.local-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
    padding: 14px 18px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.search-form {
    align-items: center;
}

.empty-state {
    display: none;
    margin: 36px 0 0;
    padding: 22px;
    text-align: center;
    color: var(--mist-600);
    border-radius: 18px;
    background: var(--mist-100);
}

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

.category-overview-card {
    min-height: auto;
    color: var(--mist-900);
    background: white;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    background: var(--mist-200);
}

.category-overview-card h2 {
    margin: 0 0 8px;
}

.category-overview-card p {
    margin: 0;
    color: var(--mist-600);
    line-height: 1.65;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 78px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.rank-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    color: white;
    background: var(--mist-900);
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
    background: var(--mist-200);
}

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

.rank-info a {
    display: block;
    color: var(--mist-900);
    font-weight: 900;
    font-size: 18px;
}

.rank-info p {
    margin: 7px 0;
    color: var(--mist-700);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-info span {
    color: var(--mist-600);
    font-size: 14px;
}

.rank-action {
    padding: 10px 16px;
    border-radius: 999px;
    color: white;
    background: var(--fog-600);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    color: white;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
    padding: 120px 0 70px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    background: var(--mist-200);
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    flex-wrap: wrap;
    font-size: 14px;
}

.detail-tags span {
    padding: 8px 12px;
}

.detail-info .primary-button {
    margin-top: 26px;
}

.player-section {
    padding-top: 46px;
    padding-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.15));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.95);
    box-shadow: 0 16px 42px rgba(2, 132, 199, 0.4);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 30px;
    top: 24px;
    border-left: 22px solid white;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    padding-top: 24px;
}

.story-card {
    padding: 28px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.story-card h2 {
    margin: 0 0 14px;
    color: var(--mist-900);
}

.story-card p {
    margin: 0;
    color: var(--mist-700);
    line-height: 1.9;
}

.related-section {
    padding-top: 30px;
}

.site-footer {
    margin-top: 40px;
    background: var(--mist-900);
    color: var(--mist-300);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 50px;
    padding: 50px 0;
}

.footer-logo {
    color: white;
    font-size: 18px;
}

.footer-brand p,
.footer-column a {
    color: var(--mist-300);
    line-height: 1.75;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-column h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 18px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    color: var(--mist-300);
    border-top: 1px solid rgba(203, 213, 225, 0.16);
    text-align: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@media (max-width: 820px) {
    .header-inner {
        height: 66px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 34px;
    }

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

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

    .highlight-card,
    .detail-wrap,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: 220px;
    }

    .rank-row {
        grid-template-columns: 44px 66px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }
}

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

    .quick-search-panel {
        padding: 22px;
    }

    .big-search,
    .local-filter,
    .search-form {
        flex-direction: column;
    }

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

    .content-section,
    .detail-content,
    .player-section {
        padding: 44px 0;
    }

    .wide-card {
        flex-basis: 230px;
    }

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

    .player-shell {
        border-radius: 18px;
    }
}
