:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-50: #fff7ed;
    --orange-300: #fdba74;
    --orange-500: #f97316;
    --white: #ffffff;
    --shadow-soft: 0 18px 38px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.12);
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--slate-100);
    color: var(--slate-800);
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-100) 100%);
    color: var(--slate-800);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
}

.header-inner,
.footer-inner,
.page-container,
.hero-content-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(245, 158, 11, 0.36);
    transition: transform 0.24s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 24px;
    line-height: 1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--amber-400), var(--orange-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--slate-300);
    font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: var(--white);
    transition: background 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: var(--amber-500);
    transform: translateY(-1px);
}

.site-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search-form input {
    width: 180px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    outline: none;
    color: var(--white);
    background: rgba(71, 85, 105, 0.92);
}

.site-search-form input::placeholder {
    color: var(--slate-300);
}

.site-search-form input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.site-search-form button,
.primary-button,
.secondary-button,
.filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: var(--amber-500);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.site-search-form button:hover,
.primary-button:hover,
.filter-reset:hover {
    background: var(--amber-600);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.28);
}

.secondary-button {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-button:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mobile-search {
    padding-top: 6px;
}

.mobile-search input {
    width: 100%;
}

.hero-section {
    position: relative;
    height: min(80vh, 780px);
    min-height: 560px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

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

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 64px 0 86px;
}

.hero-content-inner {
    display: grid;
    max-width: 1180px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(245, 158, 11, 0.86);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 0 0 18px;
    color: var(--white);
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--slate-200);
    font-size: 19px;
    line-height: 1.7;
}

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

.hero-meta span,
.movie-chip,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.72);
    font-size: 14px;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.52);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.24s ease, transform 0.24s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.74);
    transform: translateY(-50%) scale(1.05);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: var(--amber-500);
}

.page-main {
    padding: 56px 0 78px;
}

.page-container {
    display: grid;
    gap: 56px;
}

.page-hero {
    overflow: hidden;
    padding: 42px;
    border-radius: 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700) 58%, var(--amber-600));
    box-shadow: var(--shadow-soft);
}

.page-hero h1 {
    max-width: 860px;
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--slate-200);
    font-size: 18px;
    line-height: 1.7;
}

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

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--slate-800);
    font-size: 30px;
    line-height: 1.2;
}

.section-header h2::before {
    display: inline-block;
    width: 5px;
    height: 32px;
    border-radius: 999px;
    background: var(--amber-500);
    content: "";
}

.section-header p {
    max-width: 520px;
    margin: 6px 0 0;
    color: var(--slate-500);
    line-height: 1.6;
}

.section-header a {
    color: var(--amber-600);
    font-weight: 800;
}

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

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

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

.movie-card-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--slate-800);
}

.movie-card-compact .movie-cover-wrap,
.featured-grid .movie-cover-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.movie-cover-wrap::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.02) 62%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

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

.movie-year,
.rank-label,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.68);
    font-size: 13px;
    font-weight: 800;
}

.movie-year {
    top: 12px;
    right: 12px;
    min-height: 28px;
    padding: 0 10px;
}

.rank-label {
    top: 12px;
    left: 12px;
    min-height: 28px;
    padding: 0 10px;
    background: var(--amber-500);
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card-body strong {
    color: var(--slate-800);
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.24s ease;
}

.movie-card-link:hover strong {
    color: var(--amber-600);
}

.movie-card-body em {
    display: -webkit-box;
    min-height: 43px;
    overflow: hidden;
    color: var(--slate-500);
    font-style: normal;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.movie-tags span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--slate-600);
    background: var(--slate-100);
    font-size: 12px;
}

.featured-card .movie-card-link {
    position: relative;
    min-height: 260px;
}

.highlight-section {
    padding: 36px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--amber-50), var(--orange-50));
}

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

.wide-card a {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.wide-card a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.wide-card img {
    width: 142px;
    height: 88px;
    flex: 0 0 auto;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wide-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    font-weight: 900;
}

.wide-card-body {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.wide-card-body strong {
    color: var(--slate-800);
    font-size: 18px;
}

.wide-card-body em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--slate-500);
    font-style: normal;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.wide-card-body span {
    color: var(--slate-500);
    font-size: 13px;
}

.horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border-radius: 24px;
    color: var(--white);
    background: var(--slate-900);
    box-shadow: var(--shadow-card);
}

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

.category-card:hover img {
    opacity: 0.62;
}

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

.category-card-body {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    min-height: 240px;
    padding: 24px;
}

.category-card-body strong {
    margin-bottom: 10px;
    font-size: 25px;
}

.category-card-body span {
    color: var(--slate-200);
    line-height: 1.65;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 160px 160px auto;
    gap: 12px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    outline: none;
    color: var(--slate-800);
    background: var(--white);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

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

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.detail-hero {
    display: grid;
    gap: 24px;
}

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

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-900);
}

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--slate-900);
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.26));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-size: 30px;
    transform: scale(1);
    transition: transform 0.24s ease;
}

.player-overlay:hover .player-start {
    transform: scale(1.08);
}

.player-info,
.detail-card,
.sidebar-card {
    padding: 24px;
}

.player-info h1 {
    margin: 0 0 14px;
    color: var(--slate-800);
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.12;
}

.movie-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-chip {
    color: var(--slate-700);
    background: var(--slate-100);
}

.detail-card h2,
.sidebar-card h2 {
    margin: 0 0 14px;
    color: var(--slate-800);
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 16px;
    color: var(--slate-600);
    font-size: 17px;
    line-height: 1.9;
}

.detail-cover {
    overflow: hidden;
    border-radius: 20px;
    background: var(--slate-900);
}

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

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

.sidebar-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.sidebar-item img {
    width: 86px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.sidebar-item strong {
    display: block;
    overflow: hidden;
    color: var(--slate-800);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-item span {
    display: block;
    margin-top: 4px;
    color: var(--slate-500);
    font-size: 13px;
}

.site-footer {
    color: var(--slate-300);
    background: var(--slate-900);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 44px 0;
}

.footer-inner strong {
    color: var(--amber-400);
    font-size: 22px;
}

.footer-inner p {
    max-width: 620px;
    margin: 10px 0 0;
    line-height: 1.7;
}

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

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

@media (max-width: 1024px) {
    .site-search-form:not(.mobile-search) {
        display: none;
    }

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-section {
        min-height: 620px;
        height: 72vh;
    }

    .hero-content {
        padding: 48px 0 86px;
    }

    .hero-arrow {
        display: none;
    }

    .page-hero {
        padding: 30px;
    }

    .section-header {
        display: grid;
    }

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

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

    .footer-inner {
        display: grid;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    .page-container,
    .hero-content-inner,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .brand-text strong {
        font-size: 20px;
    }

    .brand-text small {
        display: none;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 34px;
    }

    .hero-content p {
        font-size: 16px;
    }

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

    .wide-card a {
        align-items: flex-start;
    }

    .wide-card img {
        width: 112px;
        height: 78px;
    }

    .highlight-section {
        padding: 22px;
    }

    .player-info,
    .detail-card,
    .sidebar-card {
        padding: 18px;
    }
}
