:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-300: #6ee7b7;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --teal-600: #0d9488;
    --cyan-900: #164e63;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.18);
    --radius-lg: 16px;
    --radius-xl: 22px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-900);
    background: var(--gray-50);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--gray-900);
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
    font-size: 14px;
}

.logo-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 10px;
    color: var(--gray-700);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--emerald-700);
    background: var(--emerald-50);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--gray-700);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #115e59, var(--cyan-900));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: var(--white);
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.22);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
    max-width: 760px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 21px);
}

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

.hero-tags span,
.card-tags span,
.detail-tags span,
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--emerald-700);
    background: var(--emerald-50);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.14);
}

.hero-actions,
.page-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: var(--emerald-600);
    color: var(--white);
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.24);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.quick-search button:hover {
    background: var(--emerald-700);
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(5, 150, 105, 0.34);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.24);
}

.ghost-button.light {
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.search-band {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    padding: 32px 0;
}

.search-band h2,
.section-title h2,
.side-card h2,
.prose-box h2,
.review-box h2,
.footer-grid h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.search-band p,
.section-title p {
    margin: 6px 0 0;
    color: var(--gray-600);
}

.quick-search,
.catalog-toolbar label {
    display: flex;
    gap: 10px;
}

.quick-search input,
.catalog-filter {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--gray-50);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.catalog-filter:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.section-block {
    padding: 70px 0;
}

.white-block {
    background: var(--white);
}

.soft-block {
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

.section-title {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.section-title > span {
    width: 5px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--emerald-600), var(--teal-600));
    flex: 0 0 auto;
    margin-top: 3px;
}

.blue-title > span {
    background: linear-gradient(180deg, #0891b2, #2563eb);
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--gray-100);
}

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

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

.play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: var(--emerald-600);
    background: rgba(255, 255, 255, 0.94);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.play-icon.small {
    width: 38px;
    height: 38px;
    font-size: 13px;
}

.movie-card:hover .play-icon,
.horizontal-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.quality,
.rank-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 9px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: var(--emerald-600);
}

.card-body {
    padding: 18px;
}

.card-body h2 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.compact .card-body h2 {
    min-height: 48px;
    font-size: 16px;
}

.card-body h2 a:hover,
.horizontal-body h2 a:hover,
.text-link:hover {
    color: var(--emerald-700);
}

.card-meta,
.muted-line,
.detail-meta {
    color: var(--gray-500);
    font-size: 14px;
}

.card-desc {
    display: -webkit-box;
    min-height: 68px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

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

.category-card,
.category-overview-card,
.ranking-side,
.side-card,
.prose-box,
.review-box,
.detail-main {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-card a {
    display: block;
    min-height: 230px;
    padding: 26px;
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card a:hover {
    border-color: var(--emerald-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.category-card h2,
.category-overview-body h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.category-card p,
.category-overview-body p {
    margin: 0;
    color: var(--gray-600);
}

.mini-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.mini-links a {
    color: var(--emerald-700);
    font-size: 14px;
    font-weight: 700;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

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

.wide-list {
    max-width: 920px;
    margin: 0 auto;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.horizontal-cover {
    position: relative;
    min-height: 120px;
    overflow: hidden;
    background: var(--gray-100);
}

.horizontal-body {
    min-width: 0;
    padding: 16px 18px 16px 0;
}

.horizontal-body h2 {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.horizontal-body p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--gray-600);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.list-rank {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: var(--white);
    background: var(--emerald-600);
    font-size: 13px;
    flex: 0 0 auto;
}

.ranking-side {
    align-self: start;
    position: sticky;
    top: 86px;
    padding: 24px;
}

.tag-cloud {
    margin-top: 18px;
}

.text-link {
    display: inline-flex;
    margin-top: 22px;
    color: var(--emerald-700);
    font-weight: 800;
}

.center-actions {
    justify-content: center;
}

.page-hero {
    padding: 82px 0;
    color: var(--white);
}

.gradient-hero {
    background: radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.35), transparent 28%), linear-gradient(135deg, #064e3b, #115e59, #111827);
}

.category-overview-card {
    overflow: hidden;
}

.category-overview-card a {
    display: block;
}

.cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 136px;
    overflow: hidden;
    background: var(--gray-100);
}

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

.category-overview-body {
    padding: 22px;
}

.catalog-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.catalog-toolbar label {
    flex: 1;
    flex-direction: column;
}

.catalog-toolbar span {
    color: var(--gray-700);
    font-weight: 800;
}

.strong-toolbar {
    position: sticky;
    top: 78px;
    z-index: 20;
}

.player-section {
    padding: 24px 0;
    background: #000;
}

.player-container {
    width: min(100%, var(--container));
}

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

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    color: var(--emerald-600);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
    font-size: 30px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-play:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .player-play {
    opacity: 0;
    pointer-events: none;
}

.detail-block {
    background: var(--gray-50);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
}

.detail-main {
    padding: 32px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald-700);
    font-weight: 700;
}

.detail-main h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.detail-tags {
    margin: 18px 0 24px;
}

.prose-box,
.review-box {
    padding: 26px;
    margin-top: 22px;
    border: 1px solid var(--gray-200);
    box-shadow: none;
}

.review-box {
    border-color: var(--emerald-100);
    background: linear-gradient(135deg, var(--emerald-50), #f0fdfa);
}

.prose-box p,
.review-box p {
    margin: 14px 0 0;
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.9;
}

.lead-text {
    color: var(--gray-900) !important;
    font-weight: 700;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 86px;
    padding: 22px;
}

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

.side-list .horizontal-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    box-shadow: none;
    border: 1px solid var(--gray-200);
}

.side-list .horizontal-cover {
    min-height: 78px;
}

.side-list .horizontal-body {
    padding: 10px 10px 10px 0;
}

.side-list .horizontal-body h2 {
    display: -webkit-box;
    margin-bottom: 5px;
    overflow: hidden;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-list .horizontal-body p,
.side-list .muted-line {
    display: none;
}

.site-footer {
    color: var(--gray-300);
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-logo {
    color: var(--white);
    font-size: 20px;
}

.footer-grid p {
    max-width: 380px;
    color: #9ca3af;
}

.footer-grid h2 {
    margin-bottom: 16px;
    color: var(--white);
    font-size: 17px;
}

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

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--emerald-300);
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #6b7280;
    text-align: center;
}

.is-hidden {
    display: none !important;
}

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

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

    .ranking-side,
    .side-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--gray-200);
        border-radius: 16px;
        background: var(--white);
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        justify-content: center;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 72px;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.28));
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .catalog-toolbar,
    .quick-search {
        flex-direction: column;
        align-items: stretch;
    }
}

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

    .hero-carousel {
        height: 520px;
    }

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

    .section-block {
        padding: 48px 0;
    }

    .three-cols,
    .four-cols,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card,
    .side-list .horizontal-card {
        grid-template-columns: 128px minmax(0, 1fr);
    }

    .horizontal-body {
        padding: 12px 12px 12px 0;
    }

    .horizontal-body h2 {
        font-size: 15px;
    }

    .detail-main {
        padding: 22px;
    }

    .player-play {
        width: 66px;
        height: 66px;
    }
}
