:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --orange: #f97316;
    --red: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 38%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

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

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-weight: 700;
}

.nav-links a {
    transition: color 0.25s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: #f3f4f6;
    border: 0;
    border-radius: 12px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #111827;
    border-radius: 10px;
}

.mobile-panel {
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.28) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0) 56%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 560px;
    flex-direction: column;
    justify-content: center;
    padding: 80px 0 124px;
}

.hero-kicker,
.pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 880px;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin: 16px 0 0;
    max-width: 780px;
    font-size: clamp(28px, 4.2vw, 54px);
    line-height: 1.1;
}

.hero-content p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

.btn-primary,
.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.btn-glass {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px);
}

.btn-primary:hover,
.btn-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(5, 150, 105, 0.34);
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    border: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.hero-search,
.inline-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.hero-search input,
.inline-search input {
    width: min(360px, 48vw);
    min-height: 42px;
    padding: 0 16px;
    color: var(--text);
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
}

.hero-search button,
.inline-search button {
    min-height: 42px;
    padding: 0 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border: 0;
    border-radius: 999px;
    font-weight: 900;
}

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

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-title p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--emerald);
    font-weight: 900;
}

.highlight-band {
    background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.highlight-band.soft {
    background: linear-gradient(180deg, #f3f4f6, #f9fafb);
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta,
.wide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-meta span,
.detail-meta span,
.wide-meta span {
    padding: 3px 8px;
    background: #f3f4f6;
    border-radius: 999px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--emerald);
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

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

.tag-row span {
    padding: 4px 8px;
    color: var(--emerald-dark);
    background: #ecfdf5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.wide-feature {
    position: relative;
    display: block;
    min-height: 420px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.wide-feature img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.wide-cover {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.wide-feature > div {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 42px;
}

.wide-feature h2 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 52px);
    letter-spacing: -0.04em;
}

.wide-feature p {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
}

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

.category-tile {
    min-height: 142px;
    padding: 22px;
    background: linear-gradient(135deg, #ffffff, #ecfdf5);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-tile span {
    color: var(--muted);
}

.page-hero {
    padding: 88px 0;
    color: #ffffff;
    background: radial-gradient(circle at 16% 10%, rgba(16, 185, 129, 0.42), transparent 34%), linear-gradient(135deg, #064e3b, #0f172a 58%, #111827);
}

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

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

.category-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
}

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

.category-card span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.16));
}

.category-card div {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 24px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.search-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.inline-search {
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--line);
}

.large-search {
    width: 100%;
}

.large-search input {
    flex: 1;
    width: auto;
}

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

.rank-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.rank-list b,
.rank-card b {
    color: var(--emerald);
    font-size: 22px;
}

.rank-list span {
    flex: 1;
    font-weight: 800;
}

.rank-list em,
.rank-card i {
    color: #f59e0b;
    font-style: normal;
    font-weight: 900;
}

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

.rank-card a {
    display: grid;
    grid-template-columns: 64px 96px 1fr 64px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
}

.rank-card img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-card strong,
.rank-card em,
.rank-card small {
    display: block;
}

.rank-card strong {
    margin-bottom: 6px;
    font-size: 20px;
}

.rank-card em {
    color: var(--muted);
    font-style: normal;
}

.rank-card small {
    margin-top: 8px;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.12);
    transform: scale(1.08);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    min-height: 560px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.76);
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-info .lead {
    max-width: 850px;
    margin: 18px 0 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
    margin: 18px 0 24px;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(5, 150, 105, 0.34), rgba(2, 6, 23, 0.58));
    border: 0;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.play-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.36);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 22px;
}

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

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-text article {
    padding: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.detail-text h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-text p {
    margin: 0;
    color: #4b5563;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #0f172a, #111827 54%, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-grid p {
    margin: 12px 0 0;
    color: #9ca3af;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #34d399;
}

.footer-bottom {
    padding: 18px 16px;
    color: #9ca3af;
    border-top: 1px solid rgba(229, 231, 235, 0.12);
    text-align: center;
}

[data-card].is-hidden {
    display: none;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 690px;
    }

    .hero-content {
        min-height: 620px;
        padding-bottom: 180px;
    }

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

    .hero-search,
    .inline-search {
        border-radius: 24px;
    }

    .hero-search input,
    .inline-search input {
        width: 100%;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid,
    .rank-list,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .rank-card a {
        grid-template-columns: 46px 82px 1fr;
    }

    .rank-card i {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-card-grid,
    .rank-list,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .wide-feature {
        min-height: 360px;
    }

    .wide-feature > div {
        padding: 26px;
    }

    .page-hero {
        padding: 68px 0;
    }

    .detail-layout {
        padding: 48px 0;
    }

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

    .rank-card a {
        grid-template-columns: 42px 74px 1fr;
        gap: 12px;
    }

    .rank-card img {
        width: 74px;
        height: 100px;
        border-radius: 12px;
    }
}
