:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --cyan: #0891b2;
    --blue: #2563eb;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.14);
    --shadow-xl: 0 30px 70px rgba(15, 23, 42, 0.22);
    --radius-lg: 18px;
    --radius-xl: 26px;
    --radius-2xl: 34px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: var(--teal-dark);
    background: var(--white);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.16);
}

.brand-name {
    font-size: 1.25rem;
}

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

.nav-link,
.mobile-link {
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.95rem;
    font-weight: 650;
    transition: background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    background: rgba(255, 255, 255, 0.18);
}

.nav-link.active {
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 99px;
    background: var(--white);
}

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

.mobile-panel.open {
    display: grid;
    gap: 6px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.46) 48%, rgba(15, 118, 110, 0.24));
}

.hero-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 38px;
    align-items: end;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 72px;
}

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

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.45rem, 6vw, 4.9rem);
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 1.12rem;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    font-weight: 700;
}

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

.button-primary,
.button-ghost,
.section-more,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 18px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button-primary,
.play-button {
    color: var(--white);
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.36);
}

.button-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.button-primary:hover,
.button-ghost:hover,
.section-more:hover,
.play-button:hover {
    transform: translateY(-2px);
}

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-xl);
    padding: 22px;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.hero-panel strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.hero-panel a {
    display: block;
    border-radius: 14px;
    padding: 12px 0;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-panel a:last-child {
    border-bottom: 0;
}

.hero-nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.62);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 32px;
    background: var(--white);
}

main {
    min-height: 60vh;
}

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

.page-block {
    padding: 64px 0;
}

.section-stack {
    display: grid;
    gap: 70px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    line-height: 1.08;
}

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--gray-600);
}

.section-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-more {
    flex: 0 0 auto;
    color: var(--teal-dark);
    background: #ccfbf1;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-900), var(--teal-dark));
}

.movie-card-large .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(13, 148, 136, 0.94);
}

.rank-badge {
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--amber), var(--rose));
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.08rem;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--teal-dark);
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0;
    color: var(--gray-600);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card .tag-row span {
    color: var(--teal-dark);
    background: #ccfbf1;
    backdrop-filter: none;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 2px;
    font-size: 0.85rem;
    font-weight: 800;
}

.card-bottom span,
.card-bottom a {
    color: var(--teal-dark);
}

.feature-band {
    border-radius: var(--radius-2xl);
    padding: 32px;
    background: linear-gradient(90deg, #f0fdfa, #ecfeff);
    box-shadow: var(--shadow-sm);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: var(--radius-xl);
    padding: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal), var(--cyan), var(--blue));
    box-shadow: var(--shadow-md);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--slate-800), var(--teal));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #7c3aed, var(--cyan));
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.42rem;
}

.category-card p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
}

.category-card span {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.search-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 30px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-xl);
    padding: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--gray-800);
    background: var(--white);
    outline: none;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--gray-700);
    background: var(--white);
    font-weight: 800;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.filter-button:hover,
.filter-button.active {
    color: var(--white);
    background: var(--teal);
    transform: translateY(-1px);
}

.page-hero {
    color: var(--white);
    background: linear-gradient(110deg, var(--teal), var(--cyan), var(--blue));
}

.page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.page-hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.1rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--teal-dark);
}

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

.detail-main,
.detail-side,
.story-box,
.player-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-main {
    overflow: hidden;
}

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.player-wrap video {
    width: 100%;
    height: 100%;
    background: var(--slate-950);
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.18));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    border: 0;
    min-height: 56px;
    padding: 0 26px;
    font-size: 1.05rem;
}

.player-message {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    display: none;
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--white);
    background: rgba(244, 63, 94, 0.92);
    font-weight: 700;
}

.player-message.show {
    display: block;
}

.detail-content {
    padding: 30px;
}

.detail-title {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--teal-dark);
    background: #ccfbf1;
    font-weight: 800;
    font-size: 0.86rem;
}

.story-box {
    padding: 26px;
    margin-top: 22px;
}

.story-box h2 {
    margin: 0 0 12px;
    color: var(--gray-900);
    font-size: 1.45rem;
}

.story-box p {
    margin: 0;
    color: var(--gray-700);
}

.detail-side {
    overflow: hidden;
    padding: 18px;
}

.detail-side img {
    border-radius: var(--radius-lg);
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-info {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.side-info div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 9px;
}

.side-info span:first-child {
    color: var(--gray-500);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 76px 120px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-lg);
    padding: 14px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber), var(--rose));
    font-size: 1.15rem;
    font-weight: 900;
}

.rank-thumb img {
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 6px;
    color: var(--gray-900);
    font-size: 1.25rem;
}

.rank-info p {
    margin: 0;
    color: var(--gray-600);
}

.site-footer {
    margin-top: 64px;
    color: #cbd5e1;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.footer-grid p {
    margin: 0;
    max-width: 620px;
}

.footer-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a:hover {
    color: #5eead4;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    color: #94a3b8;
    font-size: 0.92rem;
}

.hidden-card {
    display: none !important;
}

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

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

    .hero-panel {
        display: none;
    }
}

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

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

    .hero {
        height: 560px;
    }

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

    .hero-copy p {
        font-size: 1rem;
    }

    .hero-nav {
        display: none;
    }

    .section-heading {
        display: grid;
    }

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

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

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

@media (max-width: 560px) {
    .navbar,
    .mobile-panel,
    .container,
    .page-hero-inner,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        width: min(100% - 24px, 1180px);
        padding-bottom: 62px;
    }

    .hero-copy h1 {
        font-size: 2.35rem;
    }

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

    .feature-band,
    .search-panel,
    .detail-content,
    .story-box {
        padding: 20px;
    }

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

    .rank-thumb {
        display: none;
    }

    .rank-action {
        grid-column: 1 / 3;
    }
}
