:root {
    --emerald: #10b981;
    --emerald-dark: #059669;
    --teal: #0d9488;
    --cyan: #0891b2;
    --yellow: #facc15;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --border: #e5e7eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #ecfdf5 48%, #f0fdfa 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #059669 0%, #0d9488 55%, #0891b2 100%);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.25);
}

.nav-wrap {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    transition: transform 0.2s ease;
}

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

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-copy small {
    margin-top: 4px;
    color: #d1fae5;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #ffffff;
    font-weight: 700;
}

.desktop-nav a {
    opacity: 0.94;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #d1fae5;
    opacity: 1;
}

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

.dropdown-panel {
    position: absolute;
    left: -18px;
    top: 60px;
    width: 210px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    color: #374151;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    transition: all 0.18s ease;
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
}

.dropdown-panel a:hover {
    background: #ecfdf5;
    color: var(--emerald-dark);
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.search-box {
    position: relative;
    margin-left: auto;
    width: min(360px, 35vw);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 11px 88px 11px 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.search-box button {
    position: absolute;
    right: 4px;
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--emerald-dark);
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.search-results {
    position: absolute;
    top: 54px;
    right: 0;
    width: min(440px, 86vw);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
}

.search-results.open {
    display: block;
}

.search-results a {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.search-results img {
    width: 50px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background: #d1d5db;
}

.search-results strong {
    display: block;
    color: #111827;
    font-size: 14px;
}

.search-results small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.4;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    background: rgba(6, 78, 59, 0.2);
}

.mobile-nav a {
    display: block;
    color: #ffffff;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.45) 48%, rgba(17, 24, 39, 0.25) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.hero-kicker {
    width: max-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(250, 204, 21, 0.12);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    max-width: 760px;
    margin: 20px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.detail-meta a,
.card-meta span {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald) 0%, var(--teal) 100%);
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.32);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.hero-dots button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-weight: 700;
}

.hero-dots button.active {
    color: #064e3b;
    background: #ffffff;
}

.quick-panel,
.content-section,
.split-section,
.rank-page-layout,
.detail-shell,
.filter-bar {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 0;
}

.quick-inner {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.quick-inner h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.side-panel h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.quick-inner p,
.section-head p,
.page-hero span,
.channel-card p,
.detail-info p {
    color: var(--muted);
    line-height: 1.75;
}

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

.quick-links a {
    display: grid;
    place-items: center;
    min-height: 54px;
    border-radius: 16px;
    color: var(--emerald-dark);
    background: #ecfdf5;
    font-weight: 800;
}

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

.section-head p {
    margin: 8px 0 0;
}

.section-head.compact h2 {
    font-size: 28px;
}

.section-more {
    min-height: 42px;
    color: var(--emerald-dark);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

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

.movie-card {
    border-radius: 20px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #cffafe);
}

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

.movie-card:hover img,
.category-tile:hover img,
.channel-cover:hover img,
.compact-card:hover img {
    transform: scale(1.08);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.68);
    font-weight: 800;
    font-size: 12px;
}

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

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

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

.movie-card h2,
.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover {
    color: var(--emerald-dark);
}

.movie-card p {
    min-height: 58px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta span {
    background: #f3f4f6;
    color: #4b5563;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--emerald-dark);
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 700;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    gap: 24px;
}

.ranking-box,
.category-box,
.side-panel,
.detail-info,
.player-card,
.channel-card,
.filter-inner {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ranking-box,
.category-box,
.side-panel {
    padding: 24px;
}

.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 44px 62px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
    background: #ecfdf5;
    transform: translateX(4px);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-weight: 900;
}

.rank-item img {
    width: 62px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
    background: #d1d5db;
}

.rank-copy strong,
.compact-card strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
}

.rank-copy small {
    color: var(--muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-item em {
    color: var(--emerald-dark);
    font-style: normal;
    font-weight: 800;
}

.category-grid {
    display: grid;
    gap: 12px;
}

.category-tile {
    position: relative;
    min-height: 96px;
    border-radius: 18px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transition: transform 0.35s ease;
}

.category-tile span {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 96px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent);
}

.category-tile strong {
    font-size: 20px;
}

.category-tile small {
    margin-top: 6px;
    color: #e5e7eb;
    line-height: 1.45;
}

.page-hero {
    background: linear-gradient(90deg, #059669 0%, #0d9488 55%, #0891b2 100%);
    color: #ffffff;
    max-width: none;
    padding: 70px 20px;
}

.page-hero div {
    max-width: 1180px;
    margin: 0 auto;
}

.page-hero p {
    margin: 0 0 12px;
    color: #d1fae5;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(36px, 6vw, 62px);
}

.page-hero span {
    display: block;
    max-width: 760px;
    margin-top: 16px;
    color: #ecfeff;
    font-size: 18px;
}

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

.channel-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 18px;
}

.channel-cover {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #d1d5db;
}

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

.channel-card h2 {
    margin: 4px 0 10px;
}

.channel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.channel-links a {
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--emerald-dark);
    background: #ecfdf5;
    font-size: 13px;
    font-weight: 700;
}

.filter-inner {
    display: grid;
    grid-template-columns: 1fr repeat(3, 170px);
    gap: 12px;
    padding: 16px;
}

.filter-inner input,
.filter-inner select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: 0;
    padding: 12px 14px;
    background: #ffffff;
}

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

