:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --teal: #0d9488;
    --slate: #0f172a;
    --shadow: 0 18px 48px 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", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

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

.brand-text {
    font-size: 21px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #334155;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a,
.footer-grid a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-grid a:hover {
    color: var(--emerald-dark);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    padding: 8px 16px 18px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.mobile-nav a {
    display: block;
    padding: 11px 0;
    color: #334155;
    font-weight: 650;
}

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

.hero {
    position: relative;
    height: min(72vh, 640px);
    min-height: 520px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.45), transparent 30%), #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #064e3b, #0f172a 55%, #115e59);
    transform: scale(1.02);
}

.image-hidden {
    opacity: 0;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 45%, rgba(2, 6, 23, 0.15) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 45%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 56px;
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker,
.section-kicker,
.page-hero span,
.search-card span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #34d399;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero-site-name {
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(19px, 3vw, 30px);
    font-weight: 800;
}

.hero h2 {
    max-width: 780px;
    margin: 0 0 14px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta span,
.detail-meta span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

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

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

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.section-more {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 30px;
    background: var(--emerald);
}

.home-search {
    margin-top: -54px;
    position: relative;
    z-index: 5;
}

.search-card,
.search-panel,
.text-panel {
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.search-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
    align-items: center;
    padding: 26px;
}

.search-card h2,
.section-heading h2,
.page-hero h1,
.text-panel h2 {
    margin: 0;
    color: var(--text);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-card h2 {
    font-size: clamp(24px, 3vw, 36px);
}

.search-card p,
.section-heading p,
.page-hero p,
.card-body p,
.rank-info p,
.text-panel p,
.watch-info p,
.footer-grid p,
.compact-card p {
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.chip-row a {
    padding: 10px 14px;
    border: 1px solid #d1fae5;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-weight: 750;
}

.content-section {
    padding: 46px 0;
}

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading p {
    margin: 6px 0 0;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.poster-frame,
.compact-poster,
.rank-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #0f172a);
}

.poster-frame {
    aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-image,
.rank-item:hover .poster-image,
.compact-card:hover .poster-image {
    transform: scale(1.08);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent);
}

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

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

.poster-year {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.92);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.card-title:hover,
.rank-info a:hover,
.compact-card a:hover {
    color: var(--emerald-dark);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
}

.card-meta span + span::before {
    content: "•";
    margin-right: 7px;
}

.card-body p {
    display: -webkit-box;
    min-height: 40px;
    margin: 8px 0 0;
    overflow: hidden;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

.rank-poster {
    width: 96px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

.rank-info a {
    display: block;
    font-weight: 850;
}

.rank-info p {
    display: -webkit-box;
    margin: 4px 0;
    overflow: hidden;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.page-hero {
    padding: 72px 0 58px;
    background: radial-gradient(circle at 12% 20%, rgba(16, 185, 129, 0.20), transparent 28%), linear-gradient(135deg, #ffffff, #ecfdf5);
}

.page-hero-dark {
    color: #ffffff;
    background: radial-gradient(circle at 82% 0%, rgba(20, 184, 166, 0.45), transparent 32%), linear-gradient(135deg, #020617, #0f172a);
}

.page-hero-dark h1,
.page-hero-dark p {
    color: #ffffff;
}

.page-hero h1 {
    max-width: 760px;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.08;
}

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

.search-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px;
}

.search-label {
    color: var(--text);
    font-weight: 850;
}

.search-panel input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--text);
    background: #f8fafc;
    outline: none;
}

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

.search-panel p {
    margin: 0;
    color: #ef4444;
    font-weight: 700;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.pagination a,
.pagination strong,
.pagination span {
    min-width: 42px;
    padding: 9px 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 800;
}

.pagination a {
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.pagination a:hover,
.pagination strong {
    color: #ffffff;
    border-color: var(--emerald);
    background: var(--emerald);
}

.watch-section {
    padding: 38px 0;
    color: #ffffff;
    background: radial-gradient(circle at 85% 16%, rgba(16, 185, 129, 0.28), transparent 30%), linear-gradient(135deg, #020617, #0f172a);
}

.watch-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    aspect-ratio: 16 / 9;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.28), rgba(2, 6, 23, 0.78));
    transition: opacity 0.2s ease;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.35);
}

.play-cover strong {
    font-size: 20px;
}

.player-shell.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

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

.breadcrumb a:hover {
    color: #34d399;
}

.watch-info h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.watch-info p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 38px 0 8px;
}

.text-panel {
    padding: 26px;
}

.text-panel h2 {
    font-size: 26px;
}

.text-panel p {
    margin: 12px 0 0;
    font-size: 16px;
}

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

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

.compact-poster {
    width: 82px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.compact-card a {
    font-weight: 850;
}

.compact-card p {
    margin: 4px 0 0;
    font-size: 13px;
}

.site-footer {
    margin-top: 46px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

.footer-grid p {
    max-width: 520px;
    margin: 14px 0 0;
    color: #94a3b8;
}

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

.footer-grid li + li {
    margin-top: 8px;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: 560px;
        height: 76vh;
    }

    .hero-content {
        bottom: 82px;
    }

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 38px;
    }

    .search-card,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .chip-row {
        justify-content: flex-start;
    }

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

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

    .rank-grid,
    .rank-grid-wide {
        grid-template-columns: 1fr;
    }

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

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

    .brand-text {
        font-size: 18px;
    }

    .hero h2 {
        font-size: 38px;
    }

    .hero-actions a {
        width: 100%;
    }

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

    .card-body {
        padding: 12px;
    }

    .rank-item {
        grid-template-columns: 34px 82px 1fr;
        gap: 10px;
    }

    .rank-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .rank-poster {
        width: 82px;
    }

    .watch-section {
        padding: 20px 0 30px;
    }

    .player-shell {
        border-radius: 16px;
    }

    .play-cover span {
        width: 66px;
        height: 66px;
    }
}
