* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #030712;
    color: #f9fafb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(148, 163, 184, 0.15), transparent 28rem),
        radial-gradient(circle at 82% 0%, rgba(255, 255, 255, 0.08), transparent 26rem),
        #030712;
    color: #f9fafb;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(31, 41, 55, 0.88);
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f9fafb, #9ca3af);
    color: #111827;
    font-weight: 800;
    box-shadow: 0 20px 45px rgba(229, 231, 235, 0.14);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    color: #f3f4f6;
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.brand-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    border-radius: 12px;
    padding: 10px 16px;
    color: #9ca3af;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(31, 41, 55, 0.86);
    color: #f9fafb;
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 580px;
    overflow: hidden;
    background: #030712;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.76) 42%, rgba(3, 7, 18, 0.28) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.72) 24%, rgba(3, 7, 18, 0) 58%);
}

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

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

.eyebrow {
    margin: 0 0 12px;
    color: #9ca3af;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-panel h1 {
    margin: 0;
    color: #ffffff;
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 820px;
    font-size: clamp(40px, 6vw, 76px);
}

.hero-summary {
    max-width: 660px;
    margin: 22px 0 0;
    color: #d1d5db;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.hero-tags {
    margin: 26px 0 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.72);
    color: #d1d5db;
    padding: 7px 12px;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.primary-button,
.ghost-button,
.section-more,
.detail-nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 20px;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border 0.25s ease;
}

.primary-button {
    background: #f9fafb;
    color: #111827;
    font-weight: 700;
}

.ghost-button,
.section-more,
.detail-nav-links a {
    border: 1px solid rgba(75, 85, 99, 0.86);
    background: rgba(17, 24, 39, 0.58);
    color: #e5e7eb;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.detail-nav-links a:hover {
    transform: translateY(-2px);
}

.ghost-button:hover,
.section-more:hover,
.detail-nav-links a:hover {
    background: rgba(31, 41, 55, 0.92);
    border-color: rgba(156, 163, 175, 0.7);
}

.hero-dots {
    position: absolute;
    right: 34px;
    bottom: 44px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(156, 163, 175, 0.5);
    padding: 0;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: #f9fafb;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 5;
    display: flex;
    width: min(760px, calc(100% - 32px));
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid rgba(75, 85, 99, 0.78);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(18px);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: #f9fafb;
    outline: none;
    padding: 17px 18px;
}

.hero-search button {
    border: 0;
    background: #f9fafb;
    color: #111827;
    font-weight: 700;
    padding: 0 28px;
}

.main-flow,
.page-shell {
    padding: 46px 0 68px;
}

.content-section {
    margin-top: 54px;
}

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

.section-head h2,
.detail-copy h2 {
    margin: 0;
    color: #f9fafb;
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 300;
    letter-spacing: -0.03em;
}

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

.category-movie-grid,
.search-grid {
    margin-top: 26px;
}

.movie-card {
    min-width: 0;
}

.movie-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.95);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.2);
    transition: transform 0.28s ease, border 0.28s ease, background 0.28s ease;
}

.movie-link:hover {
    transform: translateY(-6px);
    border-color: rgba(156, 163, 175, 0.45);
    background: rgba(31, 41, 55, 0.88);
}

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

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

.movie-link:hover .poster-wrap img {
    transform: scale(1.05);
}

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.78), transparent 58%);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    min-width: 40px;
    justify-content: center;
    border-radius: 999px;
    background: rgba(249, 250, 251, 0.92);
    color: #111827;
    font-weight: 800;
    padding: 6px 10px;
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.movie-info strong {
    color: #f9fafb;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
}

.movie-meta,
.movie-desc {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.6;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    color: #cbd5e1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card-compact .movie-info strong {
    font-size: 16px;
}

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

.category-card a,
.channel-card {
    display: block;
    height: 100%;
    border: 1px solid rgba(31, 41, 55, 0.95);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.92), rgba(17, 24, 39, 0.76));
    padding: 22px;
    transition: transform 0.25s ease, border 0.25s ease;
}

