:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-400: #38bdf8;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --accent-50: #ecfdf5;
    --accent-600: #059669;
    --secondary-900: #0f172a;
    --secondary-800: #1e293b;
    --secondary-700: #334155;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--secondary-800);
    background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 44%, #ffffff 100%);
    line-height: 1.6;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.28);
}

.brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    color: var(--secondary-900);
}

.brand small {
    display: block;
    margin-top: 3px;
    color: var(--gray-500);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--secondary-800);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-menu {
    display: none;
    padding: 0 0 18px;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 650;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--primary-50);
    color: var(--primary-700);
}

main {
    min-height: 70vh;
}

.main-visual {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.20), transparent 28%), linear-gradient(135deg, var(--secondary-900), #0b3b5a 54%, #052f35);
    color: var(--white);
}

.visual-track {
    position: relative;
    min-height: 620px;
}

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

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

.visual-backdrop {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.18)), var(--poster);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.visual-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 82px 0 72px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-100);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.visual-copy h1,
.visual-copy h2 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 850;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    font-weight: 750;
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(2, 132, 199, 0.32);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.visual-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
}

.visual-poster {
    aspect-ratio: 3 / 4;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.82)), var(--poster);
    background-size: cover;
    background-position: center;
}

.visual-card-body {
    padding: 20px;
}

.visual-card-body h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.visual-card-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
}

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

.visual-dots button {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.visual-dots button.is-active {
    background: var(--white);
}

.section {
    padding: 54px 0;
}

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

.section-title {
    margin: 0;
    color: var(--secondary-900);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--gray-600);
    max-width: 720px;
}

.more-link {
    color: var(--primary-700);
    font-weight: 750;
}

.quick-search {
    margin-top: -34px;
    position: relative;
    z-index: 8;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

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

.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px;
    gap: 12px;
    margin: 24px 0 28px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
}

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

.category-card {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: var(--secondary-900);
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -42px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.18);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 820;
}

.category-card p {
    margin: 0;
    color: var(--gray-600);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.74)), var(--poster);
    background-size: cover;
    background-position: center;
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.78));
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.88);
    font-size: 12px;
    font-weight: 750;
}

.poster-type {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.card-body {
    padding: 16px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: var(--secondary-900);
    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;
}

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

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 76px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.rank-number {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    font-weight: 850;
}

.rank-thumb {
    width: 76px;
    height: 96px;
    border-radius: 12px;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.62)), var(--poster);
    background-size: cover;
    background-position: center;
}

.rank-item h3 {
    margin: 0 0 6px;
    color: var(--secondary-900);
    font-size: 18px;
}

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

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at 85% 15%, rgba(236, 253, 245, 0.22), transparent 30%), linear-gradient(135deg, var(--primary-600), var(--secondary-900));
}

.page-hero-inner {
    padding: 62px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    font-weight: 850;
}

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

.category-samples {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.category-samples a {
    color: var(--primary-700);
    font-size: 14px;
    font-weight: 700;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.82)), var(--poster);
    background-size: cover;
    background-position: center;
    z-index: 3;
}

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

.play-symbol {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(2, 132, 199, 0.92);
    box-shadow: 0 18px 38px rgba(2, 132, 199, 0.36);
    font-size: 34px;
    transform: translateX(3px);
}

.detail-panel {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
}

.detail-panel h1 {
    margin: 0 0 16px;
    color: var(--secondary-900);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 850;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.detail-meta div {
    padding: 12px;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.detail-meta span {
    display: block;
    color: var(--gray-500);
    font-size: 12px;
}

.detail-meta strong {
    display: block;
    margin-top: 3px;
    color: var(--secondary-800);
}

.content-card {
    padding: 26px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
}

.content-card + .content-card {
    margin-top: 22px;
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--secondary-900);
    font-size: 26px;
    line-height: 1.25;
}

.content-card p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
}

.no-result {
    display: none;
    padding: 28px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.no-result.is-visible {
    display: block;
}

.site-footer {
    margin-top: 54px;
    color: rgba(255, 255, 255, 0.76);
    background: var(--secondary-900);
}

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

.site-footer h3,
.site-footer h4 {
    margin: 0 0 12px;
    color: var(--white);
}

.site-footer p {
    margin: 0;
}

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

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

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 14px;
}

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

    .menu-toggle {
        display: block;
    }

    .visual-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .visual-card {
        max-width: 360px;
    }

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

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

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

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

    .brand {
        min-width: 0;
    }

    .brand strong {
        font-size: 16px;
    }

    .brand small {
        display: none;
    }

    .visual-track,
    .visual-content {
        min-height: 560px;
    }

    .visual-content {
        padding: 62px 0 70px;
    }

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

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

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

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

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

    .rank-item .btn {
        grid-column: 2 / 4;
        width: 100%;
    }

    .rank-thumb {
        width: 62px;
        height: 82px;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

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

    .visual-card {
        display: none;
    }

    .visual-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
