:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f0fdfa;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --cyan: #0891b2;
    --shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

.nav-bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text strong {
    font-size: 20px;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #475569;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0f766e;
    background: #ccfbf1;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #0f172a;
    background: #f1f5f9;
}

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

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(20, 184, 166, 0.38), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 82px;
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #99f6e4;
    background: rgba(15, 118, 110, 0.25);
    border: 1px solid rgba(153, 246, 228, 0.28);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 21px);
}

.hero-tags,
.movie-meta-pills,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-tags span,
.movie-meta-pills span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.28);
}

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

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.category-strip,
.content-section {
    padding: 56px 0;
}

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

.section-heading.compact {
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0 0 6px;
    color: #1e293b;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.section-more {
    color: #0f766e;
    background: #ccfbf1;
    white-space: nowrap;
}

.category-grid,
.video-grid,
.category-overview-grid {
    display: grid;
    gap: 22px;
}

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

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

.category-card,
.category-overview-card,
.video-card,
.detail-main,
.detail-side,
.player-shell {
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 20px;
    border-radius: var(--radius);
    color: #ffffff;
}

.category-card img,
.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card::after,
.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.category-card span,
.category-card p,
.category-overview-card div {
    position: relative;
    z-index: 1;
}

.category-card span {
    display: block;
    margin-top: 72px;
    font-size: 22px;
    font-weight: 800;
}

.category-card p {
    margin: 8px 0 0;
    color: #dbeafe;
    font-size: 14px;
}

.category-card:hover img,
.category-overview-card:hover img,
.video-card:hover img {
    transform: scale(1.08);
}

.video-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0f766e);
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 58%);
    transition: opacity 0.25s ease;
}

.video-card:hover .poster-wrap::after {
    opacity: 1;
}

.duration-badge,
.score-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.duration-badge {
    left: 10px;
    top: 10px;
}

.score-badge {
    right: 10px;
    top: 10px;
    background: rgba(13, 148, 136, 0.86);
}

.rank-number {
    left: 10px;
    bottom: 10px;
    background: rgba(234, 88, 12, 0.9);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #1e293b;
    font-size: 18px;
    line-height: 1.32;
    transition: color 0.2s ease;
}

.video-card:hover h3 {
    color: var(--teal-dark);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
}

.search-label {
    color: #0f766e;
    font-weight: 750;
    white-space: nowrap;
}

.site-search {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #0f172a;
    outline: none;
    background: #f8fafc;
}

.site-search:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.page-hero {
    padding: 72px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 22% 20%, rgba(20, 184, 166, 0.36), transparent 30%),
        linear-gradient(135deg, #0f172a, #0f766e 52%, #0e7490);
}

.page-hero-inner h1 {
    max-width: 860px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
}

.page-hero-inner p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.category-overview-card {
    min-height: 240px;
    display: flex;
    align-items: flex-end;
}

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

.category-overview-card p {
    max-width: 520px;
    margin: 0;
    color: #dbeafe;
}

.movie-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    color: #ffffff;
    background: #020617;
}

.movie-backdrop {
    position: absolute;
    inset: 0;
}

.movie-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: blur(1px);
}

.movie-backdrop span {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42)),
        linear-gradient(0deg, #020617, transparent 70%);
}

.movie-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 44px;
    align-items: end;
    padding: 82px 0 64px;
}

.movie-cover-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.52);
}

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

.movie-hero-copy h1 {
    max-width: 840px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.movie-hero-copy p {
    max-width: 850px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 19px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #99f6e4;
    font-size: 14px;
}

.player-section {
    margin-top: -42px;
    padding-bottom: 48px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.18);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: #020617;
    transition: opacity 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-shade {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.48);
}

.player-button {
    position: relative;
    z-index: 1;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.94);
    font-size: 34px;
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.32);
}

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

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

.detail-main,
.detail-side {
    border-radius: 22px;
    padding: 28px;
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: #1e293b;
    font-size: 24px;
}

.detail-main p {
    margin: 0 0 16px;
    color: #334155;
    font-size: 16px;
}

.detail-side dl {
    margin: 0;
}

.detail-side div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.detail-side dt {
    color: #64748b;
}

.detail-side dd {
    margin: 0;
    color: #0f172a;
    font-weight: 650;
}

.detail-side a {
    color: #0f766e;
}

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

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

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

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

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

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

.empty-result {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

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

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

    .movie-hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .movie-cover-card {
        max-width: 280px;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

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

    .hero-control {
        display: none;
    }

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

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

@media (max-width: 560px) {
    .container-custom {
        width: min(100% - 22px, 1280px);
    }

    .logo-text strong {
        font-size: 17px;
    }

    .logo-text em {
        display: none;
    }

    .hero-carousel,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content h1,
    .movie-hero-copy h1,
    .page-hero-inner h1 {
        letter-spacing: -0.02em;
    }

    .category-grid,
    .video-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-hero-inner {
        padding-top: 52px;
    }

    .movie-cover-card {
        max-width: 210px;
    }

    .player-button {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }

    .detail-main,
    .detail-side {
        padding: 20px;
    }
}
