:root {
    --orange: #f97316;
    --pink: #ec4899;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --green: #22c55e;
    --red: #ef4444;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: #e5e7eb;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 45%, #eff6ff 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.12);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand {
    font-size: clamp(20px, 2vw, 28px);
    background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-icon,
.footer-brand span {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fdba74, #f472b6);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.22);
}

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

.nav-link {
    font-weight: 700;
    color: #374151;
    transition: color 0.25s ease;
}

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

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

.header-search input,
.mobile-search input,
.search-controls input,
.search-controls select,
.filter-bar input,
.filter-bar select {
    border: 1px solid #fed7aa;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    color: #374151;
}

.header-search input {
    width: 180px;
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #374151;
}

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

.mobile-links {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

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

.hero-carousel {
    margin-bottom: 38px;
}

.hero-frame {
    position: relative;
    height: clamp(420px, 55vw, 560px);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: clamp(28px, 5vw, 58px);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.12) 100%);
}

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

.hero-label {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: #fde68a;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-copy p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
}

.hero-tags,
.detail-tags,
.tag-row,
.detail-meta,
.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
}

.hero-actions,
.detail-actions {
    margin-top: 24px;
}

.primary-btn,
.ghost-btn,
.section-more,
.quick-cats a,
.category-card > span:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    padding: 13px 26px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 15px 28px rgba(236, 72, 153, 0.26);
}

.ghost-btn {
    padding: 12px 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.quick-cats a:hover,
.category-card:hover > span:last-child {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.hero-prev,
.hero-next {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
}

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

.quick-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 44px;
}

.quick-cats a {
    padding: 12px 20px;
    color: #ea580c;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #fed7aa;
}

.content-section,
.category-feature,
.rank-panel,
.detail-card,
.player-card,
.side-related,
.side-poster,
.search-panel,
.ranking-page-list {
    margin-bottom: 44px;
}

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

.section-head h2,
.rank-title h2,
.ranking-page-list h2,
.side-related h2,
.detail-card h2 {
    margin: 0;
    font-weight: 900;
    color: #1f2937;
}

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

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

.section-more {
    padding: 10px 18px;
    color: #ea580c;
    background: #ffffff;
    border: 1px solid #fed7aa;
    white-space: nowrap;
}

.section-more.full {
    width: 100%;
    margin-top: 20px;
}

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

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 42px rgba(249, 115, 22, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5));
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.movie-info strong {
    color: #1f2937;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info em {
    min-height: 42px;
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    color: #6b7280;
    font-size: 13px;
}

.tag-row span {
    color: #ea580c;
    background: #ffedd5;
}

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

.rank-panel,
.side-related,
.side-poster,
.search-panel,
.ranking-page-list {
    border-radius: 24px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    position: sticky;
    top: 96px;
}

.rank-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.compact-card:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.compact-card img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.compact-card span:last-child {
    min-width: 0;
}

.compact-card strong,
.compact-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card strong {
    font-size: 14px;
    color: #1f2937;
}

.compact-card em {
    margin-top: 4px;
    font-style: normal;
    font-size: 12px;
    color: #6b7280;
}

.rank-number {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.category-feature,
.page-hero {
    border-radius: 32px;
    padding: clamp(26px, 5vw, 48px);
    box-shadow: var(--shadow);
}

.category-feature {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(252, 231, 243, 0.95));
}

.page-hero {
    margin-bottom: 32px;
    background: linear-gradient(135deg, #fb923c, #ec4899, #60a5fa);
    color: #ffffff;
}

.soft-hero {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.94), rgba(236, 72, 153, 0.92), rgba(96, 165, 250, 0.9));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
}

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

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

.category-card {
    display: grid;
    gap: 14px;
    min-height: 270px;
    overflow: hidden;
    border-radius: 28px;
    padding: 22px;
    color: #ffffff;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #fb923c, #ec4899);
}

.category-card strong {
    font-size: 28px;
    font-weight: 900;
}

.category-card em {
    max-width: 620px;
    font-style: normal;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.category-card > span:last-child {
    justify-self: start;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

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

.category-thumbs img {
    height: 80px;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.55);
}

.tone-pink { background: linear-gradient(135deg, #f472b6, #fb7185); }
.tone-blue { background: linear-gradient(135deg, #60a5fa, #22d3ee); }
.tone-purple { background: linear-gradient(135deg, #a78bfa, #f472b6); }
.tone-green { background: linear-gradient(135deg, #4ade80, #2dd4bf); }
.tone-red { background: linear-gradient(135deg, #fb7185, #f97316); }
.tone-rose { background: linear-gradient(135deg, #fb7185, #f0abfc); }
.tone-cyan { background: linear-gradient(135deg, #22d3ee, #818cf8); }
.tone-yellow { background: linear-gradient(135deg, #facc15, #fb923c); }
.tone-gray { background: linear-gradient(135deg, #64748b, #94a3b8); }

.filter-bar,
.search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.search-controls input {
    flex: 1 1 280px;
}

.search-controls select,
.filter-bar select,
.filter-bar input {
    min-width: 180px;
}

.card-hidden {
    display: none !important;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

.crumbs a {
    color: #ea580c;
    font-weight: 700;
}

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

.detail-main {
    min-width: 0;
}

.player-card {
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--orange);
    font-size: 42px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

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

.detail-card,
.side-related,
.side-poster {
    border-radius: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-card h1 {
    margin: 18px 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.16;
}

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

.detail-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.9;
    font-size: 16px;
}

.detail-tags .main-badge {
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.detail-tags span {
    color: #6b7280;
    background: #f3f4f6;
}

.detail-meta span {
    color: #6b7280;
    border-radius: 999px;
    padding: 7px 12px;
    background: #f9fafb;
}

.detail-card .ghost-btn {
    color: #ea580c;
    background: #fff7ed;
    border-color: #fed7aa;
}

.review-box {
    margin-top: 28px;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.side-poster {
    text-align: center;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    background: #111827;
}

.side-poster strong {
    display: block;
    margin-top: 14px;
    font-size: 20px;
    font-weight: 900;
}

.side-poster span {
    display: inline-flex;
    margin-top: 8px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #ea580c;
    background: #ffedd5;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 22px;
}

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

.site-footer {
    margin-top: 70px;
    background: linear-gradient(90deg, #ffedd5, #fce7f3, #dbeafe);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: #4b5563;
    line-height: 1.7;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(249, 115, 22, 0.22);
    color: #6b7280;
    font-size: 14px;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .cards-grid,
    .two-grid,
    .three-grid,
    .compact-grid,
    .category-grid,
    .rank-list-large,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

    .hero-prev,
    .hero-next {
        display: none;
    }

    .hero-frame {
        border-radius: 24px;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .footer-grid {
        gap: 22px;
    }
}

@media (max-width: 520px) {
    .page-shell,
    .nav-wrap,
    .mobile-panel,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 20px, 1280px);
    }

    .hero-frame {
        height: 500px;
    }

    .hero-overlay {
        padding: 22px;
    }

    .hero-tags span,
    .detail-tags span,
    .tag-row span {
        font-size: 12px;
    }

    .compact-card {
        grid-template-columns: auto 64px minmax(0, 1fr);
    }

    .compact-card img {
        width: 64px;
        height: 44px;
    }

    .player-overlay span {
        width: 76px;
        height: 76px;
        font-size: 34px;
    }
}
