:root {
    --page-bg: #f8fbff;
    --surface: #ffffff;
    --surface-soft: #eef7ff;
    --text: #102033;
    --muted: #637083;
    --primary: #2563eb;
    --primary-deep: #1d4ed8;
    --accent: #06b6d4;
    --accent-soft: #dff8ff;
    --line: #e4edf7;
    --shadow: 0 22px 55px rgba(37, 99, 235, 0.14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 2%, rgba(6, 182, 212, 0.15), transparent 28rem),
        radial-gradient(circle at 85% 8%, rgba(37, 99, 235, 0.13), transparent 26rem),
        var(--page-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    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;
    background: rgba(248, 251, 255, 0.88);
    border-bottom: 1px solid rgba(214, 230, 246, 0.85);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-link {
    color: #42526b;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary);
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 6px;
    width: 320px;
    padding: 14px;
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, 10px);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.dropdown-panel a {
    padding: 10px 12px;
    color: #40536c;
    border-radius: 12px;
}

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

.header-search,
.mobile-search,
.search-hero-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-hero-form input,
.inline-filter input,
.inline-filter select {
    min-width: 0;
    color: var(--text);
    background: #ffffff;
    border: 1px solid #d8e5f5;
    outline: none;
    border-radius: 999px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 16px;
}

.mobile-search input,
.search-hero-form input {
    flex: 1;
    padding: 13px 18px;
}

.inline-filter input,
.inline-filter select {
    padding: 12px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-hero-form input:focus,
.inline-filter input:focus,
.inline-filter select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.mobile-search button,
.search-hero-form button,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.secondary-button {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: none;
}

.menu-button {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    color: var(--primary);
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.mobile-panel {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.mobile-panel-inner {
    display: grid;
    gap: 16px;
    padding: 16px 0 20px;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    color: #40536c;
    font-weight: 700;
    background: var(--surface-soft);
    border-radius: 14px;
}

.mobile-nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.hero {
    position: relative;
    padding: 46px 0 36px;
    overflow: hidden;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border: 1px solid rgba(194, 219, 246, 0.92);
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(219, 239, 255, 0.92), rgba(255, 255, 255, 0.9));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 36px;
    align-items: center;
    padding: 54px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 span,
.page-hero h1 span {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p,
.page-hero p,
.detail-title p {
    max-width: 720px;
    margin: 0;
    color: #52627a;
    font-size: 17px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-poster-wrap {
    position: relative;
    isolation: isolate;
}

.hero-poster-glow {
    position: absolute;
    inset: 8% -6% -8% 8%;
    z-index: -1;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(6, 182, 212, 0.22));
    filter: blur(22px);
    border-radius: 34px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5.2;
    background: linear-gradient(145deg, #dbeafe, #e0f7ff);
    border: 12px solid rgba(255, 255, 255, 0.82);
    border-radius: 34px;
    box-shadow: 0 35px 80px rgba(37, 99, 235, 0.24);
}

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

.hero-poster-caption {
    position: absolute;
    right: 22px;
    bottom: 22px;
    left: 22px;
    padding: 14px 16px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.82));
    border-radius: 18px;
}

.hero-poster-caption strong,
.hero-poster-caption small {
    display: block;
}

.hero-dots {
    position: absolute;
    bottom: 26px;
    left: 54px;
    z-index: 4;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    cursor: pointer;
    background: rgba(37, 99, 235, 0.22);
    border: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 58px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section {
    padding: 36px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 640px;
    margin: 6px 0 0;
    color: var(--muted);
}

.section-heading a {
    color: var(--primary);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(215, 229, 246, 0.9);
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(18, 37, 63, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 22px 50px rgba(37, 99, 235, 0.17);
    transform: translateY(-5px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.12;
    background: linear-gradient(145deg, #dbeafe, #ecfeff);
}

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

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

.watch-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

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

.movie-card h3 a:hover {
    color: var(--primary);
}

.movie-brief {
    display: -webkit-box;
    min-height: 48px;
    margin: 9px 0 13px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    color: #386081;
    font-size: 12px;
    font-weight: 700;
    background: var(--surface-soft);
    border-radius: 999px;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(236, 249, 255, 0.94));
    border: 1px solid rgba(213, 230, 247, 0.94);
    border-radius: 26px;
    box-shadow: 0 14px 36px rgba(18, 37, 63, 0.08);
}

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

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.category-card a {
    color: var(--primary);
    font-weight: 800;
}

.page-hero {
    padding: 54px 0 24px;
}

.page-hero-card {
    padding: 38px;
    background: linear-gradient(135deg, rgba(219, 239, 255, 0.94), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(194, 219, 246, 0.92);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.inline-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 0;
}

.inline-filter input {
    flex: 1 1 260px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(215, 229, 246, 0.9);
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(37, 99, 235, 0.28);
    transform: translateX(4px);
}

.rank-number {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
}

.rank-dot {
    width: 10px;
    height: 10px;
    margin-left: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.aside-panel {
    padding: 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(215, 229, 246, 0.9);
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(18, 37, 63, 0.08);
}

.aside-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-page {
    padding: 34px 0 46px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.player-card,
.detail-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(215, 229, 246, 0.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #07111f;
}

.video-shell video {
    display: block;
    width: 100%;
    height: 100%;
    background: #07111f;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(7, 17, 31, 0.18), rgba(7, 17, 31, 0.78));
    border: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-round {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    padding-left: 5px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

.video-overlay strong {
    max-width: 80%;
    font-size: clamp(22px, 4vw, 38px);
    line-height: 1.2;
}

.detail-title {
    padding: 26px;
}

.detail-title h1 {
    margin-top: 0;
    font-size: clamp(30px, 4vw, 48px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.detail-card {
    padding: 24px;
}

.detail-card + .detail-card {
    margin-top: 18px;
}

.detail-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-card p {
    margin: 0;
    color: #47566d;
}

.detail-poster {
    overflow: hidden;
    background: linear-gradient(145deg, #dbeafe, #ecfeff);
    border-radius: 22px;
}

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

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

.search-panel {
    padding: 32px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(215, 229, 246, 0.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.search-results {
    margin-top: 24px;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed #c9daee;
    border-radius: 22px;
}

.site-footer {
    margin-top: 52px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #132c4d 55%, #0e7490);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 28px;
    padding: 44px 0 30px;
}

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

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
    color: #d7e0ee;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #d7e0ee;
}

.footer-bottom {
    padding: 18px 0 24px;
    color: #b7c7d8;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-slide,
    .detail-grid,
    .rank-layout {
        grid-template-columns: 1fr;
    }

    .hero-shell {
        min-height: 760px;
    }

    .hero-poster-wrap {
        max-width: 430px;
    }

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

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

    .nav-shell {
        min-height: 68px;
    }

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

    .hero {
        padding-top: 24px;
    }

    .hero-shell {
        min-height: 700px;
        border-radius: 26px;
    }

    .hero-slide {
        gap: 22px;
        padding: 26px;
    }

    .hero-dots {
        left: 26px;
        bottom: 18px;
    }

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

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

    .rank-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 2;
    }

    .page-hero-card,
    .search-panel {
        padding: 24px;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .hero-shell {
        min-height: 640px;
    }

    .hero-slide {
        padding: 20px;
    }

    .hero-actions,
    .search-hero-form {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-poster {
        border-width: 7px;
        border-radius: 24px;
    }
}