.hidden-by-filter {
    display: none !important;
}

.rank-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.ranking-box.large {
    padding: 18px;
}

.rank-list-large .rank-item a {
    grid-template-columns: 52px 74px 1fr auto;
}

.rank-list-large .rank-item img {
    width: 74px;
    height: 98px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 12px;
}

.compact-card img {
    width: 70px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
    background: #d1d5db;
    transition: transform 0.3s ease;
}

.compact-card small {
    color: var(--muted);
    line-height: 1.45;
}

.detail-shell {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--emerald-dark);
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.player-card {
    padding: 0;
    overflow: hidden;
    background: #000000;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.08));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.9);
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.28);
    font-size: 32px;
}

.player-card.is-playing .play-overlay {
    display: none;
}

.detail-info {
    margin-top: 18px;
    padding: 28px;
}

.detail-info h1 {
    margin-bottom: 16px;
}

.detail-meta a,
.detail-meta span {
    background: #f3f4f6;
    color: #4b5563;
}

.detail-meta a {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

.detail-info h2 {
    margin: 28px 0 10px;
    font-size: 22px;
}

.detail-info p {
    margin: 0;
    font-size: 16px;
}

.lead-text {
    color: #374151 !important;
    font-size: 18px !important;
    font-weight: 600;
}

.detail-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.detail-poster {
    width: 100%;
    border-radius: var(--radius);
    background: #d1d5db;
    box-shadow: var(--shadow);
}

.related-section {
    padding-bottom: 40px;
}

.site-footer {
    margin-top: 60px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 38px 20px 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.footer-inner p {
    max-width: 560px;
    margin: 0;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.footer-links a:hover {
    color: #6ee7b7;
}

.copyright {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 28px;
    color: #6b7280;
    font-size: 13px;
}

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

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

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

    .hero-carousel {
        height: 560px;
    }

    .quick-inner,
    .split-section,
    .rank-page-layout,
    .detail-layout,
    .channel-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 720px) {
    .nav-wrap {
        height: 62px;
        padding: 0 14px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy small {
        display: none;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-dots {
        bottom: 18px;
    }

    .hero-dots button {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .quick-inner {
        margin-top: -42px;
        padding: 20px;
    }

    .quick-links,
    .movie-grid,
    .filter-inner,
    .channel-card {
        grid-template-columns: 1fr;
    }

    .rank-item a,
    .rank-list-large .rank-item a {
        grid-template-columns: 40px 58px 1fr;
    }

    .rank-item em {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 460px) {
    .movie-grid {
        gap: 16px;
    }

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

    .content-section,
    .split-section,
    .rank-page-layout,
    .detail-shell,
    .filter-bar {
        padding-left: 14px;
        padding-right: 14px;
    }
}
