:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --teal-500: #14b8a6;
    --cyan-600: #0891b2;
    --rose-500: #f43f5e;
    --orange-500: #f97316;
    --amber-400: #fbbf24;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.22);
    --radius-md: 18px;
    --radius-lg: 28px;
    --content: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--gray-50), var(--emerald-50) 45%, #f0fdfa);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald-600), var(--teal-500), var(--cyan-600));
    box-shadow: var(--shadow-sm);
}

.header-inner {
    width: min(100% - 32px, var(--content));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

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

.brand-text small {
    margin-top: 3px;
    color: var(--emerald-100);
    font-size: 12px;
}

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

.desktop-nav > a,
.nav-dropdown > button,
.mobile-nav a {
    border: 0;
    color: var(--white);
    background: transparent;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown > button:hover,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--emerald-100);
}

.nav-dropdown {
    position: relative;
    padding: 22px 0;
}

.nav-dropdown-menu {
    position: absolute;
    top: 64px;
    left: 50%;
    width: 210px;
    padding: 10px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

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

.nav-dropdown-menu a:hover {
    color: var(--emerald-700);
    background: var(--emerald-50);
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 260px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    color: var(--white);
    background: transparent;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search button {
    border: 0;
    padding: 10px 15px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--content));
    margin: 0 auto;
    padding: 0 0 18px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    color: var(--white);
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: brightness(0.42);
    transform: scale(1.05);
}

.hero-slide.is-active .hero-background {
    animation: heroZoom 9s ease forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1.08);
    }
    to {
        transform: scale(1.01);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.42) 50%, rgba(17, 24, 39, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--content));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 44px;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-heading span,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-400);
    font-weight: 800;
    letter-spacing: 0.08em;
}

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

.hero-copy p {
    max-width: 780px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.ranking-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.ranking-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.3);
}

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

.btn-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.btn-light {
    color: var(--emerald-700);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.hero-panel {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 19px;
}

.hero-thumbs {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.compact-card img {
    width: 78px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong,
.compact-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card strong {
    color: var(--white);
    font-size: 14px;
}

.compact-card em {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-style: normal;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

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

.main-section,
.page-section {
    width: min(100% - 32px, var(--content));
    margin: 0 auto;
    padding: 72px 0 0;
}

.section-heading,
.page-heading {
    margin-bottom: 30px;
}

.section-heading h2,
.page-heading h1 {
    margin: 8px 0 0;
    color: var(--gray-900);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--gray-500);
    font-size: 17px;
}

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-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-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.75), rgba(17, 24, 39, 0.08));
    transition: opacity 0.25s ease;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 185, 129, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
    opacity: 1;
}

.movie-card:hover .poster-play {
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--emerald-700);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-body h3 a:hover,
.detail-related h3 a:hover {
    color: var(--emerald-700);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: var(--gray-500);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span,
.ranking-tags span,
.detail-tags span {
    color: var(--emerald-700);
    background: var(--emerald-50);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 212px;
    padding: 26px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
    box-shadow: var(--shadow-sm);
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, var(--gray-900), var(--cyan-600));
}

.category-card::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -48px;
    width: 170px;
    height: 170px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 25px;
}

.category-card p {
    position: relative;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.83);
}

.category-card a {
    position: relative;
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(130px, 170px));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    background: var(--white);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.no-results {
    display: none;
    padding: 28px;
    border-radius: var(--radius-md);
    color: var(--gray-500);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
}

.ranking-cover {
    position: relative;
    display: block;
    min-height: 170px;
    overflow: hidden;
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-cover span {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
    box-shadow: var(--shadow-sm);
    font-size: 19px;
    font-weight: 900;
}

.ranking-body {
    padding: 18px;
}

.ranking-body p {
    margin: 0 0 8px;
    color: var(--emerald-700);
    font-size: 13px;
    font-weight: 800;
}

.ranking-body h3 {
    margin: 0 0 15px;
    font-size: 21px;
}

.detail-hero {
    color: var(--white);
    background: var(--gray-900);
}

.detail-hero-bg {
    position: relative;
    min-height: 430px;
    overflow: hidden;
}

.detail-hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--detail-cover) center / cover;
    filter: brightness(0.36) blur(2px);
    transform: scale(1.04);
}

.detail-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.48));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--content));
    min-height: 430px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 34px;
    padding: 46px 0;
}

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

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

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

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
}

.detail-copy p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

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

.player-card,
.detail-text-card,
.side-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--gray-900);
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    background: #000000;
}

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.18), rgba(17, 24, 39, 0.75));
}

.player-overlay.is-hidden {
    display: none;
}

.player-button {
    position: relative;
    z-index: 4;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    box-shadow: 0 20px 55px rgba(16, 185, 129, 0.38);
    font-size: 32px;
    cursor: pointer;
}

.player-title {
    padding: 20px 22px;
}

.player-title h2,
.detail-text-card h2,
.side-card h2 {
    margin: 0;
    font-size: 24px;
}

.player-title p {
    margin: 8px 0 0;
    color: var(--gray-500);
}

.detail-text-card {
    padding: 24px;
    margin-top: 26px;
}

.detail-text-card p {
    margin: 12px 0 0;
    color: var(--gray-700);
    font-size: 17px;
}

.side-card {
    padding: 20px;
}

.side-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.side-list .compact-card {
    color: var(--gray-900);
    background: var(--gray-50);
}

.side-list .compact-card:hover {
    background: var(--emerald-50);
}

.side-list .compact-card strong {
    color: var(--gray-900);
}

.side-list .compact-card em {
    color: var(--gray-500);
}

.detail-related {
    margin-top: 32px;
}

.page-actions {
    margin-top: 24px;
}

.site-footer {
    margin-top: 84px;
    color: #d1d5db;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800), var(--gray-900));
}

.footer-grid {
    width: min(100% - 32px, var(--content));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 50px 0 36px;
}

.footer-brand {
    color: var(--white);
    font-size: 23px;
}

.site-footer p {
    max-width: 340px;
    color: #9ca3af;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 9px;
}

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

.footer-bottom {
    width: min(100% - 32px, var(--content));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

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

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-nav.is-open {
        display: grid;
        gap: 12px;
    }

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

    .hero-panel {
        display: none;
    }

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

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

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

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

@media (max-width: 760px) {
    .hero-carousel,
    .hero-content {
        min-height: 560px;
    }

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

    .ranking-item {
        grid-template-columns: 128px minmax(0, 1fr);
    }

    .ranking-cover {
        min-height: 150px;
    }

    .detail-hero-inner {
        gap: 22px;
    }

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

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
