:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-soft: #ccfbf1;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f9fafb;
    --white: #ffffff;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #14b8a6);
    box-shadow: 0 10px 18px rgba(13, 148, 136, 0.24);
    font-size: 14px;
}

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

.nav-link {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.site-search {
    position: relative;
    width: 260px;
}

.site-search input,
.mobile-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 8px;
    max-height: 430px;
    overflow: auto;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
}

.search-result-item:hover {
    background: #f3f4f6;
}

.search-result-item img {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    background: #e5e7eb;
}

.search-result-item strong {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}

.search-result-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 26px;
    color: #374151;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: #ffffff;
    padding: 12px 20px 18px;
}

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

.mobile-link {
    display: block;
    padding: 10px 0;
    font-weight: 700;
    color: #374151;
}

.mobile-search {
    position: relative;
    margin-top: 10px;
}

.page-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 56px;
}

.home-main {
    padding-top: 92px;
}

.hero {
    position: relative;
    height: min(70vh, 680px);
    min-height: 520px;
    border-radius: 28px;
    overflow: hidden;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 1.2s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    width: min(650px, calc(100% - 56px));
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: clamp(28px, 7vw, 84px);
    color: #ffffff;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 800;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 7px 12px;
    margin-bottom: 14px;
}

.hero-label {
    color: #ccfbf1;
    background: rgba(13, 148, 136, 0.28);
    border: 1px solid rgba(153, 246, 228, 0.35);
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 22px 0 0;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

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

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-row span {
    color: #475569;
    background: #f1f5f9;
}

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

.btn-primary,
.btn-ghost,
.wide-search button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.wide-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #14b8a6);
    box-shadow: 0 16px 30px rgba(13, 148, 136, 0.25);
    padding: 13px 20px;
    border: 0;
}

.btn-primary:hover,
.btn-ghost:hover,
.wide-search button:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 13px 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 34px;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-panel,
.section-block,
.ranking-panel,
.page-hero,
.category-overview-card,
.filter-panel,
.rank-list-panel,
.detail-panel,
.sidebar-card,
.player-card {
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.quick-search-panel {
    margin: 28px 0;
    padding: 24px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: center;
}

.quick-search-panel h2,
.section-head h2,
.ranking-panel h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
}

.quick-search-panel p,
.page-hero p,
.category-overview-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.wide-search {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.wide-search .search-results {
    top: calc(100% + 12px);
}

.section-block,
.ranking-panel,
.rank-list-panel {
    padding: 26px;
    margin-bottom: 28px;
}

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

.section-head a,
.text-link {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 20px;
    color: #ffffff;
    background: #111827;
    isolation: isolate;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.45s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.78));
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 2;
    display: block;
    padding-inline: 18px;
}

.category-tile span {
    margin-top: 96px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.category-tile:hover img {
    transform: scale(1.08);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.poster-wrap {
    position: relative;
    display: block;
    height: 250px;
    overflow: hidden;
    background: #e5e7eb;
}

.movie-card-large .poster-wrap {
    height: 310px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(13, 148, 136, 0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
    opacity: 1;
}

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

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

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
}

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

.ranking-panel {
    height: fit-content;
    position: sticky;
    top: 92px;
}

.ranking-panel ol,
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-panel li a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.ranking-panel li span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
}

.ranking-panel strong {
    display: block;
    line-height: 1.4;
}

.ranking-panel em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    padding: 34px;
    margin-bottom: 28px;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.18), transparent 40%), #ffffff;
}

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

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
}

.category-covers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.category-covers img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
    background: #e5e7eb;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 24px;
}

.category-list {
    align-items: start;
}

.rank-list li a {
    display: grid;
    grid-template-columns: 52px 110px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.rank-list img {
    width: 110px;
    height: 74px;
    object-fit: cover;
    border-radius: 14px;
    background: #e5e7eb;
}

.rank-number {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #14b8a6);
    font-weight: 900;
}

.rank-list strong {
    display: block;
    font-size: 18px;
}

.rank-list p {
    margin: 6px 0;
    color: var(--muted);
    line-height: 1.55;
}

.rank-list em {
    color: #64748b;
    font-style: normal;
    font-size: 13px;
}

.detail-breadcrumb {
    margin-bottom: 20px;
}

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

.player-card {
    overflow: hidden;
    margin-bottom: 22px;
    background: #030712;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #030712;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.16), rgba(3, 7, 18, 0.64));
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(13, 148, 136, 0.95);
    box-shadow: 0 18px 38px rgba(13, 148, 136, 0.32);
    font-size: 30px;
}

.detail-panel {
    padding: 28px;
}

.detail-panel h1 {
    margin: 16px 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
}

.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #0f766e;
    background: #ccfbf1;
    font-weight: 800;
    font-size: 13px;
}

.lead-text {
    margin: 0 0 20px;
    padding: 18px;
    border-left: 4px solid var(--primary);
    border-radius: 16px;
    color: #134e4a;
    background: #f0fdfa;
    font-weight: 700;
    line-height: 1.75;
}

.detail-panel h2 {
    margin: 28px 0 10px;
    font-size: 22px;
}

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

.detail-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.sidebar-card {
    padding: 18px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    background: #e5e7eb;
}

.poster-card h2 {
    margin: 14px 0 6px;
    font-size: 20px;
}

.poster-card p {
    margin: 0;
    color: var(--muted);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    align-items: center;
}

.rank-card img {
    width: 82px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    background: #e5e7eb;
}

.rank-card span {
    font-weight: 800;
    line-height: 1.35;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
    padding: 46px 0 24px;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a:hover {
    color: #5eead4;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1040px) {
    .site-search {
        display: none;
    }

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

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

    .ranking-panel,
    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-nav {
        height: 62px;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .page-main {
        width: min(100% - 24px, 1180px);
        padding-top: 82px;
    }

    .hero {
        min-height: 560px;
        border-radius: 22px;
    }

    .hero-content {
        width: calc(100% - 44px);
        margin-left: 22px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-panel,
    .wide-search,
    .filter-panel,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-list li a {
        grid-template-columns: 42px 86px 1fr;
        gap: 12px;
    }

    .rank-list img {
        width: 86px;
        height: 62px;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 17px;
    }

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

    .poster-wrap,
    .movie-card-large .poster-wrap {
        height: 300px;
    }

    .section-block,
    .ranking-panel,
    .page-hero,
    .detail-panel,
    .sidebar-card {
        padding: 20px;
        border-radius: 20px;
    }
}
