* {
    box-sizing: border-box;
}

:root {
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --emerald: #34d399;
    --yellow: #fde047;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #f0fdf4;
    --line: #d1fae5;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(6, 95, 70, 0.16);
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    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: linear-gradient(90deg, var(--green-800), var(--green-600), #0d9488);
    color: var(--white);
    box-shadow: 0 12px 30px rgba(4, 120, 87, 0.25);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

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

.brand-name {
    font-size: 20px;
}

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

.nav-link {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #dcfce7;
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(6, 78, 59, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
    border: 0;
    outline: 0;
    font: inherit;
}

.nav-search input {
    width: 220px;
    padding: 10px 12px;
    color: #ffffff;
    background: transparent;
}

.nav-search input::placeholder {
    color: rgba(220, 252, 231, 0.78);
}

.nav-search button,
.mobile-search button {
    border: 0;
    cursor: pointer;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--green-800);
    background: #ffffff;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    padding: 0 16px 18px;
}

.mobile-menu.open {
    display: block;
    animation: fadeIn 0.25s ease;
}

.mobile-link {
    display: block;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.mobile-link.active {
    color: #dcfce7;
}

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

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(6, 78, 59, 0.48);
}

.hero {
    position: relative;
    min-height: 640px;
    color: #ffffff;
    overflow: hidden;
    background: radial-gradient(circle at 12% 18%, rgba(253, 224, 71, 0.18), transparent 26%), linear-gradient(135deg, #064e3b 0%, #059669 48%, #0f766e 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.36;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 72px 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 41, 31, 0.86), rgba(3, 41, 31, 0.48) 48%, rgba(3, 41, 31, 0.78));
    z-index: -1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.28;
    filter: saturate(1.05) contrast(1.08);
    transform: scale(1.04);
    z-index: -2;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #dcfce7;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-title-accent {
    color: var(--yellow);
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #ecfdf5;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.78;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    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-800);
    background: #ffffff;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(8px);
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(1deg);
}

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

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.68));
}

.hero-poster-info {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 1;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 640px;
    margin-top: 46px;
}

.hero-stat {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    text-align: center;
}

.hero-stat strong {
    display: block;
    color: #ffffff;
    font-size: 34px;
}

.hero-stat span {
    color: #d1fae5;
    font-weight: 600;
}

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

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

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

.section {
    padding: 72px 0;
}

.section.soft {
    background: #ffffff;
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    min-height: 180px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(6, 95, 70, 0.22);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(253, 224, 71, 0.18));
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    font-weight: 900;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.65;
}

.category-count {
    color: var(--green-700);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e5f6ec;
    box-shadow: 0 16px 36px rgba(6, 78, 59, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 58px rgba(6, 78, 59, 0.2);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #059669);
}

.poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.rating {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 30px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #78350f;
    background: #fde68a;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

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

.movie-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--green-700);
    font-size: 13px;
    font-weight: 800;
}

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

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

.movie-card p {
    min-height: 63px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

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

.tag-list span,
.detail-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--green-800);
    background: #d1fae5;
    font-size: 12px;
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(6, 78, 59, 0.08);
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    font-size: 20px;
    font-weight: 900;
}

.rank-poster img {
    width: 82px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-score {
    color: var(--green-700);
    font-size: 20px;
    font-weight: 900;
    white-space: nowrap;
}

.page-hero {
    padding: 76px 0 46px;
    color: #ffffff;
    background: radial-gradient(circle at 8% 18%, rgba(253, 224, 71, 0.16), transparent 26%), linear-gradient(135deg, #064e3b, #059669 52%, #0f766e);
}

.page-title {
    max-width: 860px;
}

.page-title p {
    color: #d1fae5;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #dcfce7;
    font-weight: 700;
}

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

.search-panel {
    display: grid;
    grid-template-columns: 1fr 220px 180px;
    gap: 12px;
    padding: 18px;
    margin-bottom: 26px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.search-panel input,
.search-panel select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f0fdf4;
    color: var(--text);
    border: 1px solid #bbf7d0;
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    border: 1px dashed #86efac;
}

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

.detail-hero {
    position: relative;
    padding: 70px 0;
    color: #ffffff;
    overflow: hidden;
    background: linear-gradient(135deg, #052e22, #047857 52%, #0f766e);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--detail-bg) center / cover no-repeat;
    opacity: 0.18;
    filter: blur(2px) saturate(1.1);
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

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

.detail-content h1 {
    margin: 12px 0 14px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-content .lead {
    max-width: 820px;
    color: #ecfdf5;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.detail-meta span {
    padding: 8px 13px;
    border-radius: 999px;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

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

.panel {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
    margin: 0 0 18px;
}

.panel p {
    color: #374151;
    line-height: 1.92;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #052e22;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.22);
}

.site-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 24px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    text-align: center;
}

.player-overlay span {
    display: inline-grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: var(--green-800);
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
    display: block;
    font-size: 24px;
}

.player-overlay small {
    color: #d1fae5;
    font-weight: 700;
}

.player-shell.is-playing .player-overlay {
    display: none;
}

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

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

.sidebar-item img {
    width: 74px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.sidebar-item h4 {
    margin: 0 0 6px;
    line-height: 1.4;
}

.sidebar-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.site-footer {
    margin-top: 48px;
    padding: 48px 0;
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 28px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1fae5;
}

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .hero-poster-card {
        display: none;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .navbar {
        gap: 12px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 20px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .section-head {
        display: block;
    }

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

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

    .search-panel {
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-score {
        grid-column: 3;
        font-size: 16px;
    }

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

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

    .brand-name {
        font-size: 18px;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        padding: 54px 0;
    }

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

    .hero p {
        font-size: 17px;
    }

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

    .panel {
        padding: 20px;
        border-radius: 22px;
    }
}
