:root {
    --site-primary: #0d9488;
    --site-primary-dark: #0f766e;
    --site-blue: #2563eb;
    --site-slate: #0f172a;
    --site-slate-soft: #1e293b;
    --site-muted: #64748b;
    --site-bg: #f8fafc;
    --site-card: #ffffff;
    --site-border: #e2e8f0;
    --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --site-radius: 22px;
}

* {
    box-sizing: border-box;
}

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

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--site-primary), var(--site-blue));
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.3);
}

.logo-text {
    background: linear-gradient(90deg, var(--site-primary), var(--site-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    font-weight: 650;
    color: #334155;
}

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

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--site-primary);
}

.header-search {
    position: relative;
    width: 260px;
    flex: 0 0 auto;
}

.header-search input,
.hero-search input,
.filter-input,
.search-main input {
    width: 100%;
    border: 1px solid #cbd5e1;
    outline: none;
    color: #0f172a;
    background: white;
    border-radius: 999px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    height: 40px;
    padding: 0 42px 0 16px;
}

.header-search input:focus,
.hero-search input:focus,
.filter-input:focus,
.search-main input:focus {
    border-color: var(--site-primary);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.search-submit {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--site-primary), var(--site-blue));
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mobile-links a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    font-weight: 650;
}

.main-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 620px;
    margin: 28px auto 44px;
    overflow: hidden;
    border-radius: 34px;
    color: white;
    background: linear-gradient(135deg, #0f172a, #0f766e 55%, #2563eb);
    box-shadow: var(--site-shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 35%, rgba(20, 184, 166, 0.22), transparent 36%), linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.7) 45%, rgba(15, 23, 42, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 78px 64px 126px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #ccfbf1;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 13px;
    font-weight: 800;
}

.hero .pill {
    color: white;
    background: rgba(20, 184, 166, 0.72);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--site-primary), var(--site-blue));
    box-shadow: 0 16px 32px rgba(13, 148, 136, 0.28);
}

.btn-soft {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
}

.btn-outline {
    color: var(--site-primary);
    border: 1px solid rgba(13, 148, 136, 0.24);
    background: white;
}

.hero-panel {
    position: absolute;
    right: 42px;
    bottom: 42px;
    z-index: 3;
    width: min(420px, calc(100% - 84px));
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.54);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
    backdrop-filter: blur(20px);
}

.hero-search {
    position: relative;
    margin-top: 14px;
}

.hero-search input {
    height: 48px;
    padding: 0 112px 0 18px;
}

.hero-search .btn {
    position: absolute;
    top: 5px;
    right: 5px;
    min-height: 38px;
    padding: 0 16px;
}

.hero-controls {
    position: absolute;
    left: 64px;
    bottom: 42px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 22px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.6;
}

.hero-dot.is-active {
    width: 26px;
    opacity: 1;
    background: #14b8a6;
}

.section {
    margin: 42px 0;
}

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

.section-kicker {
    color: var(--site-primary);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section h2,
.page-hero h1,
.detail-title {
    margin: 6px 0 0;
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.section h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-lead,
.page-lead {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--site-muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--site-radius);
    background: var(--site-card);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(13, 148, 136, 0.38);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

.card-poster img,
.detail-cover img,
.rank-cover img,
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-meta,
.rank-meta {
    color: var(--site-muted);
    font-size: 13px;
    line-height: 1.5;
}

.card-title {
    margin: 8px 0 8px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
}

.card-title a:hover {
    color: var(--site-primary);
}

.card-desc {
    min-height: 58px;
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    display: inline-flex;
    color: var(--site-primary-dark);
    font-size: 14px;
    font-weight: 850;
}

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

.category-tile {
    min-height: 164px;
    padding: 22px;
    border-radius: 24px;
    color: white;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 18px 38px rgba(13, 148, 136, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 56px rgba(37, 99, 235, 0.24);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: white;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.rank-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

.rank-num {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 13px;
    font-weight: 900;
}

.rank-title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
}

.rank-desc {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    margin: 28px 0 34px;
    padding: 46px;
    border-radius: 30px;
    color: white;
    background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.38), transparent 38%), linear-gradient(135deg, #0f172a, #0f766e 60%, #2563eb);
    box-shadow: var(--site-shadow);
}

.page-hero h1 {
    color: white;
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero .page-lead {
    color: rgba(255, 255, 255, 0.82);
}

.filter-bar,
.search-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: white;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.filter-input,
.search-main input {
    min-height: 48px;
    padding: 0 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 26px 0 18px;
    color: #64748b;
    font-size: 14px;
}

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

.player-section {
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--site-shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at center, rgba(20, 184, 166, 0.2), transparent 42%), #020617;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--site-primary), var(--site-blue));
    box-shadow: 0 24px 60px rgba(13, 148, 136, 0.42);
    font-size: 36px;
    transform: translateX(4px);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
    margin: 30px 0 46px;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a, #0d9488);
    box-shadow: var(--site-shadow);
}

.detail-panel {
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: white;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.detail-title {
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
}

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

.detail-panel h2 {
    margin: 26px 0 10px;
    color: #0f172a;
    font-size: 23px;
    font-weight: 900;
}

.detail-panel p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

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

.related-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.related-card .related-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

.related-card h3 {
    margin: 0;
    padding: 12px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.35;
}

.site-footer {
    margin-top: 64px;
    color: white;
    background: linear-gradient(135deg, #1e293b, #0f172a 55%, #134e4a);
}

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

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 850;
}

.footer-inner p,
.footer-inner a {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.8;
}

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

.footer-list {
    display: grid;
    gap: 8px;
}

.footer-title {
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 850;
}

.empty-state {
    padding: 36px;
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    color: #64748b;
    background: white;
    text-align: center;
}

.image-missing {
    opacity: 0;
}

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

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

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

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

    .detail-layout {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 880px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .site-header.is-open .mobile-panel {
        display: block;
    }

    .hero {
        min-height: 720px;
        border-radius: 26px;
    }

    .hero-content {
        padding: 48px 28px 260px;
    }

    .hero-panel {
        right: 24px;
        bottom: 86px;
        width: calc(100% - 48px);
    }

    .hero-controls {
        left: 28px;
        bottom: 28px;
    }

    .section-head,
    .filter-bar,
    .search-main {
        grid-template-columns: 1fr;
        display: grid;
    }

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

    .detail-cover {
        max-width: 360px;
    }

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

@media (max-width: 640px) {
    .main-wrap,
    .header-inner,
    .mobile-panel,
    .footer-inner {
        width: min(100% - 22px, 1220px);
    }

    .logo {
        font-size: 22px;
    }

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

    .category-grid,
    .rank-list,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 70px 1fr;
    }

    .page-hero,
    .detail-panel {
        padding: 24px;
        border-radius: 24px;
    }

    .hero h1,
    .hero h2 {
        font-size: 40px;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-title {
        font-size: 16px;
    }
}
