:root {
    --primary-50: #e6f7f7;
    --primary-100: #b3e6e6;
    --primary-400: #1ab0b0;
    --primary-500: #009999;
    --primary-600: #007a7a;
    --primary-800: #003d3d;
    --secondary-50: #f0f4f8;
    --secondary-100: #d9e2ec;
    --secondary-200: #bcccdc;
    --secondary-300: #9fb3c8;
    --secondary-600: #486581;
    --secondary-700: #334e68;
    --secondary-900: #102a43;
    --accent-500: #f97316;
    --white: #ffffff;
    --shadow: 0 12px 35px rgba(16, 42, 67, 0.12);
    --shadow-strong: 0 25px 50px rgba(16, 42, 67, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.narrow {
    width: min(920px, calc(100% - 32px));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(188, 204, 220, 0.75);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

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

.brand-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 153, 153, 0.28);
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 14px;
    color: var(--secondary-700);
    border-radius: 12px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: var(--secondary-50);
    border-radius: 12px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--secondary-900);
    border-radius: 999px;
}

.category-strip {
    border-top: 1px solid rgba(188, 204, 220, 0.5);
}

.category-strip-inner {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 10px 0;
    color: var(--secondary-600);
    scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar {
    display: none;
}

.category-strip a {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
}

.category-strip a:hover {
    color: var(--primary-600);
}

.main-visual {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--secondary-900);
}

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

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

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

.visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.visual-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.visual-copy {
    max-width: 760px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 16px;
    margin-bottom: 18px;
    color: var(--white);
    background: rgba(0, 153, 153, 0.9);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.visual-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.visual-copy p,
.page-hero p {
    max-width: 780px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.visual-tags span,
.tag-row span {
    padding: 5px 10px;
    color: var(--primary-800);
    background: var(--primary-50);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.visual-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary {
    color: var(--white);
    background: var(--primary-500);
    box-shadow: 0 14px 28px rgba(0, 153, 153, 0.28);
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-glass {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.visual-dots {
    position: absolute;
    right: 32px;
    bottom: 32px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.visual-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

.visual-dot.is-active {
    width: 34px;
    background: var(--primary-500);
}

.section {
    padding: 72px 0;
}

.section-white {
    background: var(--white);
}

.category-section {
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-100));
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: var(--secondary-600);
}

.section-head.light h2,
.section-head.light p {
    color: var(--white);
}

.more-link {
    flex: 0 0 auto;
    color: var(--primary-600);
    font-weight: 800;
}

.more-link.light {
    color: var(--primary-100);
}

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--secondary-200);
}

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

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

.poster-mask {
    position: absolute;
    inset: auto 12px 12px auto;
    padding: 6px 12px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    border-radius: 10px;
    font-size: 14px;
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--primary-600);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--primary-600);
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--secondary-600);
    font-size: 14px;
}

.category-mini {
    display: inline-flex;
    margin-top: 12px;
    color: var(--secondary-600);
    font-size: 13px;
    font-weight: 800;
}

.category-mini:hover {
    color: var(--primary-600);
}

.horizontal-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}

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

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

.category-tile {
    min-height: 180px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    background: var(--white);
}

.category-tile > span {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-600);
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0 0 16px;
    color: var(--secondary-700);
}

.category-samples {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--secondary-600);
    font-size: 13px;
    font-weight: 700;
}

.category-samples a:hover {
    color: var(--primary-600);
}

.feature-section {
    color: var(--white);
    background: var(--secondary-900);
}

.feature-section .section-head p {
    color: var(--secondary-200);
}

.feature-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.feature-large,
.feature-small {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border-radius: 24px;
    background: var(--secondary-700);
}

.feature-large img,
.feature-small img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.feature-large:hover img,
.feature-small:hover img {
    transform: scale(1.08);
}

.feature-large::after,
.feature-small::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.18));
}

.feature-large > div,
.feature-small span,
.feature-small strong {
    position: relative;
    z-index: 2;
}

.feature-large > div {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
}

.feature-large span,
.feature-small span {
    color: var(--primary-100);
    font-weight: 800;
}

.feature-large h3 {
    margin: 8px 0;
    font-size: 34px;
}

.feature-large p {
    margin: 0;
    color: var(--secondary-100);
}

.feature-side {
    display: grid;
    gap: 24px;
}

.feature-small {
    min-height: 168px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.feature-small strong {
    margin-top: 6px;
    font-size: 20px;
}

.ranking-preview,
.page-hero.ranking-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--secondary-900), var(--primary-800));
}

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

.rank-row {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.rank-row:hover {
    background: rgba(255, 255, 255, 0.16);
}

.rank-row span {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    background: var(--primary-500);
    border-radius: 12px;
    font-weight: 900;
}

.rank-row em {
    color: var(--secondary-200);
    font-style: normal;
    font-size: 13px;
}

.page-hero,
.detail-top {
    padding: 76px 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--secondary-900), var(--primary-800));
}

.compact-hero {
    padding: 72px 0 58px;
}

.search-panel {
    display: flex;
    max-width: 760px;
    gap: 12px;
    margin-top: 28px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
}

.search-panel.slim {
    max-width: 640px;
}

.search-panel input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    color: var(--secondary-900);
    border: 0;
    border-radius: 12px;
    outline: none;
}

.search-panel button {
    padding: 0 18px;
    color: var(--white);
    background: var(--primary-500);
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.search-panel button:hover {
    background: var(--primary-600);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--secondary-100);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--primary-100);
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.lead-text {
    max-width: 820px;
    color: var(--secondary-100);
    font-size: 20px;
}

.detail-meta {
    margin: 22px 0;
    color: var(--primary-100);
}

.detail-tags span {
    color: var(--primary-800);
}

.player-section {
    background: var(--secondary-900);
    color: var(--white);
}

.player-section h2 {
    margin: 0 0 22px;
    font-size: clamp(28px, 4vw, 42px);
}

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

.player-box video,
.player-trigger,
.player-trigger img {
    width: 100%;
    height: 100%;
}

.player-box video {
    display: block;
    background: #000;
}

.player-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-trigger img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0.58;
}

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

.play-circle {
    position: relative;
    z-index: 2;
    display: inline-grid;
    width: 82px;
    height: 82px;
    place-items: center;
    color: var(--white);
    background: var(--primary-500);
    border-radius: 999px;
    font-size: 30px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 30px;
}

.detail-content p {
    margin: 0 0 28px;
    color: var(--secondary-700);
    font-size: 18px;
    line-height: 1.9;
}

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

.footer {
    color: var(--secondary-200);
    background: var(--secondary-900);
}

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

.footer p {
    max-width: 480px;
    color: var(--secondary-300);
}

.footer h3 {
    margin: 0 0 16px;
    color: var(--white);
}

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

.footer-links a {
    color: var(--secondary-300);
}

.footer-links a:hover {
    color: var(--primary-100);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
    border-top: 1px solid rgba(188, 204, 220, 0.16);
    color: var(--secondary-300);
    font-size: 14px;
}

.is-hidden-by-search {
    display: none;
}

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

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

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: var(--white);
        border-radius: 18px;
        box-shadow: var(--shadow-strong);
    }

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

    .main-visual {
        min-height: 620px;
    }

    .visual-dots {
        left: 24px;
        right: auto;
    }

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

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

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

    .detail-poster {
        max-width: 360px;
    }
}

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

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

    .main-visual {
        height: 76vh;
        min-height: 580px;
    }

    .visual-copy p,
    .page-hero p,
    .lead-text {
        font-size: 16px;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-row em {
        grid-column: 2;
    }

    .section {
        padding: 54px 0;
    }
}
