:root {
    --emerald: #059669;
    --teal: #0d9488;
    --cyan: #0891b2;
    --rose: #e11d48;
    --amber: #f59e0b;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eefdf8 38%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: linear-gradient(90deg, #059669 0%, #0d9488 52%, #0891b2 100%);
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.22);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 22px;
    width: min(1200px, calc(100% - 32px));
    min-height: 70px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #064e3b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.nav-links a,
.mobile-panel a {
    font-weight: 650;
    opacity: 0.95;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: #fde68a;
    opacity: 1;
}

.top-search {
    display: flex;
    align-items: center;
    width: min(300px, 28vw);
    padding: 4px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(14px);
}

.top-search input {
    min-width: 0;
    flex: 1;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
    padding: 9px 12px;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.top-search button,
.primary-button,
.secondary-button,
.soft-button {
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.top-search button {
    padding: 8px 14px;
    color: #064e3b;
    font-weight: 800;
    background: #fef3c7;
}

.mobile-toggle {
    display: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 8px 12px;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-links {
    display: grid;
    gap: 12px;
    padding-top: 12px;
}

.page-main {
    min-height: 68vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    background-position: center;
    background-size: cover;
}

.hero-slide.is-active {
    display: block;
    animation: fadeIn 0.7s ease both;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.7) 45%, rgba(2, 6, 23, 0.22) 100%);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.32), transparent 30%), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 42%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 44px;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    padding: 60px 0;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(90deg, #e11d48, #f97316);
    border-radius: 999px;
    box-shadow: 0 12px 25px rgba(225, 29, 72, 0.2);
}

.hero-title {
    margin: 18px 0 16px;
    color: #fff;
    font-size: clamp(40px, 6vw, 70px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hero-desc {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.hero-meta span,
.meta-pill,
.tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
}

.hero-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

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

.primary-button,
.secondary-button,
.soft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 850;
}

.primary-button {
    color: #064e3b;
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.22);
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
}

.soft-button {
    color: #047857;
    background: #ecfdf5;
}

.primary-button:hover,
.secondary-button:hover,
.soft-button:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 28px;
    box-shadow: 0 34px 70px rgba(2, 6, 23, 0.45);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    border: 0;
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 30px;
    background: #fef3c7;
}

.section {
    width: min(1200px, calc(100% - 32px));
    margin: 54px auto;
}

.section-panel {
    padding: 30px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.section-title {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

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

.badge,
.year-badge {
    position: absolute;
    z-index: 2;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
}

.badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    background: linear-gradient(90deg, #10b981, #14b8a6);
}

.year-badge {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(12px);
}

.movie-body {
    padding: 18px;
}

.movie-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--emerald);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.movie-one-line {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #475569;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    color: #047857;
    font-size: 12px;
    font-weight: 750;
    background: #ecfdf5;
}

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

.category-card {
    min-height: 152px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #059669, #0891b2);
    border-radius: 24px;
    box-shadow: 0 18px 30px rgba(8, 145, 178, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #e11d48, #f97316);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #e11d48, #f97316);
    border-radius: 999px;
}

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

.rank-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 850;
}

.rank-desc {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 72px 0 42px;
    color: #fff;
    background: radial-gradient(circle at 25% 20%, rgba(253, 230, 138, 0.22), transparent 24%), linear-gradient(135deg, #064e3b 0%, #0f766e 52%, #0e7490 100%);
}

.page-hero-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 920;
    letter-spacing: -0.04em;
}

.page-desc {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
}

.filter-input {
    width: min(100%, 560px);
    padding: 14px 18px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.filter-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumbs a {
    color: #047857;
    font-weight: 700;
}

.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto 64px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 30px;
    padding: 28px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

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

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

.meta-pill {
    color: #047857;
    font-weight: 750;
    background: #ecfdf5;
}

.detail-intro {
    color: #334155;
    font-size: 18px;
    line-height: 1.85;
}

.player-card,
.article-panel,
.recommend-panel {
    margin-top: 28px;
    padding: 28px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.block-title {
    margin: 0 0 18px;
    font-size: 28px;
    font-weight: 900;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
    border: 0;
    transition: opacity 0.24s ease;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    color: #064e3b;
    font-size: 34px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 999px;
    box-shadow: 0 22px 44px rgba(245, 158, 11, 0.25);
}

.article-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 900;
}

.article-panel h2:not(:first-child) {
    margin-top: 28px;
}

.article-panel p {
    margin: 0;
    color: #334155;
    line-height: 1.95;
    font-size: 17px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #020617);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.footer-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

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

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

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

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
}

.hidden-by-filter {
    display: none !important;
}

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

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

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

    .hero-inner {
        grid-template-columns: 1fr 260px;
    }

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

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

@media (max-width: 760px) {
    .hero-slider {
        height: 720px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
    }

    .hero-poster {
        max-width: 220px;
    }

    .hero-control {
        display: none;
    }

    .section-head,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-item .soft-button {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .rank-cover img {
        width: 70px;
    }

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

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

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

@media (max-width: 520px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .section-panel,
    .player-card,
    .article-panel,
    .recommend-panel,
    .detail-hero {
        padding: 20px;
        border-radius: 22px;
    }

    .hero-title {
        font-size: 38px;
    }
}
