* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 209, 220, 0.85), transparent 28%),
        radial-gradient(circle at 82% 5%, rgba(199, 179, 255, 0.72), transparent 30%),
        radial-gradient(circle at 90% 75%, rgba(179, 217, 255, 0.7), transparent 34%),
        linear-gradient(120deg, #fff7fb 0%, #f6edff 45%, #eef8ff 100%);
    background-attachment: fixed;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe);
    box-shadow: 0 12px 26px rgba(147, 51, 234, 0.28);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.text-gradient {
    color: transparent;
    background: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 600;
    color: #4b5563;
}

.nav-links a {
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #9333ea;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
}

.site-search {
    position: relative;
    width: min(330px, 28vw);
}

.site-search input,
.search-panel input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.74);
    padding: 11px 46px 11px 18px;
    color: #374151;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-search input:focus,
.search-panel input:focus {
    border-color: rgba(147, 51, 234, 0.45);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

.site-search button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, #9333ea, #db2777);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.64);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 45px rgba(79, 70, 229, 0.12);
}

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

.mobile-panel a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
    color: #4b5563;
}

.mobile-panel a:hover {
    color: #9333ea;
    background: rgba(147, 51, 234, 0.08);
}

.page-main {
    min-height: calc(100vh - 72px);
}

.glass-effect {
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(79, 70, 229, 0.08);
}

.nebula-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.marshmallow-gradient {
    background: linear-gradient(120deg, #ffd1dc, #ffb6c1, #e6b3ff, #c7b3ff, #b3d9ff);
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: min(720px, 72vh);
    color: #ffffff;
    background: #111827;
}

.hero-slide {
    display: none;
    position: relative;
    min-height: min(720px, 72vh);
}

.hero-slide.active {
    display: block;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(12px) brightness(0.68);
    transform: scale(1.1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08) 45%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: end;
    gap: 48px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: min(720px, 72vh);
    padding: 110px 0 70px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fde68a;
    font-size: 18px;
    font-weight: 800;
}

.hero-title {
    max-width: 840px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 780px;
    margin: 0 0 24px;
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 30px;
}

.hero-meta span,
.detail-meta span,
.tag-list span,
.card-meta span,
.rank-meta span,
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
}

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

.primary-button,
.secondary-button,
.simple-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe);
    box-shadow: 0 18px 36px rgba(147, 51, 234, 0.35);
}

.secondary-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.simple-button {
    color: #9333ea;
    background: rgba(255, 255, 255, 0.8);
}

.primary-button:hover,
.secondary-button:hover,
.simple-button:hover {
    transform: translateY(-2px) scale(1.02);
    opacity: 0.94;
}

.hero-poster {
    overflow: hidden;
    align-self: center;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    background: rgba(255, 255, 255, 0.12);
}

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

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.44);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

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

.section {
    padding: 64px 0 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    color: #1f2937;
}

.section-subtitle {
    margin: 8px 0 0;
    color: #6b7280;
    line-height: 1.7;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 25px 55px rgba(79, 70, 229, 0.16);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.2);
}

.movie-grid.compact .poster-wrap,
.poster-tall .poster-wrap {
    aspect-ratio: 3 / 4;
}

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

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

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 40px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.34);
    transition: opacity 0.2s ease;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, #9333ea, #db2777);
}

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

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
    color: #111827;
}

.card-desc {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.65;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: #6b7280;
}

.card-meta span {
    background: rgba(243, 232, 255, 0.8);
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 26px;
    min-height: 170px;
    color: #1f2937;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(79, 70, 229, 0.16);
}

.category-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 26px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe);
}

.category-title {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-desc {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 120px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(79, 70, 229, 0.14);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #9333ea, #db2777);
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.24);
}

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

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-content p {
    margin: 0 0 10px;
    color: #6b7280;
    line-height: 1.65;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
}

.rank-meta span {
    background: rgba(255, 255, 255, 0.64);
}

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

.page-hero-card {
    overflow: hidden;
    border-radius: 34px;
    padding: clamp(28px, 5vw, 58px);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: #6b7280;
    font-size: 18px;
    line-height: 1.75;
}

.search-panel,
.filter-panel {
    display: grid;
    gap: 18px;
    margin: 24px 0 28px;
    border-radius: 26px;
    padding: 22px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.78);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-button:hover {
    transform: translateY(-2px);
}

.filter-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
}

.hidden-by-search {
    display: none !important;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 34px 0 20px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: #9333ea;
    font-weight: 700;
}

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

.player-card,
.detail-side,
.detail-text-card {
    overflow: hidden;
    border-radius: 28px;
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.24));
}

.play-overlay.is-hidden {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 38px;
    background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
    box-shadow: 0 20px 50px rgba(219, 39, 119, 0.35);
}

.play-overlay strong {
    font-size: 22px;
}

.detail-main-title {
    margin: 22px 0 12px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.12;
}

.detail-lead {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span,
.tag-list span {
    color: #5b21b6;
    background: rgba(243, 232, 255, 0.84);
}

.detail-text-card {
    margin-top: 24px;
    padding: 28px;
}

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

.detail-text-card p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.9;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.22);
}

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

.detail-side {
    padding: 18px;
}

.side-title {
    margin: 0 0 16px;
    font-size: 20px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    transition: transform 0.2s ease, background 0.2s ease;
}

.side-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.86);
}

.side-link img {
    width: 82px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.side-link strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
}

.side-link span {
    color: #6b7280;
    font-size: 13px;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 30px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
}

.footer-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p,
.footer-inner li {
    color: #6b7280;
    line-height: 1.8;
}

.footer-inner h3 {
    margin: 0 0 14px;
    color: #1f2937;
}

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

.footer-inner a:hover {
    color: #9333ea;
}

@media (max-width: 1120px) {
    .site-search,
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-poster {
        display: none;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .logo-text {
        font-size: 21px;
    }

    .hero-carousel,
    .hero-slide,
    .hero-inner {
        min-height: 72vh;
    }

    .hero-inner {
        padding: 92px 0 74px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .section {
        padding-top: 46px;
    }

    .section-header {
        display: block;
    }

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

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

    .rank-number {
        width: 38px;
        height: 38px;
    }

    .card-body {
        padding: 13px;
    }

    .detail-text-card {
        padding: 22px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .primary-button,
    .secondary-button,
    .simple-button {
        width: 100%;
    }
}
