* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #09090b;
    color: #f4f4f5;
}

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: 60;
    background: rgba(24, 24, 27, 0.94);
    border-bottom: 1px solid rgba(63, 63, 70, 0.84);
    backdrop-filter: blur(18px);
}

.navbar {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    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-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.22);
}

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

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #22d3ee, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 4px;
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0.18em;
    color: #71717a;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    color: #d4d4d8;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #22d3ee;
    background: rgba(39, 39, 42, 0.75);
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(360px, 32vw);
    border: 1px solid #3f3f46;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(39, 39, 42, 0.9);
}

.nav-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #f4f4f5;
    background: transparent;
}

.nav-search input {
    padding: 11px 16px;
}

.nav-search button,
.mobile-search button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    padding: 11px 16px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    background: #27272a;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #f4f4f5;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid #27272a;
    background: #18181b;
}

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

.mobile-search {
    display: flex;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    overflow: hidden;
    background: #27272a;
}

.mobile-search input {
    padding: 12px;
}

.mobile-link {
    display: flex;
    margin-top: 10px;
}

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mobile-cats a {
    padding: 8px 10px;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    color: #a1a1aa;
    font-size: 13px;
}

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

.hero-slider,
.hero-slide,
.hero-bg,
.hero-bg img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-shade {
    background:
        radial-gradient(circle at 74% 30%, rgba(6, 182, 212, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(9, 9, 11, 0.98) 0%, rgba(9, 9, 11, 0.82) 42%, rgba(9, 9, 11, 0.16) 100%),
        linear-gradient(0deg, #09090b 0%, transparent 54%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1280px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding: 120px 0 86px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(6, 182, 212, 0.46);
    border-radius: 999px;
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.15);
    backdrop-filter: blur(12px);
    font-size: 14px;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 620px;
    margin: 0;
    color: #d4d4d8;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(63, 63, 70, 0.82);
    border-radius: 999px;
    color: #d4d4d8;
    background: rgba(24, 24, 27, 0.72);
}

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

.btn-primary,
.btn-soft,
.rank-action,
.category-link,
.player-shade strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.22s ease;
}

.btn-primary,
.rank-action,
.player-shade strong {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.18);
}

.btn-primary,
.btn-soft {
    min-height: 48px;
    padding: 0 22px;
}

.btn-soft {
    color: #f4f4f5;
    border: 1px solid rgba(244, 244, 245, 0.12);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.btn-primary:hover,
.rank-action:hover,
.category-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(6, 182, 212, 0.28);
}

.btn-soft:hover {
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-dots button {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(244, 244, 245, 0.24);
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
}

.main-section,
.page-hero,
.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.main-section {
    padding: 72px 0;
}

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

.section-head h2,
.filter-panel h2,
.page-hero h1,
.detail-title h1 {
    margin: 10px 0 0;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

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

.section-head p,
.page-hero p,
.filter-panel p {
    max-width: 680px;
    color: #a1a1aa;
    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(63, 63, 70, 0.78);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(39, 39, 42, 0.94), rgba(24, 24, 27, 0.94));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.72);
    box-shadow: 0 24px 60px rgba(6, 182, 212, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #18181b;
}

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

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #22d3ee;
    background: rgba(9, 9, 11, 0.72);
    border: 1px solid rgba(6, 182, 212, 0.45);
    font-size: 12px;
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;
}

.card-title:hover {
    color: #22d3ee;
}

.card-meta {
    margin: 10px 0;
    color: #71717a;
    font-size: 13px;
}

.card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    margin: 0;
    color: #a1a1aa;
    line-height: 1.6;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 30px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    color: #a1a1aa;
    background: rgba(39, 39, 42, 0.75);
    font-size: 12px;
}

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

.category-card {
    min-height: 230px;
    padding: 24px;
    border: 1px solid rgba(63, 63, 70, 0.78);
    border-radius: 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.16), transparent 36%),
        linear-gradient(180deg, #27272a, #18181b);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.category-card p {
    color: #a1a1aa;
    line-height: 1.75;
}

.category-link {
    min-height: 42px;
    margin-top: 16px;
    padding: 0 16px;
}

.mini-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mini-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(63, 63, 70, 0.72);
    border-radius: 14px;
    background: rgba(24, 24, 27, 0.72);
}

