:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --deep: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.15), transparent 30%), var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1360px;
    margin: 0 auto;
    padding: 14px 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

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

.main-nav {
    display: flex;
    gap: 6px;
}

.main-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--ink);
    background: #e0f2fe;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 24px 18px;
}

.hero-shell {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
    gap: 48px;
    align-items: center;
    max-width: 1360px;
    margin: 0 auto;
    padding: 86px 24px 120px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(1.08);
    transform: scale(1.12);
    opacity: 0.48;
}

.hero-slide::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.35)),
        radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.36), transparent 28%);
}

.hero-content,
.hero-poster,
.detail-inner {
    position: relative;
    z-index: 2;
}

.hero-content {
    color: #ffffff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #06b6d4;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 760px;
    margin: 22px 0;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #0e7490;
    background: rgba(207, 250, 254, 0.9);
    font-size: 12px;
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.3);
}

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

.btn.small {
    min-height: 40px;
    padding: 0 18px;
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 34px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 470px;
    object-fit: cover;
}

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

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

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

.section-wrap {
    max-width: 1360px;
    margin: 0 auto;
    padding: 56px 24px;
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -44px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.intro-strip h2,
.section-title-row h2,
.rank-panel h2,
.detail-content h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.intro-strip p,
.page-hero p,
.detail-one-line,
.detail-content p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

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

.compact-row {
    align-items: center;
}

.more-link {
    color: var(--blue);
    font-weight: 900;
}

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

.category-tile,
.category-card-large {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
    padding: 22px;
}

.category-tile span,
.category-card-large span {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
}

.category-tile small,
.category-card-large p {
    color: var(--muted);
    line-height: 1.7;
}

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

.category-card-large img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category-card-large span,
.category-card-large p {
    padding: 0 18px;
}

.category-card-large span {
    margin-top: 18px;
}

.category-card-large p {
    padding-bottom: 20px;
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #cffafe, #dbeafe);
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.poster-badge {
    left: 10px;
    padding: 5px 9px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.poster-score {
    right: 10px;
    padding: 5px 8px;
    background: rgba(15, 23, 42, 0.74);
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--cyan);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.rank-panel {
    position: sticky;
    top: 84px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 28px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #ecfeff;
    transform: translateX(4px);
}

.rank-index {
    color: var(--cyan);
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 54px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-copy strong,
.rank-copy small {
    display: block;
}

.rank-copy strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 24px 78px;
    color: #ffffff;
    text-align: center;
    background:
        radial-gradient(circle at 30% 10%, rgba(6, 182, 212, 0.45), transparent 32%),
        linear-gradient(135deg, #020617, #0f172a 52%, #0e7490);
}

.page-hero p {
    max-width: 720px;
    margin: 18px auto 0;
    color: #dbeafe;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 160px 180px auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--ink);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.filter-reset {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    color: #ffffff;
    background: #0f172a;
    cursor: pointer;
    font-weight: 900;
}

.empty-state {
    margin-top: 28px;
    padding: 32px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
    color: #ffffff;
}

.detail-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 34px 24px 78px;
}

.breadcrumb,
.breadcrumb-sep {
    display: inline-flex;
    margin-right: 8px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-top: 34px;
}

.detail-poster {
    width: 290px;
    height: 410px;
    border-radius: 30px;
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
    margin-bottom: 20px;
}

.detail-one-line {
    max-width: 850px;
    color: #dbeafe;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
    font-weight: 800;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    min-height: 420px;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 45px rgba(6, 182, 212, 0.34);
    font-size: 28px;
}

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

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

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

.detail-content article {
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.site-footer {
    margin-top: 40px;
    background: #020617;
    color: #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 30px;
    max-width: 1360px;
    margin: 0 auto;
    padding: 46px 24px;
}

.footer-logo {
    color: #ffffff;
    font-size: 20px;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
    .movie-grid,
    .library-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .rank-panel {
        position: static;
    }

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .mobile-nav.open {
        display: flex;
    }

    .hero-shell {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 56px;
    }

    .hero-poster {
        max-width: 290px;
        margin: 0 auto;
    }

    .hero-poster img {
        height: 360px;
    }

    .intro-strip,
    .section-title-row,
    .footer-grid {
        display: grid;
    }

    .movie-grid,
    .home-grid,
    .library-grid,
    .related-grid,
    .category-grid,
    .category-large-grid,
    .detail-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: 230px;
        height: 320px;
    }

    .movie-player {
        min-height: 260px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .section-wrap,
    .detail-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .home-grid,
    .library-grid,
    .related-grid,
    .category-grid,
    .category-large-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .poster-link img {
        height: 280px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }
}
