:root {
    --bg: #03150f;
    --bg-soft: #06251b;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.12);
    --green: #16a34a;
    --green-dark: #065f46;
    --green-deep: #022c22;
    --gold: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(2, 44, 34, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f6fff9 0%, #eefcf4 42%, #ffffff 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

main {
    overflow: hidden;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.96), rgba(2, 44, 34, 0.96));
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(2, 44, 34, 0.22);
    backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    color: #bbf7d0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 22px;
}

.mobile-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    display: grid;
    gap: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    background: #021b13;
    color: #ffffff;
}

.hero-track {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 430px);
    align-items: center;
    gap: 56px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 96px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.96;
}

.hero-bg::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 22% 20%, rgba(34, 197, 94, 0.34), transparent 32%), linear-gradient(180deg, transparent 60%, rgba(3, 21, 15, 0.92));
}

.hero-content,
.hero-poster,
.detail-head,
.page-hero > div {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 12px;
    color: #bbf7d0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--green-dark);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.12);
    color: #047857;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags .tag,
.detail-info .tag {
    background: rgba(255, 255, 255, 0.16);
    color: #dcfce7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

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

.primary-btn,
.home-search button {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(22, 163, 74, 0.32);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

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

.hero-poster {
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-controls {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: -72px auto 0;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 14px;
    padding-bottom: 36px;
}

.hero-prev,
.hero-next {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 30px;
    backdrop-filter: blur(10px);
}

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

.hero-dot {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-align: left;
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-dot img {
    width: 42px;
    height: 54px;
    border-radius: 12px;
    flex: 0 0 auto;
}

.hero-dot span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
}

.hero-dot.active,
.hero-dot:hover {
    background: rgba(34, 197, 94, 0.38);
    transform: translateY(-2px);
}

.search-strip,
.section-block {
    margin-top: 54px;
}

.search-strip {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 480px);
    align-items: center;
    gap: 24px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
}

.search-strip h2,
.section-title h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.home-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.home-search input,
.tool-panel input,
.tool-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    padding: 0 16px;
    outline: none;
}

.home-search input:focus,
.tool-panel input:focus,
.tool-panel select:focus {
    border-color: rgba(22, 163, 74, 0.6);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

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

.section-title > a {
    color: var(--green-dark);
    font-weight: 800;
}

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

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

.category-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #ecfdf5);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 70px rgba(2, 44, 34, 0.22);
}

.category-card span {
    color: var(--green-dark);
    font-weight: 900;
    font-size: 20px;
}

.category-card strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

.category-card em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

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

.movie-card {
    position: relative;
    min-width: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 70px rgba(2, 44, 34, 0.18);
}

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

.poster-wrap img {
    transition: transform 0.45s ease, opacity 0.3s ease;
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(22, 163, 74, 0.92);
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

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

.movie-card h2 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.compact-grid .movie-card h2,
.rank-list .movie-card h2 {
    font-size: 16px;
}

.movie-card p {
    min-height: 48px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.card-foot {
    margin-top: 14px;
    justify-content: space-between;
    color: var(--green-dark);
}

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

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

.page-hero {
    position: relative;
    min-height: 330px;
    display: grid;
    place-items: center;
    padding: 72px 16px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.42), transparent 30%), linear-gradient(135deg, #022c22, #065f46 58%, #111827);
    text-align: center;
}

.small-hero,
.category-hero,
.rank-hero,
.search-hero {
    overflow: hidden;
}

.tool-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.7fr;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.tool-panel label {
    display: grid;
    gap: 8px;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
}

.empty-state {
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background: #03150f;
}

.detail-head {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding: 76px 0;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
}

.detail-stats {
    margin: 22px 0 0;
    color: #dcfce7;
    font-size: 14px;
}

.player-section {
    margin-top: 54px;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 80px rgba(2, 44, 34, 0.26);
    cursor: pointer;
}

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

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.18), rgba(0, 0, 0, 0.26));
    color: #ffffff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    font-size: 34px;
    box-shadow: 0 18px 48px rgba(22, 163, 74, 0.38);
}

.video-shell.is-playing .video-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    margin-top: 34px;
}

.story-card {
    padding: 26px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.story-card p {
    margin: 14px 0 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 72px;
    background: linear-gradient(135deg, #022c22, #064e3b);
    color: #ffffff;
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 900;
}

.footer-grid p,
.footer-grid a {
    display: block;
    margin: 0 0 9px;
    color: #bbf7d0;
    line-height: 1.7;
    font-size: 14px;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: #bbf7d0;
    font-size: 13px;
}

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

    .hero-slide {
        grid-template-columns: 1fr 320px;
    }
}

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

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

    .hero-carousel {
        min-height: auto;
    }

    .hero-track {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 52px 0 120px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        margin: 0 auto;
        transform: none;
    }

    .hero-controls {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        margin-top: -104px;
    }

    .hero-dots {
        display: flex;
        overflow-x: auto;
    }

    .hero-dot {
        min-width: 180px;
    }

    .search-strip,
    .home-search,
    .tool-panel,
    .detail-head,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-poster {
        width: min(280px, 76vw);
        margin: 0 auto;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .footer-grid,
    .footer-bottom,
    .hero-slide,
    .hero-controls {
        width: min(100% - 22px, 1180px);
    }

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

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

    .hero-summary,
    .page-hero p,
    .detail-one-line {
        font-size: 15px;
    }

    .video-overlay span {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }
}
