* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: #111827;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 48%, #f0fdfa 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #065f46;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, #059669, #0d9488);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #047857;
    background: #ecfdf5;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-panel input,
.filter-bar input {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #fff;
    transition: 0.2s ease;
}

.top-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.top-search button,
.mobile-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: #10b981;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 10px 12px;
    color: #374151;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 16px 24px 22px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.mobile-panel.open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    color: #374151;
    font-weight: 700;
}

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

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

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

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 40px));
    transform: translate(-50%, -50%);
    color: #fff;
}

.eyebrow,
.page-hero p,
.section-heading p {
    margin: 0 0 10px;
    color: #10b981;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero-content h1 {
    max-width: 720px;
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.7;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #047857;
    background: #d1fae5;
}

.hero-tags span {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.30);
    border: 1px solid rgba(209, 250, 229, 0.35);
}

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

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    padding: 14px 24px;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #0d9488);
    box-shadow: 0 16px 30px rgba(16, 185, 129, 0.25);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 38px rgba(16, 185, 129, 0.32);
}

.ghost-btn {
    padding: 13px 22px;
    color: #ecfdf5;
    border: 1px solid rgba(236, 253, 245, 0.44);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

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

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

.hero-dot.active {
    width: 32px;
    background: #10b981;
}

.page-wrap {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.inner-page {
    padding-top: 38px;
    padding-bottom: 72px;
}

.content-section {
    margin: 64px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.compact-heading {
    margin-bottom: 20px;
}

.section-link {
    padding: 10px 16px;
    color: #047857;
    background: #ecfdf5;
}

.section-link:hover {
    color: #fff;
    background: #10b981;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(209, 250, 229, 0.8);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.14);
    border-color: #6ee7b7;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: 0.45s ease;
}

.movie-card:hover img,
.category-card:hover img {
    transform: scale(1.06);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.66);
}

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

.movie-card h2 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h2 a:hover {
    color: #059669;
}

.movie-meta {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #4b5563;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin: 64px 0;
}

.panel-card {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d1fae5;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 70px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f9fafb;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: #ecfdf5;
    transform: translateX(4px);
}

.rank-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 14px;
    color: #047857;
    font-weight: 900;
    background: #d1fae5;
}

.rank-row img {
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-info strong {
    display: block;
    margin-bottom: 5px;
    line-height: 1.35;
}

.rank-info em {
    display: block;
    color: #6b7280;
    font-style: normal;
    font-size: 13px;
    line-height: 1.45;
}

.category-grid,
.category-grid-small {
    display: grid;
    gap: 20px;
}

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

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

.category-card {
    position: relative;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: 24px;
    padding: 20px;
    color: #fff;
    background: #064e3b;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.10);
}

.category-card.large {
    min-height: 260px;
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: 0.45s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.05), rgba(6, 78, 59, 0.88));
}

.category-card span,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card em {
    margin-top: 8px;
    color: #d1fae5;
    font-style: normal;
    line-height: 1.55;
}

.page-hero {
    border-radius: 32px;
    padding: 56px;
    overflow: hidden;
    position: relative;
}

.soft-hero {
    background: linear-gradient(135deg, #fff, #ecfdf5 58%, #ccfbf1);
    border: 1px solid #d1fae5;
}

.dark-hero {
    color: #fff;
    background: radial-gradient(circle at top left, #10b981, #111827 58%);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.04em;
}

.page-hero span {
    display: block;
    max-width: 720px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.7;
}

.dark-hero span {
    color: #d1d5db;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 420px) 1fr;
    gap: 16px;
    align-items: center;
    margin: 26px 0 40px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d1fae5;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
}

.filter-bar input {
    width: 100%;
}

.year-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.year-filters button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 700;
}

.year-filters button.active,
.year-filters button:hover {
    color: #fff;
    background: #10b981;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 28px 0;
    color: #6b7280;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #059669;
}

.detail-page {
    padding-bottom: 72px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 36px;
    align-items: center;
    padding: 34px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d1fae5;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.09);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

.detail-poster img {
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.lead {
    max-width: 780px;
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 19px;
    line-height: 1.8;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0 0 26px;
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-radius: 16px;
    padding: 14px 16px;
    background: #f9fafb;
}

.info-list strong {
    color: #047857;
}

.info-list span {
    color: #4b5563;
    text-align: right;
}

.player-section {
    position: relative;
    margin: 36px 0;
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(0, 0, 0, 0.54));
    cursor: pointer;
    transition: 0.25s ease;
}

.play-cover span {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    font-size: 36px;
    background: linear-gradient(135deg, #10b981, #0d9488);
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.35);
}

.play-cover:hover {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.26), rgba(0, 0, 0, 0.64));
}

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

.detail-copy {
    display: grid;
    gap: 18px;
    padding: 34px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #d1fae5;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
}

.detail-copy h2 {
    margin: 0;
    color: #064e3b;
    font-size: 28px;
}

.detail-copy p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

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

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

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

.site-footer {
    margin-top: 70px;
    background: #fff;
    border-top: 1px solid #d1fae5;
}

.footer-grid {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-grid p {
    max-width: 520px;
    color: #6b7280;
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 10px 0;
    color: #4b5563;
}

.footer-grid a:hover {
    color: #059669;
}

.footer-bottom {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 30px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 14px;
}

.js-card.is-hidden {
    display: none;
}

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

    .split-section,
    .rank-list.wide {
        grid-template-columns: 1fr;
    }
}

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

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

    .header-inner {
        padding: 12px 18px;
    }

    .hero-carousel {
        min-height: 560px;
    }

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

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

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

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

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

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

@media (max-width: 560px) {
    .page-wrap {
        width: min(100% - 28px, 1280px);
    }

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

    .hero-content {
        width: min(100% - 28px, 1180px);
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .page-hero,
    .detail-hero,
    .detail-copy,
    .panel-card {
        padding: 24px;
        border-radius: 24px;
    }

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

    .info-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 62px 1fr;
    }
}
