* {
    box-sizing: border-box;
}

:root {
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #3b82f6;
    --teal: #14b8a6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.gradient-text {
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bg-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.38;
}

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

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-size: 15px;
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.26);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    position: relative;
    color: var(--gray-700);
    font-weight: 650;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    background: #ffffff;
}

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

.mobile-link.active,
.mobile-link:hover {
    background: #ecfeff;
    color: var(--cyan-dark);
}

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 750;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    border: 2px solid var(--gray-200);
    background: #ffffff;
    color: var(--gray-700);
}

.btn-light {
    background: rgba(255, 255, 255, 0.92);
    color: var(--gray-900);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan-dark);
}

.home-hero,
.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 48%, #ccfbf1 100%);
}

.home-hero {
    min-height: 680px;
    padding: 78px 0 70px;
}

.page-hero {
    padding: 70px 0 60px;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: 44px;
    align-items: center;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.14);
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(36px, 5vw, 58px);
}

.hero-copy p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 18px;
    color: var(--gray-600);
    font-size: 19px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--cyan-dark);
    font-size: 14px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0;
}

.hero-search {
    display: flex;
    max-width: 640px;
    padding: 8px;
    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-md);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 16px;
    background: transparent;
    outline: 0;
    color: var(--gray-900);
}

.hero-search button {
    border: 0;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 34px;
    background: #ffffff;
    box-shadow: 0 32px 80px rgba(37, 99, 235, 0.22);
    opacity: 0;
    transform: translateX(24px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-slide-image {
    position: relative;
    height: 350px;
    overflow: hidden;
    background: var(--gray-100);
}

.hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-slide:hover img {
    transform: scale(1.06);
}

.hero-slide-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
}

.hero-slide-badge {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 1;
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.9);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.hero-slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

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

.hero-slide-content p {
    margin: 0 0 18px;
    color: var(--gray-600);
}

.hero-slide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.hero-slide-meta span,
.tag-row span,
.fact-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 4px 10px;
    background: #ecfeff;
    color: var(--cyan-dark);
    font-size: 13px;
    font-weight: 700;
}

.slider-controls {
    position: absolute;
    right: 22px;
    bottom: 22px;
    display: flex;
    gap: 10px;
}

.slider-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-900);
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(180deg, #ffffff, var(--gray-50));
}

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

.section-head h2,
.section-title {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.section-head p,
.section-subtitle {
    margin: 0;
    color: var(--gray-600);
    font-size: 18px;
}

.stats-grid,
.category-grid,
.movie-grid,
.related-grid {
    display: grid;
    gap: 24px;
}

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

.stat-card {
    padding: 26px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, var(--gray-50));
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 24px;
}

.stat-card span {
    color: var(--gray-600);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card[hidden] {
    display: none;
}

.movie-cover {
    position: relative;
    display: block;
    height: 286px;
    overflow: hidden;
    background: var(--gray-100);
}

.movie-card-compact .movie-cover {
    height: 230px;
}

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

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

.cover-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
    opacity: 0.78;
}

.play-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(6, 182, 212, 0.94);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    border-radius: 9px;
    padding: 5px 9px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.movie-info {
    padding: 18px;
}

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

.movie-info h2 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.32;
}

.movie-info h2 a:hover {
    color: var(--cyan-dark);
}

.movie-info p {
    display: -webkit-box;
    min-height: 66px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card a {
    position: relative;
    display: block;
    min-height: 220px;
    padding: 24px;
}

.category-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    right: -52px;
    top: -52px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 23px;
}

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

.category-samples {
    display: grid;
    gap: 6px;
    margin: 18px 0;
    color: var(--gray-600);
    font-size: 14px;
}

.category-samples a:hover {
    color: var(--cyan-dark);
}

.category-card strong {
    color: var(--cyan-dark);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 28px;
}

.rank-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 18px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-card img {
    width: 170px;
    height: 116px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--gray-100);
}

.rank-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.rank-item:hover {
    background: #ecfeff;
}

.rank-item img {
    width: 68px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--gray-100);
}

.rank-num {
    color: var(--cyan-dark);
    font-size: 18px;
    font-weight: 900;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy em {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.side-panel {
    position: sticky;
    top: 96px;
    align-self: start;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.side-panel h2 {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 20px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
    padding: 18px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 750;
}

.search-box {
    grid-column: span 1;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
    color: var(--gray-900);
    outline: 0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.empty-state {
    margin: 30px 0;
    border: 1px dashed var(--gray-200);
    border-radius: 22px;
    padding: 36px;
    color: var(--gray-500);
    text-align: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--gray-600);
    font-size: 14px;
}

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

.detail-hero {
    padding: 48px 0;
    background: linear-gradient(135deg, #ecfeff, #eff6ff, #ffffff);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.detail-copy p {
    max-width: 780px;
    color: var(--gray-600);
    font-size: 18px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-xl);
}

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

.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.player-section {
    padding: 50px 0 30px;
    background: #0f172a;
}

.player-shell {
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 32px 80px rgba(2, 6, 23, 0.45);
}

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

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #000000;
    cursor: pointer;
}

.player-cover[hidden] {
    display: none;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    filter: saturate(1.08);
}

.play-badge {
    position: absolute;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 50px rgba(6, 182, 212, 0.45);
}

.content-card {
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    padding: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.content-card p {
    color: var(--gray-600);
    font-size: 17px;
}

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

.info-list {
    display: grid;
    gap: 12px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 12px;
}

.info-list dt {
    color: var(--gray-500);
}

.info-list dd {
    margin: 0;
    color: var(--gray-900);
    font-weight: 750;
    text-align: right;
}

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.next-prev a {
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
    color: var(--gray-700);
}

.next-prev a:hover {
    border-color: var(--cyan);
    color: var(--cyan-dark);
}

.site-footer {
    margin-top: 70px;
    background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
    border-top: 1px solid var(--gray-200);
}

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer p,
.site-footer a {
    display: block;
    color: var(--gray-600);
}

.site-footer a {
    margin-bottom: 8px;
}

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

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

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card,
.category-card,
.stat-card,
.rank-card {
    animation: slideUp 0.5s ease both;
}

@media (max-width: 1100px) {
    .hero-grid,
    .rank-layout,
    .detail-grid,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 520px;
    }

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

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

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

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

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .mobile-nav.open {
        display: block;
    }

    .home-hero {
        min-height: auto;
        padding: 46px 0 44px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

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

    .hero-search input {
        min-height: 46px;
    }

    .hero-slider {
        min-height: 500px;
    }

    .hero-slide-image {
        height: 300px;
    }

    .section-head {
        display: block;
    }

    .section-head .btn-secondary,
    .section-head .btn-primary {
        margin-top: 18px;
    }

    .category-grid,
    .movie-grid,
    .related-grid,
    .stats-grid,
    .filter-panel,
    .next-prev {
        grid-template-columns: 1fr;
    }

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

    .rank-card img {
        width: 120px;
        height: 92px;
    }

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

    .content-card {
        padding: 20px;
    }

    .site-footer {
        margin-top: 46px;
    }
}
