:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --panel: #ffffff;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --brand: #10b981;
    --brand-dark: #059669;
    --brand-alt: #0d9488;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(14px);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-alt));
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 21px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-alt));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--brand-dark);
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--text);
    background: #f1f5f9;
}

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

.mobile-nav a {
    display: block;
    padding: 9px 0;
    font-weight: 700;
    color: #334155;
}

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

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--dark);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.08));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    padding-bottom: 72px;
    color: #ffffff;
}

.hero-content h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(34px, 7vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-kicker {
    margin: 0 0 12px;
    color: #a7f3d0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.hero-meta span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.search-strip-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button,
.search-strip-form button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-alt));
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.25);
}

.primary-button:hover,
.search-strip-form button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--brand-dark), #0f766e);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    display: flex;
    gap: 8px;
    z-index: 4;
}

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

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

.page-stack {
    padding: 42px 0 64px;
}

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

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

.section-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-alt));
}

.section-heading h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.section-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.section-link {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.34);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #dbeafe;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(15, 23, 42, 0.42);
    transition: opacity 0.24s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.movie-year {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 8px;
    color: #ffffff;
    background: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.movie-play {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: #ffffff;
    opacity: 0;
    background: rgba(16, 185, 129, 0.9);
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.movie-card-body h3 {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--brand-dark);
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-line {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-strip {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 48px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 28px;
    background: linear-gradient(135deg, #ffffff, #ecfdf5);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.search-strip h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.search-strip p {
    margin: 0;
    color: var(--muted);
}

.search-strip-form,
.page-filter {
    display: flex;
    gap: 12px;
}

.search-strip-form input,
.page-filter input,
.page-filter select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--soft);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.search-strip-form input:focus,
.page-filter input:focus,
.page-filter select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.page-hero {
    padding: 72px 0 52px;
}

.soft-hero {
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.2), transparent 34%),
        linear-gradient(135deg, #ffffff, #ecfeff 55%, #ecfdf5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

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

.page-hero p {
    max-width: 780px;
    margin: 0 0 22px;
    color: #475569;
    font-size: 18px;
}

.search-page-filter {
    max-width: 760px;
}

.search-page-filter select {
    max-width: 190px;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    height: 150px;
    overflow: hidden;
    background: var(--dark-soft);
}

.category-covers img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-copy {
    padding: 22px;
}

.category-copy h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-copy p {
    margin: 0 0 14px;
    color: var(--muted);
}

.category-copy span {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-item img {
    width: 150px;
    height: 96px;
    object-fit: cover;
}

.rank-copy {
    min-width: 0;
    padding: 12px 16px 12px 0;
}

.rank-copy h2,
.rank-copy h3 {
    margin: 0 0 4px;
    overflow: hidden;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 18px;
}

.rank-copy h3 {
    font-size: 16px;
}

.rank-copy p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.rank-copy span {
    display: block;
    overflow: hidden;
    color: #475569;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
}

.full-rank {
    gap: 16px;
}

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

.wide-rank .rank-item img {
    width: 118px;
    height: 150px;
}

.wide-rank .rank-copy {
    padding: 18px 18px 18px 0;
}

.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.24), transparent 32%),
        linear-gradient(135deg, #020617, #0f172a 58%, #064e3b);
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 52px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 28px 54px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

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

.detail-copy h1 {
    max-width: 860px;
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    font-weight: 700;
}

.player-section {
    padding: 42px 0 0;
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.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(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.3));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-alt));
    box-shadow: 0 20px 42px rgba(16, 185, 129, 0.34);
    font-size: 28px;
}

.player-overlay strong {
    font-size: 18px;
}

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

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    border-radius: 12px;
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    text-align: center;
}

.player-message.is-visible {
    display: block;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 34px 0 10px;
}

.text-panel,
.info-panel {
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 22px;
    padding: 26px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.text-panel h2,
.info-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-panel p {
    margin: 0 0 22px;
    color: #334155;
    font-size: 16px;
}

.text-panel p:last-child {
    margin-bottom: 0;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.info-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.info-panel dd {
    margin: 0;
    color: #334155;
}

.empty-state {
    display: none;
    border: 1px dashed var(--soft);
    border-radius: 18px;
    padding: 36px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    font-weight: 800;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 42px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-logo .brand-text {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.footer-brand p {
    max-width: 560px;
    margin: 16px 0 0;
    color: #94a3b8;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin: 0 0 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 18px 0;
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1080px) {
    .desktop-nav {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .hero {
        height: 520px;
    }

    .hero-content {
        padding-bottom: 76px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 32px;
    }

    .search-strip,
    .detail-layout,
    .detail-content,
    .footer-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        padding: 36px 0;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }

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

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

    .rank-item img,
    .wide-rank .rank-item img {
        width: 100px;
        height: 128px;
    }
}

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

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

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .hero {
        height: 500px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-meta {
        gap: 8px;
        font-size: 13px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .search-strip,
    .text-panel,
    .info-panel {
        padding: 20px;
    }

    .search-strip-form,
    .page-filter {
        flex-direction: column;
    }

    .search-page-filter select {
        max-width: none;
    }

    .rank-row {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 13px;
    }

    .rank-copy h2,
    .rank-copy h3 {
        font-size: 15px;
    }
}
