
:root {
    --dark-950: #0f1419;
    --dark-900: #1f2933;
    --dark-800: #323f4b;
    --dark-700: #3e4c59;
    --dark-600: #52606d;
    --dark-500: #616e7c;
    --dark-400: #7b8794;
    --dark-300: #9aa5b1;
    --dark-200: #cbd2d9;
    --mystery-900: #581c87;
    --mystery-800: #6b21a8;
    --mystery-700: #7e22ce;
    --mystery-600: #9333ea;
    --mystery-500: #a855f7;
    --mystery-400: #c084fc;
    --mystery-300: #d8b4fe;
    --primary-500: #4169b3;
    --accent-500: #f97316;
    --white: #ffffff;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow-glow: 0 0 32px rgba(147, 51, 234, 0.36);
    --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(147, 51, 234, 0.12), transparent 35%), var(--dark-950);
    color: var(--white);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(31, 41, 51, 0.95);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--dark-800);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mystery-600), var(--mystery-800));
    box-shadow: var(--shadow-glow);
    color: var(--white);
}

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

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.04em;
}

.brand-text small {
    color: var(--dark-400);
    font-size: 12px;
    margin-top: 3px;
}

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

.nav-link {
    color: var(--dark-300);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.header-search,
.mobile-search,
.search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.inline-filter input {
    width: 260px;
    border: 1px solid var(--dark-700);
    border-radius: 12px;
    background: var(--dark-800);
    color: var(--white);
    padding: 11px 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.inline-filter input:focus {
    border-color: var(--mystery-600);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.18);
}

.header-search button,
.mobile-search button,
.search-panel button,
.inline-filter button {
    border: 0;
    border-radius: 12px;
    background: var(--mystery-600);
    color: var(--white);
    padding: 11px 16px;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    border: 0;
    background: transparent;
    color: var(--dark-200);
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    border-top: 1px solid var(--dark-800);
    padding: 16px;
    background: rgba(31, 41, 51, 0.98);
}

.mobile-panel nav,
.mobile-categories {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

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

.hero-slider {
    position: relative;
    height: 590px;
    overflow: hidden;
    background: var(--dark-950);
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark-950) 0%, rgba(15, 20, 25, 0.72) 46%, rgba(15, 20, 25, 0.18) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 82px;
}

.hero-copy {
    width: min(760px, 100%);
}

.hero-copy h1 {
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.12;
    margin: 14px 0 8px;
}

.hero-copy h2 {
    font-size: clamp(26px, 3vw, 42px);
    margin: 0 0 12px;
    color: var(--mystery-300);
}

.hero-copy p {
    max-width: 720px;
    color: var(--dark-200);
    font-size: 18px;
    margin: 0 0 24px;
}

.hero-actions,
.section-heading,
.category-overview-head,
.detail-meta,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.button-primary {
    background: var(--mystery-600);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.button-ghost {
    background: rgba(31, 41, 51, 0.72);
    color: var(--white);
    border: 1px solid var(--dark-700);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(31, 41, 51, 0.86);
    color: var(--white);
    font-size: 38px;
    line-height: 0;
    cursor: pointer;
    z-index: 5;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 24px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--dark-600);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 36px;
    background: var(--mystery-500);
}

.section-block {
    padding: 62px 0;
}

.section-band {
    background: rgba(31, 41, 51, 0.52);
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading > div {
    flex: 1;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
}

.section-heading p,
.page-hero p,
.category-overview-head p,
.footer-grid p {
    color: var(--dark-300);
    margin: 4px 0 0;
}

.section-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mystery-500);
    background: rgba(147, 51, 234, 0.12);
    border: 1px solid rgba(126, 34, 206, 0.30);
    border-radius: 14px;
}

.section-icon.accent {
    color: var(--accent-500);
}

.section-icon.primary {
    color: var(--primary-500);
}

.section-more {
    color: var(--mystery-300);
    font-weight: 700;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    background: var(--dark-900);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid transparent;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(126, 34, 206, 0.30);
    box-shadow: var(--shadow-card);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
}

.movie-card-horizontal .movie-thumb {
    height: 100%;
    min-height: 154px;
}

.movie-thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--dark-800);
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-badge {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.88);
    color: var(--white);
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(8px);
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: scale(1);
}

.thumb-tags {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 8px;
    background: rgba(147, 51, 234, 0.78);
    color: var(--white);
    font-size: 12px;
    line-height: 1.4;
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.45;
}

.movie-info h3 a:hover {
    color: var(--mystery-400);
}

