:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    --cyan-50: #ecfeff;
    --green-500: #22c55e;
    --orange-500: #f97316;
    --red-600: #dc2626;
    --purple-600: #9333ea;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon,
.footer-brand span {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.16);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08);
}

.brand strong {
    display: block;
    font-size: 24px;
    line-height: 1.05;
}

.brand small {
    display: block;
    color: var(--blue-100);
    font-size: 12px;
    margin-top: 2px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link,
.dropdown-trigger {
    border: 0;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown-trigger:hover {
    color: var(--blue-100);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    min-width: 172px;
    padding: 8px;
    border-radius: 14px;
    background: var(--white);
    color: var(--gray-800);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-panel a:hover {
    background: var(--blue-50);
    color: var(--blue-700);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.local-search input,
.filter-select {
    border: 1px solid rgb(255 255 255 / 0.25);
    border-radius: 999px;
    outline: 0;
}

.header-search input,
.mobile-search input {
    width: 210px;
    padding: 9px 14px;
    color: var(--white);
    background: rgb(255 255 255 / 0.12);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: var(--blue-100);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: var(--blue-700);
    background: var(--white);
    cursor: pointer;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--white);
    background: rgb(255 255 255 / 0.12);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgb(255 255 255 / 0.16);
}

.mobile-panel.is-open {
    display: block;
    animation: slideDown 0.25s ease;
}

.mobile-panel-inner {
    display: grid;
    gap: 8px;
    padding: 12px 0 16px;
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0;
}

.mobile-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    background: rgb(255 255 255 / 0.08);
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    flex: 1;
    width: auto;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-900), var(--blue-800) 48%, var(--blue-700));
}

.hero::after {
    position: absolute;
    right: -120px;
    top: -120px;
    width: 380px;
    height: 380px;
    content: "";
    border-radius: 999px;
    background: rgb(96 165 250 / 0.24);
    filter: blur(8px);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image: radial-gradient(circle at 1px 1px, #ffffff 1px, transparent 0);
    background-size: 34px 34px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 48px;
    align-items: center;
    min-height: 560px;
    padding: 68px 0 92px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 0 0 18px;
    border: 1px solid rgb(255 255 255 / 0.25);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.12);
    color: var(--blue-100);
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-lead {
    max-width: 660px;
    margin: 22px 0 28px;
    color: var(--blue-100);
    font-size: clamp(18px, 2vw, 24px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--blue-700);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    color: var(--white);
    border: 2px solid rgb(255 255 255 / 0.82);
    background: rgb(255 255 255 / 0.12);
    backdrop-filter: blur(10px);
}

.btn-blue {
    color: var(--white);
    background: var(--blue-600);
}

.hero-links {
    margin-top: 24px;
}

.hero-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--blue-100);
    background: rgb(255 255 255 / 0.1);
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-links a:hover {
    color: var(--white);
    background: rgb(255 255 255 / 0.2);
}

.hero-visual {
    position: relative;
    min-height: 490px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.22);
    border-radius: 26px;
    background: var(--gray-900);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 20%, rgb(0 0 0 / 0.84));
}

.hero-slide-content {
    position: relative;
    z-index: 1;
    padding: 28px;
}

.hero-slide-content h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.16;
}

.hero-slide-content p {
    margin: 0 0 16px;
    color: rgb(255 255 255 / 0.86);
}

.hero-pill,
.card-badge,
.cover-type,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-pill {
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: rgb(37 99 235 / 0.9);
}

.hero-controls {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgb(17 24 39 / 0.56);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.hero-wave {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 72px;
    background: linear-gradient(180deg, transparent, var(--gray-50));
}

.section {
    padding: 64px 0;
}

.section-soft {
    background: linear-gradient(135deg, var(--blue-50), var(--cyan-50));
}

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

.section-header h2,
.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.section-header p,
.page-hero p,
.category-card p,
.rank-item p,
.movie-desc,
.detail-copy p,
.site-footer p {
    color: var(--gray-600);
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-card-wide .movie-cover {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .movie-cover img,
.rank-item:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 0.68));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
    opacity: 1;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    color: var(--white);
    background: var(--red-600);
    font-size: 12px;
}

