:root {
    --color-emerald: #10b981;
    --color-emerald-dark: #059669;
    --color-teal: #0d9488;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #f5f7fa;
    --color-border: #e5e7eb;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 16px 45px rgba(15, 23, 42, 0.14);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: #f3f4f6;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.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.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-emerald-dark);
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-emerald), var(--color-teal));
    box-shadow: 0 12px 22px rgba(16, 185, 129, 0.25);
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

.logo:hover .logo-mark {
    transform: scale(1.06);
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-link,
.nav-toggle {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-link:hover,
.nav-toggle:hover {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-emerald-dark);
}

.nav-toggle {
    display: none;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--color-border);
    padding: 10px 0 18px;
}

.mobile-nav-inner {
    display: grid;
    gap: 12px;
    font-weight: 700;
    color: #374151;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #030712;
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.62) 48%, rgba(3, 7, 18, 0.18));
}

.hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: 9%;
    top: 18%;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.25);
    filter: blur(80px);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 690px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: #6ee7b7;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.eyebrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-emerald);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.16);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 7vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 22px;
    font-size: 18px;
    color: #e5e7eb;
}

.hero-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.tag,
.rank-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #f9fafb;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero-actions,
.section-head,
.detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-actions {
    justify-content: flex-start;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff;
    background: var(--color-emerald);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    background: var(--color-emerald-dark);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn-soft {
    color: var(--color-emerald-dark);
    background: rgba(16, 185, 129, 0.1);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 26px;
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--color-emerald);
}

.page-main {
    padding: 44px 0 72px;
}

.home-main {
    padding-top: 48px;
}

.section {
    margin-bottom: 64px;
}

.section-head {
    margin-bottom: 24px;
}

.section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -0.03em;
}

.section-title::before {
    content: "";
    width: 10px;
    height: 28px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--color-emerald), var(--color-teal));
}

.section-desc {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transform: translateZ(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.movie-cover.wide {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.02), rgba(17, 24, 39, 0.82));
    transition: opacity 0.25s ease;
}

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

.badge-row {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 25px;
    padding: 0 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-body {
    padding: 15px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary {
    margin: 0 0 12px;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: var(--color-muted);
    font-size: 12px;
    justify-content: space-between;
}

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

.category-card {
    position: relative;
    min-height: 178px;
    padding: 24px;
    overflow: hidden;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #065f46 55%, #0f766e);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -40px;
    bottom: -50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

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

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 18px;
    color: #a7f3d0;
    font-weight: 800;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 14% 24%, rgba(16, 185, 129, 0.34), transparent 30%),
        linear-gradient(135deg, #030712 0%, #064e3b 52%, #0f766e 100%);
}

.page-hero h1 {
    max-width: 860px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #d1fae5;
    font-size: 17px;
}

.filter-bar {
    margin: 0 0 28px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-input,
.filter-select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    padding: 0 14px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-no {
    font-size: 24px;
    font-weight: 900;
    color: var(--color-emerald-dark);
    text-align: center;
}

.rank-cover {
    width: 96px;
    height: 72px;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

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

.rank-info h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.rank-info p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-label {
    color: var(--color-emerald-dark);
    background: rgba(16, 185, 129, 0.1);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #d1fae5;
    font-size: 14px;
}

.breadcrumb a {
    color: #a7f3d0;
    font-weight: 700;
}

.detail-hero {
    padding: 42px 0 38px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.22), transparent 26%),
        linear-gradient(135deg, #030712, #111827 50%, #064e3b);
}

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

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.4);
    background: #111827;
}

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

.watch-panel {
    margin-top: 28px;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.94);
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.36);
    font-size: 30px;
    padding-left: 4px;
}

.play-text {
    font-size: 18px;
    font-weight: 900;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    margin-top: 34px;
}

.content-card,
.side-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.content-card {
    padding: 30px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
    letter-spacing: -0.02em;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.tag {
    color: var(--color-emerald-dark);
    background: rgba(16, 185, 129, 0.1);
}

.side-card {
    padding: 22px;
}

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

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

.related-thumb {
    width: 72px;
    height: 92px;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item p {
    margin: 0;
    color: var(--color-muted);
    font-size: 12px;
}

.pagination-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.pagination-links a {
    padding: 12px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.09);
    color: var(--color-emerald-dark);
    font-weight: 800;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 28px;
    padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #6ee7b7;
}

.site-footer p {
    margin: 0;
    max-width: 480px;
    color: #d1d5db;
    font-size: 14px;
}

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

.footer-links a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
}

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

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

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

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

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

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

@media (max-width: 760px) {
    .desktop-nav,
    .search-link span {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

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

    .logo {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 620px;
    }

    .hero-mask {
        background: linear-gradient(180deg, rgba(3, 7, 18, 0.62), rgba(3, 7, 18, 0.92));
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 86px;
    }

    .hero-control {
        display: none;
    }

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

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

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

    .rank-item {
        grid-template-columns: 42px 76px minmax(0, 1fr);
    }

    .rank-label {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .rank-cover {
        width: 76px;
        height: 60px;
    }

    .content-card {
        padding: 22px;
    }

    .pagination-links {
        grid-template-columns: 1fr;
    }

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