:root {
    --page-bg: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --line-soft: #e2e8f0;
    --brand: #0891b2;
    --brand-strong: #0284c7;
    --brand-soft: #ecfeff;
    --dark: #020617;
    --card: #ffffff;
    --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 24px 55px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background: linear-gradient(180deg, #ffffff 0%, var(--page-bg) 34%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img,
video {
    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.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.brand span:last-child,
.footer-brand span:last-child {
    background: linear-gradient(90deg, var(--brand), var(--brand-strong));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--brand), #2563eb);
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.desktop-nav a,
.mobile-nav a {
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--brand);
}

.nav-search {
    display: flex;
    align-items: center;
    width: 310px;
    padding: 4px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: #ffffff;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 8px 12px;
    color: #0f172a;
    background: transparent;
}

.nav-search button {
    border: 0;
    padding: 8px 16px;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.mobile-menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #0f172a;
    cursor: pointer;
    background: #f1f5f9;
}

.mobile-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav[hidden] {
    display: none;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(180deg, #020617, #0f172a);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 20%, rgba(6, 182, 212, 0.32), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.93), rgba(2, 6, 23, 0.55) 54%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding: 92px 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 20px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.85;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-bottom: 28px;
}

.tag-pill,
.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #0e7490;
    font-size: 13px;
    font-weight: 800;
    background: #ecfeff;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #2563eb);
    box-shadow: 0 18px 35px rgba(8, 145, 178, 0.32);
}

.secondary-button {
    color: #0f172a;
    background: #ffffff;
}

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

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

main {
    display: block;
}

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

.page-shell {
    padding: 42px 0 72px;
}

.section-shell {
    padding: 66px 0;
}

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

.section-header h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 950;
    letter-spacing: -0.045em;
}

.section-header p,
.page-title p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

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

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

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

.movie-card a {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    border-color: rgba(8, 145, 178, 0.28);
    box-shadow: var(--shadow-md);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #cffafe, #e0f2fe);
}

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

.movie-card a:hover .movie-poster img {
    transform: scale(1.08);
}

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(8, 145, 178, 0.95);
}

.poster-year {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    font-size: 12px;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
}

.movie-card a:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    padding: 15px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
}

.movie-card-body h3 {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-body.compact p {
    -webkit-line-clamp: 1;
}

.movie-meta-line {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.movie-meta-line span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
}

.category-chip-bar,
.category-grid {
    display: grid;
    gap: 16px;
}

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

.category-chip,
.category-card {
    border: 1px solid rgba(8, 145, 178, 0.14);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip {
    padding: 16px 18px;
    color: #0f172a;
    font-weight: 900;
    text-align: center;
}

.category-chip:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(8, 145, 178, 0.36);
}

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

.category-card {
    overflow: hidden;
    padding: 24px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 25px;
    font-weight: 950;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--text-muted);
    line-height: 1.75;
}

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

.category-preview img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #cffafe;
}

.filter-panel {
    margin: 26px 0 28px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    outline: 0;
    padding: 0 16px;
    color: #0f172a;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(8, 145, 178, 0.55);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.no-results {
    display: none;
    padding: 34px;
    border-radius: 24px;
    color: var(--text-muted);
    text-align: center;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

.ranking-item a {
    display: grid;
    grid-template-columns: 48px 76px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.rank-number {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--brand), #2563eb);
}

.ranking-item img {
    width: 76px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-item h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 950;
}

.ranking-item p {
    margin: 0 0 8px;
    color: var(--text-muted);
    line-height: 1.65;
}

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

.breadcrumb {
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #0e7490;
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.12));
    transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
}

.player-play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    pointer-events: auto;
    background: linear-gradient(135deg, var(--brand), #2563eb);
    box-shadow: 0 24px 55px rgba(8, 145, 178, 0.44);
}

.detail-panel,
.sidebar-panel {
    margin-top: 22px;
    padding: 26px;
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.detail-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: #64748b;
    font-weight: 800;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: #f1f5f9;
}

.detail-text h2 {
    margin: 28px 0 12px;
    font-size: 22px;
    font-weight: 950;
}

.detail-text p {
    margin: 0 0 16px;
    color: #334155;
    line-height: 1.95;
}

.sidebar-panel {
    margin-top: 0;
}

.sidebar-panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 950;
}

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

.related-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 74px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.related-item h3 {
    margin: 0 0 6px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
}

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

.footer-grid p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.85;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 13px;
}

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

    .nav-search {
        margin-left: auto;
    }

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

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

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

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

@media (max-width: 760px) {
    .nav-shell {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .brand {
        font-size: 19px;
    }

    .nav-search {
        order: 3;
        width: 100%;
    }

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

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

    .hero-control {
        display: none;
    }

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

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

    .category-chip-bar,
    .filter-controls {
        grid-template-columns: 1fr;
    }

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

    .ranking-item a {
        grid-template-columns: 38px 64px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 64px;
    }

    .detail-panel,
    .sidebar-panel {
        padding: 20px;
        border-radius: 22px;
    }
}