.cover-type {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    color: var(--white);
    background: rgb(17 24 39 / 0.7);
    font-size: 12px;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--gray-900);
    font-weight: 800;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-title:hover,
.rank-title:hover,
.related-title:hover {
    color: var(--blue-600);
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 12px;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
}

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: 20px;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

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

.category-card p {
    margin: 0 0 14px;
    color: rgb(255 255 255 / 0.86);
}

.category-icon {
    display: block;
    margin-bottom: 14px;
    font-size: 36px;
}

.gradient-0 {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.gradient-1 {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.gradient-2 {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
}

.gradient-3 {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.gradient-4 {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.gradient-5 {
    background: linear-gradient(135deg, #0f766e, #0e7490);
}

.gradient-6 {
    background: linear-gradient(135deg, #db2777, #be185d);
}

.gradient-7 {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.rank-item {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
}

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

.rank-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--red-600));
    font-weight: 900;
}

.rank-title {
    display: block;
    font-weight: 900;
    font-size: 17px;
    line-height: 1.35;
}

.rank-item p {
    display: -webkit-box;
    margin: 8px 0;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-item small {
    color: var(--gray-500);
}

.page-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
    padding: 58px 0;
}

.page-hero p {
    max-width: 760px;
    color: var(--blue-100);
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgb(255 255 255 / 0.78);
    font-size: 14px;
}

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

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    margin-bottom: 26px;
}

.local-search input,
.filter-select {
    width: 100%;
    border-color: var(--gray-300);
    background: var(--white);
    color: var(--gray-800);
}

.local-search input {
    padding: 13px 18px;
}

.filter-select {
    padding: 13px 18px;
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: 18px;
    text-align: center;
    background: var(--white);
    color: var(--gray-600);
    box-shadow: var(--shadow-md);
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--gray-900), var(--blue-900));
    padding: 30px 0 56px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 32px;
    align-items: start;
}

.player-shell {
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 24px;
    background: #050816;
    box-shadow: var(--shadow-xl);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgb(2 6 23 / 0.08), rgb(2 6 23 / 0.7));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    display: inline-grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--white);
    box-shadow: 0 18px 42px rgb(0 0 0 / 0.32);
    font-size: 32px;
    transition: transform 0.2s ease;
}

.player-overlay:hover .player-button {
    transform: scale(1.08);
}

.player-caption {
    padding: 18px 22px;
    border-top: 1px solid rgb(255 255 255 / 0.08);
}

.player-caption h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.player-caption p {
    margin: 0;
    color: rgb(255 255 255 / 0.78);
}

.poster-panel {
    overflow: hidden;
    border-radius: 24px;
    background: rgb(255 255 255 / 0.08);
    box-shadow: var(--shadow-lg);
}

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

.poster-panel-body {
    padding: 18px;
}

.detail-actions {
    margin-top: 16px;
}

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

.detail-copy,
.related-panel {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-copy {
    padding: 28px;
}

.detail-copy h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-copy p {
    margin: 0 0 22px;
    font-size: 17px;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.meta-pill {
    padding: 7px 11px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 14px;
}

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

.tag {
    padding: 7px 11px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-size: 14px;
}

.related-panel {
    padding: 20px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-card:hover {
    background: var(--gray-50);
}

.related-card img {
    width: 96px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.related-title {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 800;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card small {
    color: var(--gray-500);
}

.site-footer {
    color: var(--gray-300);
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--white);
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 18px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--gray-300);
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgb(255 255 255 / 0.08);
    text-align: center;
    color: var(--gray-500);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .hero-visual {
        min-height: 420px;
    }

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

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

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

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

    .brand small {
        display: none;
    }

    .hero-inner {
        min-height: auto;
        padding: 48px 0 70px;
    }

    .hero-visual {
        min-height: 390px;
    }

    .section {
        padding: 44px 0;
    }

    .section-header {
        display: grid;
        gap: 12px;
    }

    .movie-grid,
    .category-grid,
    .rank-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

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

    .toolbar {
        grid-template-columns: 1fr;
    }

    .detail-copy {
        padding: 20px;
    }
}

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

    .hero-visual {
        min-height: 360px;
    }

    .hero-slide-content {
        padding: 20px;
    }

    .mobile-category-links {
        grid-template-columns: 1fr;
    }
}
