:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --secondary: #14b8a6;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--soft);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--ink);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.nav-link {
    font-weight: 650;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    border: 0;
    background: #eef2f7;
    color: var(--ink);
    border-radius: 12px;
    padding: 8px 12px;
}

.channel-strip {
    border-top: 1px solid rgba(229, 231, 235, 0.72);
}

.channel-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.channel-inner::-webkit-scrollbar {
    display: none;
}

.channel-inner a {
    flex: 0 0 auto;
    font-size: 14px;
    color: #4b5563;
    padding: 8px 0;
}

.channel-inner a:hover {
    color: var(--primary-dark);
}

.main-container {
    padding: 34px 0 72px;
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 48px));
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 0 80px 64px;
    color: var(--white);
}

.hero-kicker {
    width: max-content;
    margin: 0 0 18px;
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(13, 148, 136, 0.88);
    font-weight: 700;
    font-size: 14px;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-summary {
    margin: 0 0 24px;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(13, 148, 136, 0.12);
    color: var(--primary-dark);
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.hero-actions,
.section-head,
.slider-tools,
.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--primary);
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.text-button {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--white);
}

.search-panel {
    display: grid;
    grid-template-columns: 1.6fr 0.7fr 0.7fr;
    gap: 14px;
    margin: 26px 0 38px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.search-field {
    display: grid;
    gap: 8px;
}

.search-field span {
    font-size: 13px;
    font-weight: 800;
    color: #4b5563;
}

.search-field input,
.search-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 13px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

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

.section-block {
    margin-top: 52px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-head h2,
.page-title h1,
.detail-copy h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

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

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

.movie-card,
.rank-card,
.category-entry,
.info-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.movie-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.13);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-poster {
    position: relative;
    height: 250px;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #134e4a);
}

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

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

.movie-poster figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.55);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3,
.rank-card h3,
.category-entry h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-one-line,
.rank-card p,
.category-entry p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 650;
}

.movie-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
}

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

.category-entry a {
    display: block;
}

.category-cover {
    height: 132px;
    background-size: cover;
    background-position: center;
    background-color: #0f172a;
}

.category-entry-body {
    padding: 16px;
}

.category-entry-body span {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.rank-card a {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.rank-card img {
    width: 92px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.rank-card span:not(.rank-index) {
    color: var(--muted);
    font-size: 13px;
}

.rank-index {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: var(--white);
    background: var(--primary);
    font-weight: 900;
}

.horizontal-wrap {
    position: relative;
}

.horizontal-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 310px);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.horizontal-list::-webkit-scrollbar {
    display: none;
}

.scroll-button {
    border: 0;
    border-radius: 12px;
    min-height: 40px;
    padding: 0 14px;
    background: #eef2f7;
    color: #1f2937;
    font-weight: 800;
}

.page-title {
    margin-bottom: 28px;
    padding: 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--white), #ecfeff);
    border: 1px solid rgba(204, 251, 241, 0.9);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    background: #000;
}

.player-cover {
    border: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
}

.player-cover-inner {
    display: grid;
    gap: 12px;
    place-items: center;
    padding: 20px;
}

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--primary);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(13, 148, 136, 0.34);
}

.player-cover strong {
    font-size: clamp(20px, 3vw, 34px);
    text-align: center;
}

.player-shell.is-playing .player-cover {
    display: none;
}

.detail-side,
.detail-copy,
.related-block {
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-side {
    overflow: hidden;
}

.detail-side img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    background: #0f172a;
}

.detail-side-body,
.detail-copy,
.related-block {
    padding: 22px;
}

.detail-side h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-copy {
    margin-top: 24px;
}

.detail-copy p {
    color: #374151;
    line-height: 1.9;
}

.related-block {
    margin-top: 24px;
}

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

.info-card {
    padding: 20px;
}

.info-card h3 {
    margin: 0 0 10px;
}

.info-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-empty {
    padding: 24px;
    border-radius: 16px;
    background: var(--white);
    color: var(--muted);
    text-align: center;
}

.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 42px 0 28px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    max-width: 620px;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-brand {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 150px;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
    text-align: center;
}

[hidden] {
    display: none !important;
}

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 220px 1fr;
    }

    .detail-side img {
        height: 100%;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 58px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 60px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px;
    }

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

    .hero-content {
        width: calc(100% - 30px);
        padding: 76px 0 84px 26px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .movie-poster {
        height: 220px;
    }

    .rank-card a {
        grid-template-columns: auto 86px minmax(0, 1fr);
    }

    .detail-side {
        display: block;
    }

    .detail-side img {
        height: 360px;
    }

    .footer-inner {
        flex-direction: column;
    }
}
