:root {
    --blue-950: #102a60;
    --blue-900: #1e3a8a;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-100: #ffedd5;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-soft: 0 20px 55px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.10);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f7f9fd 100%);
    line-height: 1.65;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--blue-700);
}

.brand span:last-child,
.footer-brand span:last-child {
    background: linear-gradient(135deg, var(--blue-700), var(--orange-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    background: linear-gradient(135deg, var(--blue-600), var(--orange-500));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.25);
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--slate-600);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue-700);
    background: var(--blue-100);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: white;
    color: var(--slate-900);
    cursor: pointer;
}

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.28), transparent 32%), linear-gradient(135deg, #2563eb 0%, #1e40af 48%, #0f172a 100%);
}

.hero-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.28;
}

.hero-glow-one {
    top: -140px;
    left: -80px;
    background: #f97316;
}

.hero-glow-two {
    right: -110px;
    bottom: -160px;
    background: #60a5fa;
}

.hero-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 620px;
    padding: 72px 0 86px;
}

.hero-slide {
    display: none;
    align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: 54px;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeUp 0.65s ease both;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 690px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    padding: 6px 13px;
    border-radius: 999px;
    color: var(--orange-100);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    font-weight: 950;
}

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

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.primary-button,
.secondary-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: var(--orange-500);
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
}

.secondary-button {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.primary-button:hover,
.secondary-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    z-index: 2;
    padding: 14px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    transform: rotate(2deg);
}

.hero-image img,
.detail-poster img,
.poster-frame img,
.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

.hero-image img {
    aspect-ratio: 4 / 5;
    border-radius: 24px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 42px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: white;
}

.quick-search {
    width: min(1180px, calc(100% - 32px));
    margin: -48px auto 0;
    position: relative;
    z-index: 5;
}

.quick-search-inner,
.filter-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-text {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.quick-search-inner {
    padding: 28px;
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-text h2 {
    margin: 0;
}

.quick-search p,
.section-heading p,
.page-hero p,
.detail-text p {
    color: var(--slate-600);
}

.content-section,
.page-hero,
.detail-hero,
.player-section,
.detail-text {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
    padding: 30px;
}

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

.section-heading h2,
.quick-search h2,
.detail-text h2 {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.04em;
    color: var(--slate-950);
}

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

.section-more {
    color: var(--blue-700);
    background: var(--blue-100);
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.20);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

.poster-frame img {
    transition: transform 0.35s ease;
}

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

.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: white;
    font-size: 13px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(10px);
}

.poster-year {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: rgba(249, 115, 22, 0.92);
}

.movie-card-body {
    padding: 16px;
}

.movie-title {
    display: block;
    min-height: 48px;
    color: var(--slate-950);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
}

.movie-title:hover {
    color: var(--blue-700);
}

.movie-meta {
    margin-top: 8px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-card p {
    min-height: 70px;
    margin: 10px 0 0;
    color: var(--slate-600);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.tag-row span {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 12px;
    font-weight: 800;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 172px;
    padding: 20px;
    border-radius: var(--radius-md);
    color: white;
    background: linear-gradient(135deg, var(--blue-700), var(--slate-900));
    box-shadow: var(--shadow-card);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18));
    z-index: 1;
}

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

.category-tile span {
    display: block;
    font-size: 22px;
    font-weight: 950;
}

.category-tile p {
    max-width: 360px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.76);
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.46;
    transition: transform 0.35s ease;
}

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

.page-main {
    padding: 16px 0 42px;
}

.page-hero {
    color: white;
    background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.30), transparent 30%), linear-gradient(135deg, var(--blue-700), var(--slate-900));
}

.page-hero .eyebrow {
    color: var(--orange-100);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.compact-hero {
    padding: 54px 36px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
    padding: 18px;
    box-shadow: none;
}

.search-box span {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    outline: none;
    background: white;
}

.search-box input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    color: var(--slate-600);
    background: var(--slate-100);
    font-weight: 900;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
    color: white;
    background: var(--blue-600);
}

.empty-state {
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--slate-600);
    background: var(--slate-50);
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 20px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-600);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--blue-700);
}

.detail-hero {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    color: white;
    background: radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.34), transparent 28%), linear-gradient(135deg, var(--blue-700), var(--slate-900));
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.30);
}

.detail-copy .eyebrow {
    color: var(--orange-100);
}

.detail-copy p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.player-section {
    background: var(--slate-950);
    color: white;
}

.player-section .section-heading h2 {
    color: white;
}

.player-section .section-heading p {
    color: rgba(255, 255, 255, 0.70);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: black;
    aspect-ratio: 16 / 9;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.32);
}

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

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.video-overlay.is-hidden {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: var(--orange-500);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.36);
}

.detail-text {
    display: block;
}

.detail-text p {
    font-size: 17px;
}

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

.info-grid div {
    padding: 16px;
    border-radius: 16px;
    background: var(--slate-50);
}

.info-grid strong,
.info-grid span {
    display: block;
}

.info-grid strong {
    color: var(--slate-500);
    font-size: 13px;
}

.info-grid span {
    margin-top: 6px;
    color: var(--slate-950);
    font-weight: 900;
}

.site-footer {
    margin-top: 54px;
    color: #cbd5e1;
    background: var(--slate-900);
}

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

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

.footer-grid p {
    color: #94a3b8;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: var(--orange-500);
}

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

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

.is-missing-image {
    opacity: 0;
}

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

@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .hero-image {
        max-width: 380px;
        margin: 0 auto;
    }

    .detail-poster {
        max-width: 320px;
    }

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

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 74px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 14px;
        border-radius: 22px;
        background: white;
        box-shadow: var(--shadow-soft);
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-link {
        text-align: center;
    }

    .hero-shell {
        min-height: auto;
        padding: 48px 0 74px;
    }

    .hero-slide.is-active {
        display: flex;
        flex-direction: column-reverse;
        gap: 32px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(34px, 11vw, 54px);
    }

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

    .content-section,
    .page-hero,
    .detail-hero,
    .player-section,
    .detail-text,
    .quick-search-inner {
        padding: 20px;
    }

    .section-heading,
    .filter-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .movie-grid,
    .related-grid,
    .category-grid,
    .category-grid.large,
    .info-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
    }

    .poster-frame {
        height: 100%;
        min-height: 172px;
    }

    .movie-title {
        min-height: auto;
    }

    .movie-card p {
        min-height: auto;
    }

    .detail-actions,
    .hero-actions {
        width: 100%;
    }

    .primary-button,
    .secondary-button {
        flex: 1 1 160px;
    }
}