.mini-card img {
    width: 64px;
    height: 46px;
    object-fit: cover;
    border-radius: 10px;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    color: #f4f4f5;
    font-size: 14px;
}

.mini-card em {
    margin-top: 4px;
    color: #71717a;
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    padding: 62px 0 34px;
}

.page-hero h1 {
    max-width: 860px;
    font-size: clamp(38px, 6vw, 62px);
}

.filter-panel {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: 1fr minmax(360px, 0.9fr);
    gap: 28px;
    align-items: end;
    padding: 24px;
    border: 1px solid rgba(63, 63, 70, 0.78);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(39, 39, 42, 0.94), rgba(24, 24, 27, 0.94));
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    height: 48px;
    padding: 0 14px;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    background: #18181b;
}

.filter-empty {
    display: none;
    padding: 28px;
    border: 1px dashed #3f3f46;
    border-radius: 18px;
    color: #a1a1aa;
    text-align: center;
}

.filter-empty.is-visible {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 128px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.34);
    font-size: 22px;
    font-weight: 900;
}

.rank-poster img {
    width: 128px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.rank-main p {
    margin: 7px 0 6px;
    color: #a1a1aa;
    line-height: 1.55;
}

.rank-main span {
    color: #71717a;
    font-size: 13px;
}

.rank-action {
    min-height: 40px;
    padding: 0 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 28px 0 18px;
    color: #a1a1aa;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #22d3ee;
}

.detail-main {
    padding-bottom: 72px;
}

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

.watch-column,
.detail-sidebar {
    display: grid;
    gap: 22px;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(63, 63, 70, 0.9);
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

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

.player-shade {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    cursor: pointer;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72)),
        rgba(0, 0, 0, 0.24);
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.play-ring {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 34px;
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.35);
}

.player-shade strong {
    min-height: 42px;
    padding: 0 18px;
}

.detail-title {
    padding: 26px;
    border: 1px solid rgba(63, 63, 70, 0.78);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(39, 39, 42, 0.92), rgba(24, 24, 27, 0.92));
}

.detail-title h1 {
    font-size: clamp(30px, 5vw, 52px);
}

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

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    color: #d4d4d8;
    background: #27272a;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.story-card,
.poster-panel,
.related-panel {
    padding: 24px;
    border: 1px solid rgba(63, 63, 70, 0.78);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(39, 39, 42, 0.92), rgba(24, 24, 27, 0.92));
}

.story-card h2,
.related-panel h2,
.poster-panel h2 {
    margin: 0 0 14px;
    color: #ffffff;
}

.story-card p {
    margin: 0;
    color: #d4d4d8;
    line-height: 1.9;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
}

.poster-panel p {
    color: #a1a1aa;
    line-height: 1.75;
}

.related-grid {
    display: grid;
    gap: 12px;
}

.search-landing {
    min-height: 260px;
    display: grid;
    place-items: center;
    text-align: center;
}

.search-landing h1 {
    margin-bottom: 12px;
}

.site-footer {
    border-top: 1px solid #27272a;
    background: #18181b;
}

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

.footer-about p,
.footer-grid li,
.footer-bottom {
    color: #a1a1aa;
}

.footer-grid h3 {
    margin: 0 0 16px;
    color: #e4e4e7;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 10px;
}

.footer-grid a:hover {
    color: #22d3ee;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    border-top: 1px solid #27272a;
    font-size: 14px;
}

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

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

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

@media (max-width: 860px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .menu-button {
        display: block;
    }

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

    .movie-grid,
    .category-grid,
    .footer-grid,
    .filter-panel,
    .detail-sidebar {
        grid-template-columns: 1fr;
    }

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

    .section-head,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: 54px 92px 1fr;
    }

    .rank-action {
        grid-column: 2 / -1;
        width: max-content;
    }

    .rank-poster img {
        width: 92px;
        height: 64px;
    }
}

@media (max-width: 560px) {
    .navbar,
    .main-section,
    .page-hero,
    .detail-main,
    .filter-panel,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

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

    .hero-copy {
        padding-top: 92px;
    }

    .hero h1 {
        font-size: 38px;
    }

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

    .movie-grid {
        gap: 16px;
    }

    .rank-row {
        grid-template-columns: 46px 1fr;
    }

    .rank-poster {
        display: none;
    }

    .rank-action {
        grid-column: 2;
    }
}