.movie-info p {
    min-height: 44px;
    color: var(--dark-400);
    margin: 0 0 10px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-meta {
    color: var(--dark-500);
    font-size: 13px;
}

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

.category-card,
.category-overview-card,
.page-hero,
.detail-content,
.poster-panel,
.related-panel,
.ranking-section {
    background: var(--dark-900);
    border: 1px solid var(--dark-800);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.category-card {
    padding: 22px;
}

.category-card span {
    display: block;
    color: var(--mystery-300);
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 6px;
}

.category-card strong {
    display: block;
    color: var(--dark-200);
    font-weight: 500;
    min-height: 52px;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-card div a {
    color: var(--dark-300);
    background: var(--dark-800);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--dark-900);
    border: 1px solid var(--dark-800);
    border-radius: 14px;
}

.ranking-list-wide li {
    grid-template-columns: 54px minmax(0, 1fr) 150px 150px;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--mystery-600);
    font-weight: 800;
}

.ranking-list a:hover {
    color: var(--mystery-300);
}

.ranking-list em,
.ranking-list strong {
    color: var(--dark-400);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
}

.page-main {
    padding-top: 28px;
    padding-bottom: 70px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--dark-400);
    margin: 0 0 18px;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--mystery-300);
}

.breadcrumbs a::after {
    content: "/";
    color: var(--dark-600);
    margin-left: 10px;
}

.small-hero {
    padding: 34px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.20), rgba(31, 41, 51, 0.96));
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
}

.inline-filter {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.inline-filter input {
    width: min(520px, 100%);
}

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

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

.category-overview-head {
    justify-content: space-between;
    margin-bottom: 22px;
}

.category-overview-head h2 {
    margin: 0;
}

.compact-grid .movie-info p {
    display: none;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

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

.site-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-toggle {
    position: absolute;
    left: 22px;
    bottom: 22px;
    border: 0;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.90);
    color: var(--white);
    min-height: 44px;
    padding: 0 18px;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
}

.detail-content {
    padding: 30px;
}

.detail-content h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

.detail-meta {
    color: var(--dark-300);
    margin-bottom: 18px;
}

.detail-meta span {
    background: var(--dark-800);
    border-radius: 10px;
    padding: 6px 10px;
}

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

.detail-content section {
    border-top: 1px solid var(--dark-800);
    padding-top: 24px;
    margin-top: 24px;
}

.detail-content h2,
.related-panel h2,
.ranking-section h2,
.site-footer h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.detail-content p {
    color: var(--dark-300);
    margin: 0 0 14px;
}

.detail-side {
    display: grid;
    gap: 22px;
}

.poster-panel,
.related-panel,
.ranking-section {
    padding: 22px;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 18px;
    background: var(--dark-800);
}

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

.related-list .movie-card-horizontal {
    grid-template-columns: 92px minmax(0, 1fr);
}

.related-list .movie-card-horizontal .movie-thumb {
    min-height: 122px;
}

.related-list .movie-info p,
.related-list .tag-row {
    display: none;
}

.search-page .search-panel {
    margin-top: 22px;
}

.search-panel input {
    width: min(620px, calc(100vw - 170px));
}

.search-result-info {
    color: var(--dark-300);
    margin-bottom: 18px;
}

.empty-message {
    color: var(--dark-300);
    text-align: center;
    padding: 30px;
    background: var(--dark-900);
    border-radius: var(--radius-md);
}

.site-footer {
    border-top: 1px solid var(--dark-800);
    background: rgba(31, 41, 51, 0.72);
    padding-top: 42px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 34px;
}

.footer-logo {
    display: inline-block;
    color: var(--white);
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 10px;
}

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

.footer-links a {
    color: var(--dark-300);
}

.footer-links a:hover {
    color: var(--mystery-300);
}

.footer-bottom {
    margin-top: 34px;
    padding: 18px;
    text-align: center;
    color: var(--dark-400);
    border-top: 1px solid var(--dark-800);
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

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

    .horizontal-grid,
    .category-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 66px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .hero-slider {
        height: 540px;
    }

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

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

    .hero-arrow {
        display: none;
    }

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

    .horizontal-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .small-hero,
    .detail-content,
    .category-overview-card {
        padding: 22px;
    }

    .ranking-list li,
    .ranking-list-wide li {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .ranking-list em,
    .ranking-list strong {
        grid-column: 2;
    }

    .inline-filter,
    .search-panel,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-filter input,
    .search-panel input,
    .mobile-search input {
        width: 100%;
    }
}
