:root {
    --emerald: #10b981;
    --emerald-dark: #059669;
    --teal: #14b8a6;
    --cyan: #06b6d4;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f0fdf4;
    --panel: #ffffff;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

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(--ink);
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 46%, #f0fdfa 100%);
    line-height: 1.6;
}

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;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.92);
    backdrop-filter: blur(16px);
}

.site-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.logo-mark,
.footer-logo span {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 20px;
    color: var(--emerald-dark);
}

.logo-text small {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--emerald-dark);
    background: #d1fae5;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    height: 42px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 0 16px;
    outline: none;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.header-search button,
.mobile-search button,
.primary-button {
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.26);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-menu nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mobile-menu.is-open {
    display: block;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-content {
    width: min(720px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #a7f3d0;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-kicker span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 660px;
    margin: 24px 0 0;
    font-size: 20px;
    color: #e5e7eb;
}

.hero-tags,
.detail-meta,
.movie-card-meta,
.movie-card-pills,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-list span {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
    background: var(--emerald);
}

.quick-categories {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.quick-categories-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-categories a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #065f46;
    font-weight: 800;
    background: #ecfdf5;
    transition: background 0.2s ease, transform 0.2s ease;
}

.quick-categories a:hover {
    transform: translateY(-2px);
    background: #d1fae5;
}

.page-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px 0;
}

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

.section-kicker,
.page-hero span {
    display: inline-block;
    color: var(--emerald-dark);
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.section-heading h2,
.page-hero h1,
.content-card h2,
.info-card h2,
.rank-panel h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
}

.section-heading p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-action,
.filter-link {
    color: var(--emerald-dark);
    font-weight: 900;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

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

.movie-card-link:hover .poster-wrap img {
    transform: scale(1.08);
}

.duration-badge,
.rank-badge {
    position: absolute;
    color: #ffffff;
    font-weight: 900;
    border-radius: 999px;
}

.duration-badge {
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.26);
}

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

.movie-card-pills span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--emerald-dark);
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-meta {
    margin-top: 14px;
    color: #6b7280;
    font-size: 13px;
}

.movie-card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #9ca3af;
}

.movie-card.compact .movie-card-body {
    padding: 13px;
}

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

.movie-card.compact p,
.movie-card.compact .movie-card-meta,
.movie-card.compact .movie-card-pills {
    display: none;
}

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

.category-feature,
.category-card,
.content-card,
.info-card,
.player-card,
.rank-panel {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-feature {
    overflow: hidden;
}

.category-feature-head {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.category-feature-head h3 {
    margin: 0;
    font-size: 24px;
}

.category-feature-head p {
    margin: 6px 0 0;
    color: #ecfdf5;
}

.category-feature-head a {
    font-weight: 900;
}

.mini-list {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.mini-row {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.mini-row:hover {
    background: #f9fafb;
}

.mini-row img {
    width: 84px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.mini-row span {
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    padding: 78px 24px;
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero span {
    color: #d1fae5;
}

.page-hero p {
    max-width: 760px;
    color: #ecfdf5;
    font-size: 20px;
}

.compact-hero {
    background: linear-gradient(135deg, #059669, #14b8a6 52%, #06b6d4);
}

.ranking-hero {
    background: linear-gradient(135deg, #064e3b, #0f766e, #111827);
}

.category-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 46px rgba(15, 23, 42, 0.14);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 140px;
    background: #ccfbf1;
}

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

.category-card-body {
    padding: 24px;
}

.category-card-body h2 {
    margin: 0 0 10px;
}

.category-card-body p {
    margin: 0 0 16px;
    color: var(--muted);
}

.category-card-body span {
    color: var(--emerald-dark);
    font-weight: 900;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
    min-width: min(420px, 100%);
    flex: 1;
}

.filter-bar select {
    min-width: 160px;
}

.empty-state {
    display: none;
    margin: 36px 0 0;
    padding: 32px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.ranking-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.rank-panel h2 {
    font-size: 24px;
    margin-bottom: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: 36px 64px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.rank-row span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-row img {
    width: 64px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-row strong {
    font-size: 14px;
    line-height: 1.35;
}

.rank-row em {
    color: var(--emerald-dark);
    font-style: normal;
    font-weight: 900;
}

.detail-top {
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.detail-top-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 74px 24px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    color: #a7f3d0;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.1;
}

.detail-copy p {
    max-width: 820px;
    margin: 20px 0;
    color: #e5e7eb;
    font-size: 20px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.14);
}

.detail-copy .tag-list {
    margin-top: 18px;
}

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

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

.player-card {
    padding: 16px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.28), rgba(0, 0, 0, 0.62));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 30px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 20px 44px rgba(16, 185, 129, 0.34);
}

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

.content-card,
.info-card {
    padding: 26px;
}

.content-card h2,
.info-card h2 {
    font-size: 26px;
    margin-bottom: 14px;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 18px;
}

.info-card {
    margin-bottom: 24px;
}

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

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

.info-card dd {
    margin: 0;
    font-weight: 800;
}

.info-card a {
    color: var(--emerald-dark);
}

.side-related {
    display: grid;
    gap: 12px;
}

.side-related a {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.side-related a:hover {
    background: #f9fafb;
}

.side-related img {
    width: 92px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.side-related span {
    font-weight: 800;
    line-height: 1.35;
}

.site-footer {
    margin-top: 72px;
    padding: 56px 24px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    color: var(--emerald-dark);
    font-size: 22px;
}

.site-footer p {
    max-width: 460px;
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #065f46;
    background: #ecfdf5;
    font-weight: 700;
}

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

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

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

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

    .rank-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .site-header-inner {
        min-height: 66px;
        padding: 0 16px;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content {
        width: calc(100% - 36px);
        margin-left: 18px;
    }

    .hero-content p,
    .detail-copy p,
    .page-hero p {
        font-size: 17px;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        min-height: 44px;
        padding: 0 18px;
    }

    .quick-categories {
        margin-top: 0;
    }

    .quick-categories-inner {
        border-radius: 0;
    }

    .page-section {
        padding: 44px 16px 0;
    }

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

    .large-grid,
    .movie-grid,
    .compact-grid,
    .category-feature-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-top-inner {
        grid-template-columns: 1fr;
        padding: 42px 16px;
    }

    .detail-poster {
        width: min(300px, 100%);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .logo-text small {
        display: none;
    }

    .logo-text strong {
        font-size: 17px;
    }

    .hero-slider {
        height: 520px;
    }

    .hero-tags span,
    .detail-meta span,
    .tag-list span {
        font-size: 12px;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-link {
        width: 100%;
    }

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

    .rank-row em {
        display: none;
    }
}
