:root {
    --teal: #0f766e;
    --teal-dark: #115e59;
    --teal-soft: #ccfbf1;
    --cyan-soft: #ecfeff;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --blue: #2563eb;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
    --radius: 18px;
    --radius-lg: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, #0f766e 0%, #0891b2 100%);
    box-shadow: var(--shadow-md);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--teal-dark);
    background: linear-gradient(135deg, #ffffff 0%, #ccfbf1 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

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

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

.nav-link,
.mobile-link {
    border-radius: 10px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(255, 255, 255, 0.18);
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-link {
    display: block;
    padding: 10px 12px;
    font-weight: 600;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--slate);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.20) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100% - 1180px) / 2));
    right: 32px;
    bottom: 72px;
    max-width: 760px;
    color: var(--white);
}

.eyebrow,
.page-hero span,
.section-heading span,
.detail-label {
    display: inline-block;
    color: #14b8a6;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 12px 0 14px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 650px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.tag-list span {
    color: #0f766e;
    background: #ecfdf5;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    min-height: 44px;
    padding: 0 22px;
    color: var(--white);
    background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
    box-shadow: 0 14px 32px rgba(20, 184, 166, 0.28);
}

.ghost-button {
    min-height: 44px;
    padding: 0 22px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.ghost-button.dark {
    color: var(--teal-dark);
    background: #ccfbf1;
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 36px;
    line-height: 40px;
    transform: translateY(-50%);
    transition: background 0.25s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.62);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.search-strip,
.section-wrap,
.footer-inner,
.page-main > .breadcrumb,
.content-section,
.watch-section,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-strip {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    align-items: center;
    margin-top: -46px;
    position: relative;
    z-index: 2;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.search-strip h2,
.section-heading h2,
.page-hero h1,
.content-section h2,
.watch-section h2 {
    margin: 8px 0 0;
    color: var(--text);
    line-height: 1.18;
}

.search-strip h2,
.section-heading h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.search-strip p {
    margin: 8px 0 0;
    color: var(--muted);
}

.quick-search,
.search-page-box,
.filter-panel {
    display: flex;
    gap: 12px;
}

.quick-search input,
.search-page-box input,
.filter-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.quick-search input:focus,
.search-page-box input:focus,
.filter-input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.quick-search button,
.search-page-box button {
    min-width: 92px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--teal);
    cursor: pointer;
    font-weight: 800;
}

.section-wrap {
    padding: 64px 0 0;
}

.section-wrap.soft-panel {
    margin-top: 64px;
    padding: 38px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
    box-shadow: var(--shadow-sm);
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading.with-link {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading.with-link > a,
.text-button {
    color: var(--teal);
    font-weight: 800;
}

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

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

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

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

.poster {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #164e63 0%, #0f766e 100%);
}

.movie-card.large .poster {
    height: 340px;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.02) 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.duration {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 700;
}

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

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

.movie-card h3 a:hover,
.rank-card h3 a:hover {
    color: var(--teal);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
}

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

.category-card,
.overview-card {
    min-height: 160px;
    border-radius: var(--radius);
    padding: 20px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.category-card span,
.overview-card h2 {
    color: var(--teal);
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 12px 0 8px;
    color: var(--text);
    font-size: 18px;
}

.category-card em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    min-height: 300px;
    display: flex;
    align-items: end;
    margin-bottom: 38px;
    padding: 84px max(32px, calc((100% - 1180px) / 2)) 48px;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.40) 0, transparent 34%), linear-gradient(135deg, #0f172a 0%, #115e59 100%);
}

.page-hero h1 {
    max-width: 760px;
    color: var(--white);
    font-size: clamp(36px, 5vw, 56px);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #d1d5db;
    font-size: 18px;
}

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

.overview-card p {
    color: var(--muted);
}

.overview-card ul {
    margin: 16px 0;
    padding-left: 18px;
    color: var(--text);
}

.filter-panel {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-panel .filter-input {
    max-width: 560px;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: auto 116px 1fr;
    gap: 16px;
    align-items: center;
    border-radius: var(--radius);
    padding: 14px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, #f59e0b 0%, #f43f5e 100%);
    font-weight: 900;
}

.rank-poster {
    height: 82px;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #164e63 0%, #0f766e 100%);
}

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

.rank-info h3 {
    margin: 0 0 6px;
}

.rank-info p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 28px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 36px;
    align-items: center;
    margin-top: 28px;
    padding: 34px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-xl);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #164e63 0%, #0f766e 100%);
    box-shadow: var(--shadow-md);
}

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

.detail-info h1 {
    margin: 10px 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
}

.lead-text {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 14px;
    font-weight: 700;
}

.watch-section {
    padding-top: 64px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #020617;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--white);
    background: radial-gradient(circle, rgba(20, 184, 166, 0.28) 0, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.84) 100%);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 5px;
    color: var(--teal-dark);
    background: var(--white);
    font-size: 34px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    max-width: 80%;
    font-size: 22px;
}

.content-section {
    margin-top: 36px;
    padding: 30px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.content-section p {
    margin: 14px 0 0;
    color: #374151;
    font-size: 17px;
}

.related-section {
    padding-top: 46px;
}

.search-page-box {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.site-footer {
    margin-top: 72px;
    color: #d1d5db;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.footer-inner {
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

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

.footer-grid p,
.footer-grid ul {
    margin: 0;
    padding: 0;
    color: #cbd5e1;
}

.footer-grid li {
    list-style: none;
    margin: 8px 0;
}

.footer-grid a:hover,
.footer-bottom a:hover {
    color: #5eead4;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #94a3b8;
}

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

.empty-result {
    grid-column: 1 / -1;
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
    .movie-grid,
    .movie-grid.three-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-hero {
        grid-template-columns: 260px 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero {
        height: 520px;
    }

    .hero-content {
        left: 24px;
        right: 24px;
        bottom: 64px;
    }

    .hero-control {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .search-strip {
        grid-template-columns: 1fr;
        margin-top: -28px;
        padding: 22px;
    }

    .quick-search,
    .search-page-box,
    .filter-panel {
        flex-direction: column;
    }

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

    .section-wrap.soft-panel {
        padding: 22px;
    }

    .rank-card {
        grid-template-columns: auto 92px 1fr;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap,
    .mobile-nav,
    .search-strip,
    .section-wrap,
    .footer-inner,
    .page-main > .breadcrumb,
    .content-section,
    .watch-section,
    .detail-hero {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        height: 500px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 34px;
    }

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

    .hero-prev,
    .hero-next {
        display: none;
    }

    .movie-grid,
    .movie-grid.three-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .poster,
    .movie-card.large .poster {
        height: 300px;
    }

    .page-hero {
        min-height: 260px;
        padding: 72px 18px 36px;
    }

    .rank-card {
        grid-template-columns: auto 78px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 13px;
    }

    .rank-poster {
        height: 72px;
    }

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