:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0f766e;
    --cyan: #0891b2;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

body {
    background: #f3f4f6;
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

.brand-text {
    font-size: 19px;
    letter-spacing: -0.02em;
}

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

.main-nav a,
.footer-links a {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover {
    color: var(--emerald);
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.header-search input {
    width: 180px;
    padding: 10px 14px;
    outline: none;
    color: #111827;
    background: transparent;
}

.header-search button,
.large-search button,
.search-filter-bar button {
    padding: 10px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #111827;
    background: #f3f4f6;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #059669, #0f766e, #0891b2);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image: linear-gradient(90deg, rgba(5, 150, 105, 0.92), rgba(15, 118, 110, 0.72), rgba(8, 145, 178, 0.34)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.2), transparent 30%), rgba(0, 0, 0, 0.18);
}

.hero-content {
    position: relative;
    max-width: 1280px;
    min-height: 560px;
    margin: 0 auto;
    padding: 88px 24px 82px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 56px;
    align-items: center;
}

.hero-copy {
    color: #ffffff;
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.section-kicker {
    color: var(--emerald-dark);
    background: #d1fae5;
    border-color: #a7f3d0;
}

.hero-copy h1 {
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.hero-copy p {
    max-width: 720px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions,
.detail-info .primary-btn {
    margin-top: 30px;
}

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.32);
}

.ghost-btn {
    margin-left: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
}

.hero-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    color: #ffffff;
}

.hero-prev,
.hero-next,
.hero-dot {
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
}

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

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.intro-search-panel {
    margin-top: -48px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.78);
}

.intro-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #111827;
}

.intro-search-panel h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.intro-search-panel p,
.page-hero p,
.category-card-large p,
.category-tile p,
.detail-content p {
    color: var(--muted);
    line-height: 1.8;
}

.large-search {
    display: flex;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
    outline: none;
}

.large-search button {
    padding-left: 24px;
    padding-right: 24px;
}

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

.section-heading h2 {
    font-size: 34px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

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

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

.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

.movie-meta a,
.movie-meta span {
    color: #047857;
}

.movie-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
    color: #111827;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: var(--emerald-dark);
}

.movie-card p {
    min-height: 48px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 700;
}

.category-section {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 32px;
}

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

.category-tile,
.category-card-large {
    display: block;
    padding: 24px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.86);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
    border-color: #a7f3d0;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
}

.category-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.22);
}

.category-tile strong,
.category-card-large h2 {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}

.category-samples,
.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.category-samples a,
.category-preview-links a {
    color: #047857;
    font-size: 13px;
    font-weight: 700;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
}

.wide-list {
    display: grid;
    gap: 18px;
}

.wide-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
}

.wide-card .poster-link img {
    height: 100%;
    aspect-ratio: 3 / 2;
}

.rank-panel,
.page-rank-list {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.86);
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-number {
    font-size: 22px;
    font-weight: 900;
    color: var(--emerald-dark);
}

.rank-thumb img {
    width: 74px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info h3 {
    font-size: 16px;
    font-weight: 850;
    margin-bottom: 6px;
}

.rank-info p {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    max-width: 1280px;
    margin: 36px auto 0;
    padding: 56px 24px;
    border-radius: 30px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(38px, 5vw, 62px);
    margin-bottom: 14px;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.page-hero .section-kicker {
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

.category-hero,
.search-hero,
.rank-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.inner-search {
    min-width: 420px;
}

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

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

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

.search-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px 180px 120px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-filter-bar input,
.search-filter-bar select {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: #ffffff;
}

.search-filter-bar button {
    border-radius: 14px;
}

.movie-detail {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 24px 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 26px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 30px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.86);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
}

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

.detail-info h1 {
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    margin-bottom: 16px;
}

.detail-one-line {
    color: #4b5563;
    font-size: 18px;
    line-height: 1.75;
    margin-bottom: 18px;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-weight: 800;
    font-size: 13px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 26px 62px rgba(15, 23, 42, 0.22);
}

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.56));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-size: 34px;
    box-shadow: 0 20px 44px rgba(5, 150, 105, 0.4);
}

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

.detail-content {
    margin-top: 32px;
    padding: 34px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.86);
}

.detail-content h2 {
    font-size: 26px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.detail-content p + h2 {
    margin-top: 30px;
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

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

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

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

    .split-section,
    .intro-search-panel {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        order: -1;
    }
}

@media (max-width: 860px) {
    .header-inner {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .main-nav,
    .header-search {
        display: none;
        width: 100%;
    }

    .main-nav.is-open,
    .header-search.is-open {
        display: flex;
    }

    .main-nav.is-open {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 12px;
    }

    .header-search.is-open input {
        flex: 1;
        width: auto;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 640px;
        padding-top: 62px;
    }

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

    .intro-search-panel {
        margin: 18px 16px 0;
        padding: 28px 20px;
    }

    .section-wrap {
        padding: 44px 16px;
    }

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

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

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

    .category-hero,
    .search-hero,
    .rank-hero,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .inner-search {
        min-width: 0;
        width: 100%;
    }

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 16px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 620px;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .hero-copy p {
        font-size: 15px;
        -webkit-line-clamp: 5;
    }

    .ghost-btn {
        margin-left: 0;
        margin-top: 10px;
    }

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

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

    .rank-thumb img {
        width: 64px;
        height: 84px;
    }

    .detail-hero,
    .detail-content {
        padding: 22px;
        border-radius: 22px;
    }

    .player-start span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
