:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
    --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

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

.brand-name {
    font-size: 22px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
    color: var(--blue);
    background: #eff6ff;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    border: 0;
    cursor: pointer;
    background: transparent;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    padding: 8px;
    display: none;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: grid;
    gap: 2px;
}

.dropdown-menu a {
    padding: 9px 10px;
    border-radius: 10px;
    color: #334155;
    font-size: 14px;
}

.dropdown-menu a:hover {
    color: var(--blue);
    background: #eff6ff;
}

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

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

.mobile-nav.open {
    display: grid;
    gap: 6px;
}

.hero-carousel {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 4s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 24%, rgba(6, 182, 212, 0.20), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 64, 175, 0.82) 46%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
    max-width: 720px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.22);
    border: 1px solid rgba(125, 211, 252, 0.35);
    font-weight: 800;
}

.hero-content h1 {
    margin: 20px 0 16px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

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

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

.hero-tags span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

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

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

.ghost-button.light {
    color: #ffffff;
}

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

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

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

.quick-search-section {
    position: relative;
    z-index: 8;
    width: min(960px, calc(100% - 32px));
    margin: -38px auto 0;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.quick-search input,
.filter-search input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
}

.quick-search input,
.filter-search input {
    padding: 0 16px;
}

.quick-search button {
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    font-weight: 800;
    cursor: pointer;
}

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

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

.section-heading h2,
.hot-aside h2,
.text-panel h2,
.side-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.section-more {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 12px;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 800;
}

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

.category-tile,
.category-overview-card,
.text-panel,
.side-card,
.filter-panel,
.hot-aside {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.category-tile {
    min-height: 150px;
    padding: 22px;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -44px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.22));
}

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

.category-tile span {
    position: relative;
    z-index: 2;
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.ranking-grid,
.mini-grid {
    grid-template-columns: repeat(3, 1fr);
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

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

.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.score-badge {
    right: 12px;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.card-body {
    padding: 18px;
}

.card-meta {
    color: var(--muted);
}

.card-meta span {
    background: #f1f5f9;
    color: #475569;
}

.card-body h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 800;
}

.compact-card .card-body h3 {
    font-size: 17px;
}

.compact-card .card-body p {
    min-height: 42px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    align-items: start;
}

.hot-aside {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.hot-list,
.side-related {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.hot-row {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.hot-row:hover {
    background: #eff6ff;
}

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

.hot-title {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.hot-meta {
    grid-column: 2;
    color: var(--muted);
    font-size: 13px;
    margin-top: -10px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 15%, rgba(6, 182, 212, 0.35), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #0f766e 100%);
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    min-height: 260px;
    margin: 28px auto 0;
    padding: 44px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 780px;
    margin: 16px 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px;
    margin-bottom: 26px;
}

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

.filter-controls select {
    min-width: 126px;
    padding: 0 12px;
}

.empty-state {
    display: none;
    padding: 32px;
    text-align: center;
    color: var(--muted);
}

.empty-state.show {
    display: block;
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    min-height: 520px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    transform: scale(1.08);
    opacity: 0.45;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.72), rgba(15, 23, 42, 0.72));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 520px;
    margin: 0 auto;
    padding: 52px 0;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #bfdbfe;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 780px;
    margin: 0 0 20px;
    color: #e2e8f0;
    font-size: 20px;
}

.detail-tags {
    margin: 20px 0 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    align-items: start;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-card video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.38));
    cursor: pointer;
}

.player-play span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 34px;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.44);
}

.player-card.playing .player-play {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
}

.player-message.show {
    display: block;
}

.text-panel {
    margin-top: 28px;
    padding: 28px;
}

.text-panel h2 {
    margin-top: 0;
    font-size: 28px;
}

.text-panel p {
    margin: 10px 0 26px;
    color: #334155;
    font-size: 17px;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.side-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 12px;
}

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--ink);
}

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

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

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

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

.footer-links a {
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.38);
}

.hidden-by-filter {
    display: none;
}

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

    .split-layout,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hot-aside,
    .detail-side {
        position: static;
    }
}

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

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

    .hero-carousel {
        min-height: 520px;
    }

    .hero-content {
        padding: 54px 0;
    }

    .quick-search,
    .filter-panel,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        display: block;
        padding: 32px;
    }

    .category-grid,
    .movie-grid,
    .ranking-grid,
    .mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-poster {
        max-width: 280px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .brand-name {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }

    .quick-search {
        margin-top: 10px;
    }

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

    .category-grid,
    .movie-grid,
    .ranking-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-head,
    .section-heading {
        display: grid;
        align-items: start;
    }

    .detail-hero-inner {
        min-height: auto;
        padding: 34px 0;
    }

    .detail-poster {
        max-width: 220px;
    }

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