* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #0f172a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.nav-shell {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.25);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08);
}

.brand-text,
.footer-brand {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.nav-link {
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover,
.text-link:hover {
    color: #fbbf24;
}

.search-box,
.mobile-search,
.page-search {
    display: flex;
    align-items: center;
    background: rgba(51, 65, 85, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.search-box {
    width: min(320px, 26vw);
    flex: 0 0 auto;
}

.search-box input,
.mobile-search input,
.page-search input,
.filter-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

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

.search-box button,
.mobile-search button,
.page-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-weight: 700;
}

.search-box button {
    width: 42px;
    height: 42px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.9);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
    animation: fadeIn 0.25s ease both;
}

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

.mobile-search button,
.page-search button {
    padding: 12px 18px;
}

.mobile-link {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.65);
}

.mobile-link:hover {
    background: rgba(71, 85, 105, 0.9);
    color: #fbbf24;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(15, 23, 42, 0.18));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.hero-kicker,
.page-kicker {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-kicker span,
.page-kicker,
.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.95);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
}

.hero-kicker span:nth-child(n + 2) {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 650px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    background: rgba(51, 65, 85, 0.86);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 34px rgba(234, 88, 12, 0.28);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 44px rgba(234, 88, 12, 0.35);
}

.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(226, 232, 240, 0.2);
    backdrop-filter: blur(6px);
}

.ghost-button:hover {
    color: #fbbf24;
    background: rgba(30, 41, 59, 0.85);
}

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

.hero-dots button {
    width: 28px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 42px;
    background: #f59e0b;
}

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

.rail-section,
.category-section,
.rank-section {
    background: rgba(30, 41, 59, 0.34);
}

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

.section-head h2,
.page-hero h1,
.detail-card h1,
.text-block h2,
.related-side h2 {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.section-head p,
.page-hero p,
.card-body p,
.channel-card p,
.category-card p,
.detail-card p,
.text-block p,
.site-footer p {
    color: #94a3b8;
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #1e293b;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.36);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    margin: 0;
    overflow: hidden;
    background: #334155;
}

.movie-card-wide .poster-wrap,
.movie-card-compact .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover img,
.category-card:hover img,
.channel-card:hover img {
    transform: scale(1.08);
}

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.7);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(5px);
}

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 26px;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: #fbbf24;
}

.card-body p {
    margin: 0 0 12px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.card-meta span,
.detail-meta span {
    padding: 5px 8px;
    border-radius: 7px;
    background: #334155;
}

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

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

.rail-wrap {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 260px);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.rail-wrap::-webkit-scrollbar {
    display: none;
}

.rail-wrap .movie-card {
    scroll-snap-align: start;
}

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

.rail-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: #334155;
    font-size: 28px;
}

.category-grid,
.channel-grid {
    display: grid;
    gap: 24px;
}

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

.category-card,
.channel-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #1e293b;
    min-height: 260px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.category-card img,
.channel-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    transition: transform 0.5s ease;
}

.category-card::after,
.channel-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.92));
}

.category-card > div,
.channel-card > div {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: inherit;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.category-card h3,
.channel-card h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 24px;
}

.category-card p,
.channel-card p {
    margin: 0 0 16px;
}

.category-card div div,
.channel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-card div div span,
.channel-links a {
    padding: 5px 9px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.62);
    font-size: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.88);
    padding: 10px 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    background: rgba(51, 65, 85, 0.92);
}

.rank-number {
    color: #f59e0b;
    font-size: 24px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: #334155;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    color: #ffffff;
    font-size: 16px;
}

.rank-info em {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

.rank-play {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-size: 13px;
    font-weight: 800;
}

.page-main {
    min-height: 72vh;
}

.page-hero {
    position: relative;
    padding: 72px 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.24), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b 48%, #020617);
}

.compact-hero {
    padding: 64px 0;
}

.category-hero {
    padding: 54px 0 70px;
}

.page-kicker {
    width: fit-content;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 60px);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #94a3b8;
    font-size: 14px;
}

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

.page-search {
    width: min(620px, 100%);
    margin-top: 28px;
}

.page-search input {
    padding: 15px 18px;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-panel input {
    display: block;
    padding: 14px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #cbd5e1;
    background: #334155;
    font-weight: 700;
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

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

.channel-card {
    min-height: 320px;
}

.small-button {
    min-height: 40px;
    width: fit-content;
    padding: 0 18px;
    font-size: 14px;
}

.detail-top {
    padding: 28px 0 44px;
    background: radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.18), transparent 30%), #020617;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 16 / 9;
    background: #000000;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: #000000;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.player-cover span {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-size: 32px;
    box-shadow: 0 20px 46px rgba(245, 158, 11, 0.32);
}

.player-cover.is-hidden {
    display: none;
}

.detail-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-content: start;
    padding: 20px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-card > img {
    width: 150px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: #334155;
}

.detail-card h1 {
    margin-top: 6px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.detail-card p {
    margin: 14px 0;
}

.detail-tags {
    margin-top: 16px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 50px 0;
}

.detail-article,
.related-side {
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-article {
    padding: 30px;
}

.text-block + .text-block {
    margin-top: 30px;
}

.text-block h2,
.related-side h2 {
    margin-bottom: 16px;
    font-size: 28px;
}

.text-block p {
    margin: 0;
    font-size: 17px;
    line-height: 1.9;
}

.related-side {
    padding: 20px;
    align-self: start;
}

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

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

.related-grid .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.empty-state {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 22px;
    border-radius: 18px;
    color: #cbd5e1;
    text-align: center;
    background: rgba(30, 41, 59, 0.82);
}

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

.site-footer {
    margin-top: 40px;
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 38px;
    padding: 42px 0 34px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px 16px;
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .search-box {
        margin-left: auto;
        width: min(340px, 44vw);
    }

    .menu-toggle {
        display: block;
    }

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

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

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

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

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

    .nav-shell {
        height: 66px;
        gap: 12px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .brand-text {
        font-size: 20px;
    }

    .search-box {
        display: none;
    }

    .hero-slider {
        height: 560px;
    }

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

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        min-height: 44px;
        padding: 0 16px;
        font-size: 14px;
    }

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

    .section-head {
        display: block;
    }

    .rail-controls {
        margin-top: 14px;
    }

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

    .category-grid,
    .channel-grid,
    .rank-list,
    .footer-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 42px 64px minmax(0, 1fr);
    }

    .rank-play {
        display: none;
    }

    .player-layout {
        gap: 18px;
    }

    .detail-card {
        grid-template-columns: 112px minmax(0, 1fr);
        padding: 16px;
    }

    .detail-card > img {
        width: 112px;
    }

    .detail-article {
        padding: 22px;
    }

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

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

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

    .poster-wrap {
        height: 100%;
        aspect-ratio: auto;
    }

    .category-card {
        min-height: 230px;
    }

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

    .detail-card > img {
        width: 100%;
        max-height: 420px;
    }
}
