:root {
    --bg: #f6f8fb;
    --text: #172033;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --teal: #0f766e;
    --cyan: #0891b2;
    --amber: #f59e0b;
    --rose: #e11d48;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(8, 145, 178, 0.28);
}

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

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #7f1d1d;
    background: #fcd34d;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(252, 211, 77, 0.38);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: rotate(12deg) scale(1.05);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.main-nav a,
.nav-dropdown button {
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-weight: 650;
    padding: 8px 0;
}

.main-nav a:hover,
.main-nav a.is-active,
.nav-dropdown button:hover {
    color: #fde68a;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 190px;
    padding: 10px;
    background: #ffffff;
    color: #334155;
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

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

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

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

.top-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 10px 8px 14px;
}

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

.top-search button,
.mobile-menu button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: var(--teal);
    background: #ffffff;
    font-weight: 800;
    padding: 8px 14px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    font-weight: 700;
}

.mobile-menu form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 8px;
}

.mobile-menu input {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    outline: 0;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    background: linear-gradient(135deg, #0f766e 0%, #0891b2 42%, #e11d48 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.85s ease;
}

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at 70% 28%, rgba(251, 191, 36, 0.24), transparent 30%), linear-gradient(90deg, rgba(6, 78, 59, 0.92), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.28));
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    align-items: center;
    min-height: 600px;
    padding: 70px 0;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-weight: 750;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 650px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2.3vw, 24px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    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: var(--rose);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
    background: #fff1f2;
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 600px;
    margin-top: 34px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    backdrop-filter: blur(14px);
}

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

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.48);
}

.hero-dots button.is-active {
    width: 34px;
    border-radius: 999px;
    background: #ffffff;
}

.section {
    padding: 54px 0;
}

.section.alt {
    background: #ffffff;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(225, 29, 72, 0.4);
}

.card-body {
    padding: 16px;
}

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

.card-title {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-title a:hover {
    color: var(--teal);
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 8px;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #db2777, #f59e0b);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.category-card h3 {
    position: relative;
    margin: 0 0 8px;
    font-size: 24px;
}

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

.category-card span {
    position: relative;
    display: inline-flex;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-weight: 800;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -46px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 54px 64px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ranking-item:hover {
    border-color: #99f6e4;
    transform: translateY(-2px);
}

.rank-num {
    color: var(--rose);
    font-size: 22px;
    font-weight: 900;
}

.ranking-item img {
    width: 64px;
    height: 84px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-title {
    font-weight: 850;
}

.ranking-meta {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    padding: 76px 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 14px;
    outline: 0;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.movie-detail-hero {
    padding: 42px 0 50px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #0f766e 58%, #e11d48);
}

.breadcrumb {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.detail-cover img {
    height: 100%;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

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

.detail-meta span {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.detail-copy p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.player-section {
    padding-top: 44px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #020617;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(2, 6, 23, 0.76));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-trigger {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 34px;
    box-shadow: 0 20px 48px rgba(225, 29, 72, 0.42);
}

.content-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.content-card p {
    margin: 0;
    color: #334155;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
    margin-top: 26px;
}

.side-card {
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
}

.side-card h2 {
    margin: 0 0 14px;
}

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

.related-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
}

.related-list a:hover {
    background: #f1f5f9;
}

.related-list img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.related-list strong {
    display: block;
}

.related-list span {
    color: var(--muted);
    font-size: 13px;
}

.result-summary {
    margin: 0 0 22px;
    color: var(--muted);
}

.empty-state {
    padding: 36px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    text-align: center;
}

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

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

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

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.site-footer a {
    display: block;
    margin: 8px 0;
}

.site-footer a:hover {
    color: #fcd34d;
}

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

@media (max-width: 1024px) {
    .main-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

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

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

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

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

    .hero-content {
        padding: 50px 0 76px;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .hero-search button {
        width: 100%;
    }

    .section-head {
        display: block;
    }

    .section-link {
        display: inline-block;
        margin-top: 10px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 16px;
    }

    .category-grid,
    .ranking-panel,
    .filter-bar,
    .detail-layout,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 42px 56px 1fr;
    }

    .ranking-meta {
        display: none;
    }

    .detail-cover {
        max-width: 260px;
    }

    .content-card {
        padding: 22px;
    }
}
