:root {
    --brand: #0f766e;
    --brand-strong: #0d9488;
    --brand-deep: #0f172a;
    --brand-blue: #2563eb;
    --ink: #1f2937;
    --muted: #64748b;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 38%, #eff6ff 100%);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.98), rgba(37, 99, 235, 0.98));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(16px);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    opacity: 0.92;
    transition: color 0.25s ease, opacity 0.25s ease;
}

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

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.header-search input,
.mobile-search input {
    width: 210px;
    color: #ffffff;
    background: transparent;
    outline: none;
}

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

.header-search button,
.mobile-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-weight: 700;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.4rem;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
}

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

.mobile-nav-inner {
    display: grid;
    gap: 14px;
}

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

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

.hero-slide {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 30%, rgba(20, 184, 166, 0.28), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.70) 48%, rgba(15, 23, 42, 0.32) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.90), rgba(15, 23, 42, 0.10));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 86px;
    padding-bottom: 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.24);
    box-shadow: inset 0 0 0 1px rgba(153, 246, 228, 0.26);
    color: #ccfbf1;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-title {
    max-width: 760px;
    font-size: clamp(2.4rem, 6vw, 5.25rem);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.hero-copy {
    max-width: 660px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
    line-height: 1.85;
}

.hero-actions,
.section-head,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-actions {
    margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0d9488, #2563eb);
    box-shadow: 0 16px 28px rgba(13, 148, 136, 0.30);
}

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

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

.btn-soft {
    color: #0f766e;
    background: #ecfeff;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.tag-pill,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-meta span {
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.13);
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #5eead4;
}

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

.section-head {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.035em;
}

.section-kicker {
    margin-bottom: 8px;
    color: #0f766e;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-desc {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

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

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

.poster-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 118, 110, 0.88);
    font-size: 0.78rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: auto;
    right: 12px;
    background: rgba(249, 115, 22, 0.92);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 3rem;
    overflow: hidden;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: #0f766e;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    color: #64748b;
    font-size: 0.86rem;
}

.card-line {
    display: -webkit-box;
    min-height: 3.2rem;
    overflow: hidden;
    color: #64748b;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-pill {
    color: #0f766e;
    background: #ccfbf1;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 28px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: var(--shadow);
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #0f766e, #164e63);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -46px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    font-size: 1.55rem;
    font-weight: 900;
}

.category-card p,
.category-card a {
    position: relative;
    z-index: 1;
}

.category-card p {
    margin: 14px 0 20px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.75;
}

.category-card a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 850;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 90px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #0f766e);
    font-size: 1.2rem;
    font-weight: 950;
}

.rank-thumb {
    width: 78px;
    height: 108px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
    margin-bottom: 8px;
    color: #111827;
    font-size: 1.2rem;
    font-weight: 900;
}

.rank-info p {
    color: #64748b;
    line-height: 1.7;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 74px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 85% 20%, rgba(45, 212, 191, 0.28), transparent 30%),
        linear-gradient(135deg, #0f766e, #1d4ed8 58%, #0f172a);
}

.page-hero h1,
.detail-hero h1 {
    max-width: 960px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.94rem;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #1f2937;
    outline: none;
    background: #ffffff;
}

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

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

.player-card,
.content-card,
.side-card {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(20, 184, 166, 0.28), transparent 34%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.20));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0d9488, #2563eb);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
    font-size: 2.1rem;
    transform: translateX(3px);
}

.player-overlay strong {
    font-size: 1.25rem;
    font-weight: 900;
}

.player-title-bar {
    padding: 20px 24px 24px;
}

.content-card,
.side-card {
    padding: 28px;
}

.content-card h2,
.side-card h2 {
    margin-bottom: 14px;
    color: #111827;
    font-size: 1.45rem;
    font-weight: 900;
}

.content-card p {
    margin-bottom: 18px;
    color: #475569;
    line-height: 1.95;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

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

.detail-meta {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.meta-pill {
    color: #0f766e;
    background: #f0fdfa;
}

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

.related-item {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 66px;
    height: 88px;
    border-radius: 14px;
    object-fit: cover;
}

.related-item h3 {
    margin-bottom: 6px;
    color: #111827;
    font-weight: 850;
    line-height: 1.4;
}

.related-item p {
    color: #64748b;
    font-size: 0.88rem;
}

.search-results-empty {
    padding: 52px;
    border-radius: 28px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.site-footer {
    margin-top: 64px;
    padding: 38px 0;
    color: rgba(255, 255, 255, 0.78);
    background: #0f172a;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .home-hero {
        min-height: 560px;
    }

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

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

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

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

    .rank-row .btn-soft {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .nav-shell {
        min-height: 64px;
    }

    .brand {
        font-size: 1.1rem;
    }

    .home-hero {
        min-height: 640px;
    }

    .hero-content {
        padding-top: 62px;
        padding-bottom: 92px;
    }

    .hero-title {
        font-size: 2.35rem;
    }

    .hero-copy {
        font-size: 1rem;
    }

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

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: 48px 70px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-thumb {
        width: 70px;
        height: 96px;
    }

    .content-card,
    .side-card {
        padding: 22px;
        border-radius: 22px;
    }
}
