:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 22px 50px rgba(15, 23, 42, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--gray-800);
    background: var(--green-50);
    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;
    color: var(--white);
    background: linear-gradient(90deg, var(--green-600), var(--green-500), var(--emerald-500));
    box-shadow: var(--shadow-md);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    font-size: 18px;
}

.brand-text,
.footer-brand div {
    display: grid;
    line-height: 1.2;
}

.brand-text strong,
.footer-brand strong {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-text small,
.footer-brand small {
    color: var(--green-100);
    font-size: 12px;
}

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

.nav-link {
    opacity: 0.92;
    font-weight: 600;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--green-100);
    opacity: 1;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input {
    width: 210px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 10px 44px 10px 16px;
    color: var(--white);
    outline: none;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    transition: width 0.25s ease, background 0.25s ease;
}

.header-search input:focus {
    width: 280px;
    background: rgba(255, 255, 255, 0.24);
}

.header-search input::placeholder {
    color: var(--green-100);
}

.header-search button {
    position: absolute;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--white);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 14px 18px 18px;
}

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

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

.mobile-nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    border-radius: 14px;
    padding: 10px 12px;
}

.mobile-search button {
    border: 0;
    border-radius: 14px;
    color: var(--green-700);
    background: var(--white);
    padding: 0 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(110deg, #15803d 0%, #10b981 48%, #16a34a 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image: radial-gradient(circle at 2px 2px, #ffffff 1px, transparent 0);
    background-size: 40px 40px;
}

.hero-shell {
    position: relative;
    z-index: 1;
    min-height: 610px;
    padding: 58px 0 86px;
}

.hero-slide {
    display: none;
    align-items: center;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
    gap: 46px;
    min-height: 460px;
}

.hero-slide.active {
    display: grid;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--green-100);
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.17);
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.hero h2 {
    margin: 0 0 14px;
    font-size: clamp(26px, 3.4vw, 44px);
    line-height: 1.16;
}

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

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

.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.btn-primary {
    color: var(--green-700);
    background: var(--white);
    box-shadow: 0 16px 30px rgba(6, 95, 70, 0.22);
}

.btn-ghost {
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}

.btn-link {
    color: var(--green-100);
    padding-inline: 8px;
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    min-height: 430px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: rotate(1.5deg);
    background: rgba(255, 255, 255, 0.15);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.02));
}

.hero-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--white);
    font-size: 28px;
    box-shadow: var(--shadow-md);
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--white);
    font-size: 30px;
}

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

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

.hero-dot.active {
    width: 30px;
    background: var(--white);
}

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 92px;
    background: var(--green-50);
    clip-path: polygon(0 38%, 8% 45%, 18% 50%, 28% 48%, 40% 40%, 52% 44%, 64% 52%, 78% 48%, 90% 38%, 100% 44%, 100% 100%, 0 100%);
}

.main-section,
.page-section {
    padding: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    color: var(--gray-800);
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--gray-600);
}

.section-heading a {
    color: var(--green-600);
    font-weight: 800;
}

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

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

.movie-card,
.category-tile,
.info-panel,
.player-panel,
.search-panel,
.detail-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

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

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-100), var(--emerald-500));
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.28));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-category,
.rank-badge,
.side-rank {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    color: var(--white);
    background: var(--green-500);
    font-size: 12px;
    font-weight: 800;
}

.card-category {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.horizontal-card h3 a:hover {
    color: var(--green-600);
}

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--gray-600);
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--gray-500);
    font-size: 12px;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
    gap: 24px;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.horizontal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.horizontal-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
}

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

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

.horizontal-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.horizontal-card p {
    margin: 0 0 10px;
    color: var(--gray-600);
    font-size: 14px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    padding: 24px;
    min-height: 170px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, var(--green-500), var(--emerald-600));
    transition: opacity 0.25s ease;
}

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

.category-tile:hover::before {
    opacity: 1;
}

.category-tile > * {
    position: relative;
    z-index: 1;
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.category-tile:hover h3,
.category-tile:hover p {
    color: var(--white);
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(110deg, var(--green-600), var(--emerald-600));
    padding: 62px 0;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle at 2px 2px, #ffffff 1px, transparent 0);
    background-size: 36px 36px;
}

.page-hero .container {
    position: relative;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--green-100);
    font-size: 18px;
}

.filter-bar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    padding: 16px;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
    min-height: 46px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: var(--white);
}

.filter-bar input,
.search-panel input {
    flex: 1;
    min-width: 230px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.notice-text {
    margin: 18px 0 0;
    color: var(--gray-600);
}

.detail-hero {
    color: var(--white);
    background: linear-gradient(110deg, rgba(21, 128, 61, 0.96), rgba(5, 150, 105, 0.95)), var(--green-600);
    padding: 38px 0 54px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--green-100);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--white);
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

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

.detail-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.12;
}

.detail-hero p {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta span {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--green-700);
    background: var(--green-100);
    font-weight: 800;
    font-size: 13px;
}

.player-panel {
    overflow: hidden;
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.player-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: opacity 0.22s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

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

.play-button {
    position: relative;
    z-index: 1;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--white);
    font-size: 34px;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
}

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

.detail-panel {
    padding: 28px;
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: var(--gray-700);
}

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

.related-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--gray-50);
}

.related-item img {
    width: 92px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.25;
}

.related-item span {
    color: var(--gray-500);
    font-size: 12px;
}

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

.empty-state {
    display: none;
    padding: 32px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-600);
    text-align: center;
}

.empty-state.show {
    display: block;
}

.site-footer {
    color: var(--gray-300);
    background: linear-gradient(180deg, var(--gray-800), var(--gray-900));
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    padding: 48px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 12px 0 0;
    color: var(--gray-300);
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: var(--green-500);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--gray-500);
    text-align: center;
    padding: 20px 12px;
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

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

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

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

@media (max-width: 820px) {
    .hero-shell {
        min-height: auto;
        padding: 40px 0 76px;
    }

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

    .hero-poster {
        min-height: 320px;
        transform: none;
    }

    .hero-poster img {
        min-height: 320px;
    }

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

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

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

    .detail-cover {
        max-width: 230px;
    }

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

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

    .brand-text strong {
        font-size: 20px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero h2 {
        font-size: 26px;
    }

    .hero p,
    .page-hero p,
    .detail-hero p {
        font-size: 16px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

    .horizontal-card,
    .related-item {
        grid-template-columns: 116px minmax(0, 1fr);
    }

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

    .detail-panel {
        padding: 22px;
    }
}

.filter-bar .btn-ghost {
    color: var(--green-700);
    background: var(--green-50);
    box-shadow: inset 0 0 0 1px var(--green-200);
}

.filter-bar .btn-primary,
.search-panel .btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--green-600), var(--emerald-600));
    box-shadow: 0 12px 26px rgba(22, 163, 74, 0.22);
}
