:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate: #111827;
    --slate-soft: #1f2937;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --cyan: #22d3ee;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #031b13;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
}

.brand-name {
    font-size: 20px;
    background: linear-gradient(90deg, #34d399, #67e8f9);
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 700;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #34d399;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #ffffff;
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    display: none;
    min-height: 72vh;
    padding: 72px 0 34px;
    color: #ffffff;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.12) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: block;
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    min-height: 52vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 52px;
}

.hero-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy h1 em {
    font-style: normal;
    color: #34d399;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.search-form button {
    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,
.search-form button {
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.28);
}

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

.primary-btn.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-panel {
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.hero-panel-text {
    padding: 18px;
    display: grid;
    gap: 6px;
}

.hero-panel-text strong {
    font-size: 22px;
}

.hero-panel-text span {
    color: rgba(255, 255, 255, 0.72);
}

.hero-strip {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.compact-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    border-radius: 20px;
    background: #0f172a;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.28);
}

.compact-card img {
    width: 100%;
    height: 100%;
    min-height: 128px;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.35s ease;
}

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

.compact-card span {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
}

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

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

.hero-dot.is-active {
    width: 32px;
    background: #34d399;
}

.quick-search-section,
.content-section,
.page-main,
.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-section {
    margin-top: -36px;
    position: relative;
    z-index: 4;
}

.quick-search-card,
.filter-panel {
    display: grid;
    gap: 20px;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
}

.quick-search-card h2,
.section-head h2,
.detail-content h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.quick-search-card p,
.section-head p,
.detail-content p,
.category-overview-main p,
.page-hero p,
.category-hero p {
    color: var(--muted);
    line-height: 1.75;
}

.filter-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

.search-form input:focus,
.filter-controls select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.content-section {
    padding: 72px 0 0;
}

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

.section-more {
    min-height: 40px;
    color: var(--emerald-dark);
    background: rgba(16, 185, 129, 0.1);
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card.is-featured .poster-link img {
    aspect-ratio: 16 / 10;
}

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

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(10px);
}

.movie-year {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.82);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 18px;
}

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

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

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

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

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #047857;
    background: #ecfdf5;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 22px;
    border-radius: 26px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 48px 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ranking-row:hover {
    border-color: rgba(16, 185, 129, 0.45);
}

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

.ranking-row img {
    width: 62px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    color: var(--muted);
    font-size: 14px;
}

.page-main {
    padding: 44px 0 0;
}

.page-hero,
.category-hero {
    overflow: hidden;
    border-radius: 32px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #134e4a);
    box-shadow: var(--shadow);
}

.compact-hero {
    padding: 58px;
}

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

.compact-hero p,
.category-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.category-hero {
    min-height: 360px;
    padding: 58px;
    display: flex;
    align-items: end;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.46)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.category-hero .primary-btn {
    margin-top: 24px;
}

.category-overview-list {
    display: grid;
    gap: 22px;
    margin-top: 34px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

.category-overview-main h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-preview-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 20px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 26px 0;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--emerald-dark);
}

.detail-main {
    padding-bottom: 20px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12), rgba(2, 6, 23, 0.34));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    font-size: 30px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.36);
}

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

.detail-info {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-poster {
    width: 148px;
    height: 222px;
    border-radius: 20px;
    object-fit: cover;
}

.detail-info h1 {
    margin: 12px 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    color: var(--muted);
    line-height: 1.75;
}

.detail-tags {
    margin-top: 16px;
}

.detail-content {
    margin-top: 34px;
    padding: 34px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

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

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

.site-footer {
    margin-top: 84px;
    color: rgba(255, 255, 255, 0.76);
    background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

.footer-grid p {
    max-width: 520px;
    margin: 0;
    line-height: 1.75;
}

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

.footer-links a:hover {
    color: #34d399;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

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

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 18px;
        border-radius: 20px;
        background: #0f172a;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: grid;
    }

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

    .hero-panel {
        max-width: 360px;
    }

    .hero-strip,
    .category-preview-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

@media (max-width: 640px) {
    .nav-wrap {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-slide {
        padding-top: 48px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-content,
    .hero-strip,
    .quick-search-section,
    .content-section,
    .page-main,
    .detail-main {
        width: min(100% - 22px, 1180px);
    }

    .hero-strip,
    .movie-grid,
    .featured-grid,
    .category-grid,
    .category-preview-row,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .quick-search-card,
    .filter-panel,
    .compact-hero,
    .category-hero,
    .detail-content,
    .detail-info {
        padding: 22px;
        border-radius: 22px;
    }

    .search-form,
    .filter-controls,
    .section-head,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .detail-poster {
        width: 150px;
        height: 225px;
    }

    .ranking-row {
        grid-template-columns: 38px 54px minmax(0, 1fr);
    }

    .ranking-meta {
        display: none;
    }
}
