:root {
    --color-ocean: #0284c7;
    --color-ocean-dark: #0369a1;
    --color-island: #16a34a;
    --color-ink: #111827;
    --color-muted: #6b7280;
    --color-line: #e5e7eb;
    --color-card: #ffffff;
    --color-soft: #f8fafc;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.08);
    --radius-large: 28px;
    --radius-card: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

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

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-ocean), var(--color-island));
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.24);
}

.logo-text {
    background: linear-gradient(135deg, var(--color-ocean), var(--color-island));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links a {
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-ocean), var(--color-island));
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--color-ocean-dark);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--color-ocean-dark);
    background: #eff6ff;
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.mobile-panel a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    color: #374151;
}

.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: var(--color-ocean-dark);
    background: #f0f9ff;
}

.page {
    min-height: 100vh;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.75s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.90), rgba(2, 6, 23, 0.56) 46%, rgba(2, 6, 23, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.08) 58%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    align-items: center;
    padding: 86px 0 70px;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 20px 0 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 1.7vw, 21px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    padding: 8px 12px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.22);
}

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

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

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

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-ocean), var(--color-island));
    box-shadow: 0 18px 30px rgba(2, 132, 199, 0.28);
}

.button-primary:hover {
    box-shadow: 0 22px 36px rgba(2, 132, 199, 0.34);
}

.button-light {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
}

.button-plain {
    color: var(--color-ocean-dark);
    background: #e0f2fe;
}

.hero-search {
    width: min(600px, 100%);
    margin-top: 30px;
    padding: 8px;
    display: flex;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 12px;
    color: #ffffff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.70);
}

.hero-search button {
    min-width: 104px;
}

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

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

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

.section {
    padding: 70px 0;
}

.section-tight {
    padding: 42px 0 70px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 620px;
    color: var(--color-muted);
}

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

.card-grid.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.search-panel {
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: var(--radius-card);
    background: var(--color-card);
    box-shadow: var(--shadow-card);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.13);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

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

.movie-card:hover .poster-wrap img,
.rank-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0));
}

.poster-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.movie-body {
    padding: 16px;
}

.movie-title {
    margin: 0;
    min-height: 48px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-title a:hover,
.link-more:hover {
    color: var(--color-ocean-dark);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
}

.movie-desc {
    margin: 10px 0 0;
    color: #4b5563;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    padding: 5px 9px;
    color: var(--color-ocean-dark);
    background: #e0f2fe;
}

.badge-green {
    color: #166534;
    background: #dcfce7;
}

.badge-yellow {
    color: #854d0e;
    background: #fef9c3;
}

.badge-red {
    color: #991b1b;
    background: #fee2e2;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 26px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 44%), radial-gradient(circle at bottom left, rgba(22, 163, 74, 0.16), transparent 46%);
    pointer-events: none;
}

.category-card h3,
.category-card p,
.category-card span {
    position: relative;
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    overflow: hidden;
    padding: 12px;
    align-items: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.rank-poster {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px;
    background: #e5e7eb;
}

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

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-ocean), var(--color-island));
    font-size: 13px;
    font-weight: 900;
}

.rank-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

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

.page-hero {
    padding: 72px 0 36px;
    background: radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.16), transparent 34%), radial-gradient(circle at 80% 8%, rgba(34, 197, 94, 0.14), transparent 34%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #64748b;
    font-size: 14px;
}

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

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

.page-hero p {
    margin: 14px 0 0;
    max-width: 760px;
    color: var(--color-muted);
    font-size: 18px;
}

.search-panel {
    padding: 20px;
    margin-bottom: 28px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-line);
    border-radius: 15px;
    padding: 0 14px;
    outline: 0;
    background: #ffffff;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--color-ocean);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: 18px;
    color: var(--color-muted);
    background: #ffffff;
    border: 1px solid var(--color-line);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
    gap: 28px;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-large);
    background: #020617;
    box-shadow: var(--shadow-soft);
}

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

.player-frame video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-frame video {
    z-index: 1;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    color: #ffffff;
    cursor: pointer;
    background: #020617;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.12), rgba(2, 6, 23, 0.72));
}

.play-core {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-ocean), var(--color-island));
    box-shadow: 0 20px 42px rgba(2, 132, 199, 0.35);
}

.play-icon svg {
    margin-left: 4px;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.detail-panel {
    padding: 24px;
    margin-top: 24px;
}

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

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.side-panel {
    position: sticky;
    top: 92px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(2, 132, 199, 0.34);
}

.related-card .thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: #e5e7eb;
}

.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

.related-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.related-card p {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 13px;
}

.footer {
    margin-top: 48px;
    color: #cbd5e1;
    background: #111827;
}

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

.footer h2,
.footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer p,
.footer a {
    color: #cbd5e1;
}

.footer a:hover {
    color: #38bdf8;
}

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

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 62px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

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

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding: 72px 0 80px;
    }

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search input {
        min-height: 46px;
    }

    .section {
        padding: 50px 0;
    }

    .section-heading {
        display: block;
    }

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

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

    .rank-card {
        grid-template-columns: 100px 1fr;
    }

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