:root {
    --teal: #14b8a6;
    --teal-dark: #0f766e;
    --teal-soft: #ccfbf1;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --bg: #f8fafc;
    --footer: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--ink);
    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: #ffffff;
    background: linear-gradient(90deg, #0f766e 0%, #14b8a6 55%, #0891b2 100%);
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.25);
}

.nav-wrap {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--teal-dark);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

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

.desktop-nav > a,
.nav-dropdown > button {
    border: 0;
    color: #ffffff;
    padding: 10px 0;
    background: transparent;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover {
    color: #d1fffa;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 170px;
    padding: 10px;
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

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

.dropdown-panel a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: #374151;
}

.dropdown-panel a:hover {
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.nav-search {
    display: flex;
    align-items: center;
    width: 270px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.nav-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 8px 12px;
    color: #ffffff;
    background: transparent;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.nav-search button {
    border: 0;
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--teal-dark);
    background: #ffffff;
    white-space: nowrap;
}

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

.menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 8px 24px 20px;
    background: rgba(15, 118, 110, 0.98);
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: #ffffff;
}

.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(20, 184, 166, 0.28) 100%), var(--hero-bg);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 28%, rgba(20, 184, 166, 0.38), transparent 34%), linear-gradient(180deg, transparent 68%, var(--bg) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
    gap: 52px;
    align-items: center;
    padding: 70px 0 96px;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.22);
    color: #a7f3d0;
    font-weight: 700;
    font-size: 14px;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 20px 0 14px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 670px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.hero-tags span,
.tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    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: #ffffff;
    background: linear-gradient(135deg, var(--teal) 0%, #0891b2 100%);
    box-shadow: 0 14px 28px rgba(20, 184, 166, 0.28);
}

.btn-light {
    color: var(--teal-dark);
    background: #ffffff;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.08);
}

.hero-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: linear-gradient(135deg, #0f766e, #111827);
}

.hero-card img.is-missing,
.poster img.is-missing,
.detail-cover img.is-missing,
.player-cover img.is-missing {
    opacity: 0;
}

.hero-card-info {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.hero-card-info strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

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

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dot.is-active {
    background: #ffffff;
}

main {
    min-height: 52vh;
}

.section {
    padding: 56px 0 0;
}

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

.section-head h2 {
    margin: 0 0 6px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-link {
    color: var(--teal-dark);
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #111827);
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, opacity 0.2s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.year-badge {
    right: 10px;
}

.rank-badge {
    left: 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 44px;
    background: rgba(0, 0, 0, 0.36);
    opacity: 0;
    transition: opacity 0.22s ease;
}

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

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: #64748b;
    font-size: 12px;
}

.meta-row span {
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 98px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), #0891b2);
    font-weight: 900;
}

.rank-row img {
    width: 98px;
    height: 66px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #111827);
}

.rank-row h3 {
    margin: 0 0 5px;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-card {
    min-height: 160px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e 0%, #0891b2 100%);
    box-shadow: 0 18px 42px rgba(15, 118, 110, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 56px rgba(15, 118, 110, 0.25);
}

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

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

.category-card span {
    font-weight: 800;
}

.page-hero {
    padding: 72px 0 42px;
    color: #ffffff;
    background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.42), transparent 34%), linear-gradient(135deg, #111827 0%, #0f766e 100%);
}

.page-hero h1 {
    max-width: 860px;
    margin: 16px 0 12px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.filter-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.result-count {
    min-width: 120px;
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.no-results {
    display: none;
    padding: 34px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.no-results.show {
    display: block;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 42px 0 0;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.pagination .current {
    color: #ffffff;
    background: var(--teal);
}

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

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-shell {
    margin-top: -20px;
}

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

.detail-main,
.detail-side,
.player-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.player-panel {
    margin-bottom: 24px;
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: #020617;
    cursor: pointer;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.64;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(20, 184, 166, 0.35), rgba(0, 0, 0, 0.72));
}

.play-pulse {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.92);
    font-size: 34px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 18px rgba(20, 184, 166, 0.22);
}

.video-shell.playing .player-cover {
    display: none;
}

.detail-main {
    padding: 28px;
}

.detail-main h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-main p {
    margin: 0 0 18px;
    color: #374151;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    font-weight: 700;
    font-size: 13px;
}

.detail-side {
    padding: 20px;
}

.detail-cover {
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #111827);
}

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

.side-info {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.side-info div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.side-info span:first-child {
    color: var(--muted);
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tags-row span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 13px;
}

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

.compact-card .poster {
    aspect-ratio: 16 / 9;
}

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
}

.prev-next a {
    flex: 1;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.prev-next span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.prev-next strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    margin-top: 70px;
    color: #ffffff;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
}

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

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 14px;
}

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

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #94a3b8;
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content,
    .rail,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 460px;
    }

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

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

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

    .hero-slider,
    .hero-content {
        min-height: 680px;
    }

    .hero-content {
        padding: 44px 0 90px;
        gap: 28px;
    }

    .hero-card {
        max-width: none;
    }

    .section {
        padding-top: 42px;
    }

    .section-head,
    .filter-panel,
    .prev-next {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.featured-grid,
    .related-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 34px 86px minmax(0, 1fr);
    }

    .rank-row img {
        width: 86px;
        height: 58px;
    }

    .page-hero {
        padding: 48px 0 34px;
    }

    .detail-main,
    .detail-side {
        padding: 18px;
    }
}