.category-card a:hover,
.channel-card:hover {
    transform: translateY(-4px);
    border-color: rgba(156, 163, 175, 0.55);
}

.category-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 18px;
    background: rgba(249, 250, 251, 0.92);
    color: #111827;
    font-weight: 800;
}

.category-card strong,
.channel-card span {
    display: block;
    margin-top: 18px;
    color: #f9fafb;
    font-size: 21px;
    font-weight: 500;
}

.category-card p,
.channel-card p,
.page-hero p {
    color: #9ca3af;
    line-height: 1.8;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 16px;
}

.mini-links a,
.channel-card li a {
    color: #d1d5db;
    font-size: 13px;
}

.channel-card ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.9);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(31, 41, 55, 0.88), rgba(3, 7, 18, 0.72)),
        radial-gradient(circle at top right, rgba(156, 163, 175, 0.2), transparent 24rem);
    padding: clamp(34px, 7vw, 76px);
}

.small-hero h1 {
    font-size: clamp(36px, 6vw, 66px);
}

.search-panel {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.search-input,
.filter-select {
    min-height: 48px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.82);
    color: #f9fafb;
    outline: none;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
    color: #9ca3af;
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 28px;
    align-items: stretch;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.95);
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 38px 120px rgba(0, 0, 0, 0.35);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background:
        linear-gradient(0deg, rgba(3, 7, 18, 0.9), rgba(3, 7, 18, 0.2)),
        rgba(0, 0, 0, 0.08);
    color: #ffffff;
    transition: opacity 0.25s ease;
}

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

.play-button {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 250, 251, 0.96);
    color: #111827;
    font-size: 38px;
    line-height: 1;
    padding-left: 5px;
    box-shadow: 0 20px 60px rgba(249, 250, 251, 0.18);
}

.play-title {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 24px;
    color: #f9fafb;
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 300;
    text-align: left;
}

.detail-panel {
    border: 1px solid rgba(31, 41, 55, 0.95);
    border-radius: 28px;
    background: rgba(17, 24, 39, 0.78);
    padding: 28px;
}

.detail-panel h1 {
    font-size: clamp(32px, 4vw, 52px);
}

.detail-one-line {
    color: #d1d5db;
    line-height: 1.85;
}

.meta-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.meta-list div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    padding-bottom: 10px;
}

.meta-list dt {
    color: #6b7280;
}

.meta-list dd {
    margin: 0;
    color: #e5e7eb;
}

.detail-tags,
.genre-tags {
    margin-top: 18px;
}

.detail-nav-links {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.detail-copy {
    max-width: 940px;
}

.detail-copy p {
    color: #d1d5db;
    font-size: 17px;
    line-height: 2;
    white-space: pre-line;
}

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

.site-footer {
    border-top: 1px solid rgba(31, 41, 55, 0.88);
    background: rgba(3, 7, 18, 0.92);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 30px 0;
    color: #6b7280;
    font-size: 14px;
}

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

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

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

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

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

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

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
        gap: 10px;
    }

    .brand-title {
        font-size: 18px;
    }

    .main-nav {
        width: 100%;
    }

    .hero {
        min-height: 650px;
        height: 84vh;
    }

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

    .hero-actions,
    .detail-nav-links,
    .search-panel,
    .footer-inner {
        flex-direction: column;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search button {
        min-height: 48px;
    }

    .hero-dots {
        right: 16px;
        bottom: 96px;
    }

    .movie-grid,
    .category-grid,
    .channel-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .page-shell {
        padding-top: 26px;
    }

    .page-hero,
    .detail-panel {
        border-radius: 22px;
        padding: 24px;
    }

    .player-frame {
        border-radius: 20px;
    }

    .play-button {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }

    .play-title {
        left: 20px;
        right: 20px;
        bottom: 18px;
    }
}
