* {
    box-sizing: border-box;
}

:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0f766e;
    --cyan-soft: #ecfeff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--gray-50), #ffffff 40%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    height: 66px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo,
.footer-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--gray-700);
    font-size: 15px;
    flex: 1;
    justify-content: center;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--emerald);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background: #dcfce7;
    color: var(--emerald);
}

.menu-toggle {
    display: none;
}

.search-panel {
    display: none;
    border-top: 1px solid var(--gray-200);
    padding: 14px 24px 18px;
}

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

.search-box {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    gap: 14px;
    align-items: center;
}

.site-search-input {
    flex: 1;
    border: 1px solid var(--gray-200);
    outline: none;
    border-radius: 14px;
    padding: 13px 16px;
    background: #ffffff;
}

.site-search-input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.search-hint {
    color: var(--gray-500);
    font-size: 13px;
}

.mobile-nav {
    display: none;
    padding: 12px 24px 18px;
    border-top: 1px solid var(--gray-200);
    background: #ffffff;
}

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

.mobile-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--gray-700);
}

.mobile-nav a:hover {
    background: #ecfdf5;
    color: var(--emerald);
}

.container {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.hero-section {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-bg {
    position: absolute;
    inset: 0;
    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, 0.92), rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
}

.hero-inner {
    position: relative;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 44px;
}

.hero-content {
    max-width: 720px;
    color: #ffffff;
}

.hero-pill,
.section-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #10b981;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-pill {
    padding: 9px 16px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(167, 243, 208, 0.24);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
}

.hero-content h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.75;
}

.hero-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.card-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.hero-tags span {
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.card-tags span {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    transition: all 0.22s ease;
}

.primary-button {
    padding: 14px 25px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 35px rgba(5, 150, 105, 0.28);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(5, 150, 105, 0.36);
}

.primary-button.full {
    width: 100%;
}

.ghost-button {
    padding: 13px 23px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

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

.hero-side-card {
    width: 300px;
    padding: 12px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
    color: #ffffff;
}

.hero-side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
}

.hero-side-card div {
    padding: 14px 8px 4px;
}

.hero-side-card span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 7px;
}

.hero-side-card strong {
    font-size: 18px;
}

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

.white-section {
    background: #ffffff;
}

.gradient-section {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa 52%, #ecfeff);
}

.soft-section {
    background: linear-gradient(180deg, var(--gray-50), #ffffff);
}

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

.section-heading h2,
.sub-hero h1 {
    margin: 6px 0 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-link,
.text-link {
    color: var(--emerald);
    font-weight: 700;
}

.section-link:hover,
.text-link:hover {
    color: var(--teal);
}

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

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

.card-grid-item,
.featured-card,
.rank-card,
.category-card,
.info-card,
.detail-panel {
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-grid-item {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-grid-item:hover,
.featured-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--gray-100);
}

.poster img,
.featured-media img,
.category-card-media img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-grid-item:hover .poster img,
.featured-card:hover .featured-media img,
.category-card:hover .category-card-media img,
.rank-card:hover .rank-cover img {
    transform: scale(1.08);
}

.poster-badge,
.poster-play,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
}

.poster-play {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.9);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.card-grid-item:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-card h3,
.featured-content h3,
.rank-content h3,
.category-card h2 {
    margin: 0;
    line-height: 1.35;
    font-size: 17px;
}

.movie-card h3 a:hover,
.featured-content h3 a:hover,
.rank-content h3 a:hover,
.category-card h2 a:hover {
    color: var(--emerald);
}

.movie-card p,
.featured-content p,
.rank-content p,
.category-card p,
.footer-grid p,
.sub-hero p,
.detail-title-block p,
.detail-panel p {
    color: var(--gray-500);
    line-height: 1.75;
}

.movie-card p {
    display: -webkit-box;
    margin: 8px 0 10px;
    min-height: 42px;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    color: var(--gray-500);
    font-size: 12px;
    margin-bottom: 10px;
}

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

.featured-card {
    display: grid;
    grid-template-columns: 42% 1fr;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-media {
    position: relative;
    min-height: 260px;
    overflow: hidden;
}

.play-chip {
    left: 18px;
    bottom: 18px;
    padding: 8px 13px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
}

.featured-content {
    padding: 24px;
    align-self: center;
}

.eyebrow {
    margin-bottom: 10px;
}

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

.category-preview {
    padding: 22px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, var(--gray-50));
    box-shadow: var(--shadow-sm);
}

.category-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.category-preview h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.category-preview p {
    margin: 0;
    color: var(--gray-500);
}

.category-preview a,
.category-card .text-link {
    color: var(--emerald);
    font-weight: 700;
}

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

.mini-grid .movie-card-body p,
.mini-grid .card-tags,
.mini-grid .movie-meta {
    display: none;
}

.sub-hero {
    padding: 78px 0 64px;
    background: linear-gradient(135deg, #ecfdf5, #ffffff 54%, #eff6ff);
    border-bottom: 1px solid var(--gray-200);
}

.sub-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    margin-bottom: 24px;
}

.sub-hero .breadcrumbs {
    color: var(--gray-500);
}

.breadcrumbs a:hover {
    color: var(--emerald);
}

.category-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    align-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card-media {
    height: 180px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--gray-100);
}

.category-card h2 {
    font-size: 26px;
    margin-bottom: 10px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: center;
}

.rank-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 26px rgba(5, 150, 105, 0.22);
}

.rank-card {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 12px 18px 12px 12px;
}

.rank-cover {
    height: 94px;
    border-radius: 14px;
    overflow: hidden;
}

.rank-content p {
    margin: 8px 0 10px;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.detail-bg,
.detail-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg {
    object-fit: cover;
    filter: blur(10px);
    transform: scale(1.06);
    opacity: 0.42;
}

.detail-overlay {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.24));
}

.detail-hero-inner {
    position: relative;
    padding-top: 76px;
    color: #ffffff;
}

.detail-title-block {
    display: grid;
    grid-template-columns: 220px minmax(0, 780px);
    gap: 34px;
    align-items: center;
}

.detail-title-block h1 {
    margin: 8px 0 18px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-title-block p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-poster {
    width: 220px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.detail-main-section {
    padding-top: 46px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(5, 150, 105, 0.1), rgba(0, 0, 0, 0.42));
    cursor: pointer;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 45px rgba(5, 150, 105, 0.36);
    font-size: 28px;
    padding-left: 4px;
}

.detail-panel {
    margin-top: 24px;
    padding: 28px;
}

.detail-panel h2,
.info-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-panel p {
    margin: 0 0 26px;
    color: var(--gray-700);
    font-size: 16px;
}

.detail-panel p:last-child {
    margin-bottom: 0;
}

.info-card {
    padding: 24px;
    position: sticky;
    top: 90px;
}

.info-card dl {
    margin: 0 0 22px;
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px 10px;
}

.info-card dt {
    color: var(--gray-500);
}

.info-card dd {
    margin: 0;
    color: var(--gray-900);
    font-weight: 700;
}

.site-footer {
    padding: 54px 0 24px;
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
    border-top: 1px solid var(--gray-200);
}

.footer-grid {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 36px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-grid a:not(.footer-logo) {
    display: block;
    color: var(--gray-500);
    margin: 8px 0;
}

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

.copyright {
    width: min(1280px, calc(100% - 40px));
    margin: 28px auto 0;
    padding-top: 18px;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-200);
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1180px) {
    .compact-grid,
    .all-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-side-card {
        display: none;
    }
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-inner {
        align-items: end;
        padding-bottom: 60px;
    }

    .featured-grid,
    .category-preview-grid,
    .category-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .featured-card,
    .category-card,
    .rank-card,
    .detail-title-block {
        grid-template-columns: 1fr;
    }

    .featured-media,
    .category-card-media {
        min-height: auto;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .rank-card {
        align-items: start;
    }

    .rank-cover {
        height: 180px;
    }

    .detail-poster {
        width: 180px;
    }

    .info-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .nav-shell {
        padding: 0 16px;
    }

    .container {
        width: min(100% - 28px, 1280px);
    }

    .logo,
    .footer-logo {
        font-size: 24px;
    }

    .search-box {
        display: block;
    }

    .search-hint {
        display: block;
        margin-top: 8px;
    }

    .hero-section {
        min-height: 600px;
        height: 74vh;
    }

    .hero-inner {
        padding-inline: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .section-heading {
        display: block;
    }

    .section-link {
        display: inline-flex;
        margin-top: 12px;
    }

    .compact-grid,
    .all-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .card-tags {
        display: none;
    }

    .sub-hero,
    .detail-hero-inner {
        padding-top: 48px;
    }

    .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
}
