* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #fafafa;
    color: #27272a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e4e4e7;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

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

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #27272a;
}

.brand-icon,
.footer-brand span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f58b1f, #ea5e21);
    box-shadow: 0 12px 30px rgba(245, 139, 31, 0.3);
}

.brand-text {
    font-size: 22px;
    transition: color 0.2s ease;
}

.brand:hover .brand-text,
.nav-link:hover,
.mobile-link:hover {
    color: #e6751a;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    color: #3f3f46;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link.active,
.mobile-link.active {
    color: #f58b1f;
}

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

.nav-search input,
.mobile-search input,
.filter-input {
    border: 1px solid #d4d4d8;
    border-radius: 999px;
    background: #ffffff;
    color: #27272a;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 230px;
    padding: 9px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
    border-color: #f58b1f;
    box-shadow: 0 0 0 4px rgba(251, 207, 139, 0.65);
}

.nav-search button,
.mobile-search button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button,
.primary-button {
    background: #f58b1f;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(245, 139, 31, 0.28);
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-button:hover {
    background: #e6751a;
    transform: translateY(-1px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #3f3f46;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-panel {
    border-top: 1px solid #e4e4e7;
    padding: 16px;
    background: #ffffff;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-link {
    display: block;
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 9px 14px;
}

.hero {
    position: relative;
    min-height: 600px;
    padding: 50px 0;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 15%, rgba(245, 139, 31, 0.18), transparent 35%), linear-gradient(135deg, #f0f9f4 0%, #fef3e2 100%);
}

.hero-stage {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    height: 500px;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(39, 39, 42, 0.2);
}

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

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

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

.hero-slide.active img {
    transform: scale(1.08);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.4) 48%, rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 80px);
    bottom: clamp(28px, 7vw, 72px);
    width: min(620px, calc(100% - 48px));
    color: #ffffff;
}

.hero-kicker,
.duration,
.rank-badge,
.side-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: #f58b1f;
    font-size: 12px;
    font-weight: 800;
}

.hero-kicker {
    padding: 6px 14px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 17px;
}

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

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

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

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

main {
    min-height: 60vh;
}

.section-block,
.page-block {
    padding: 56px 0;
}

.section-title,
.page-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.section-title h2,
.page-title h1,
.page-heading h1 {
    margin: 0;
    color: #27272a;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
}

.section-title a,
.back-link {
    color: #e6751a;
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.movie-poster img,
.category-tile img,
.side-thumb img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.side-item:hover .side-thumb img {
    transform: scale(1.06);
}

.duration {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f58b1f, #ea5e21);
}

.movie-info {
    padding: 18px;
}

.movie-info h2 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #27272a;
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info h2 a:hover {
    color: #e6751a;
}

.movie-info p {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #52525b;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #71717a;
    font-size: 13px;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span,
.chip,
.filter-chip {
    display: inline-flex;
    border-radius: 999px;
    background: #fef3e2;
    color: #c05e17;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.category-panel {
    border-radius: 28px;
    padding: 32px;
    background: linear-gradient(135deg, #f0f9f4, #fef3e2);
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.category-tile img {
    position: absolute;
    inset: 0;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    color: #ffffff;
}

.category-tile strong {
    bottom: 62px;
    font-size: 20px;
}

.category-tile em {
    bottom: 18px;
    color: #e5e7eb;
    font-size: 13px;
    font-style: normal;
}

.content-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 32px;
}

.side-card,
.content-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.side-card {
    padding: 24px;
}

.side-card h2,
.content-card h2,
.sticky-card h2 {
    margin: 0 0 18px;
    color: #27272a;
    font-size: 22px;
}

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

.side-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.side-item:hover {
    background: #fafafa;
}

.side-thumb {
    position: relative;
    height: 74px;
    overflow: hidden;
    border-radius: 12px;
    background: #e4e4e7;
}

.side-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    background: rgba(245, 139, 31, 0.95);
}

.side-text strong {
    display: -webkit-box;
    overflow: hidden;
    color: #27272a;
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-text em {
    display: block;
    margin-top: 6px;
    color: #71717a;
    font-size: 12px;
    font-style: normal;
}

.gradient-head {
    padding: 70px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #f58b1f, #ea5e21);
}

.gradient-head.secondary {
    background: linear-gradient(135deg, #3a9d6c, #f58b1f);
}

.page-heading h1 {
    color: #ffffff;
}

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.filter-input {
    min-width: min(360px, 100%);
    padding: 12px 18px;
}

.filter-chip {
    border: 0;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: #f58b1f;
}

.detail-hero {
    padding: 32px 0 64px;
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 32px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

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

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: pointer;
    background: #000000;
}

.player-cover[hidden] {
    display: none;
}

.player-cover img {
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.play-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 139, 31, 0.92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
}

.play-ring span {
    margin-left: 5px;
    font-size: 34px;
}

.content-card {
    padding: 26px;
}

.detail-copy h1 {
    margin: 0 0 16px;
    color: #27272a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.detail-copy h2 {
    margin-top: 26px;
}

.detail-copy p {
    color: #3f3f46;
    font-size: 16px;
}

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

.detail-meta span {
    border-radius: 999px;
    background: #f4f4f5;
    color: #52525b;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.lead-text {
    color: #27272a;
    font-size: 18px;
    font-weight: 700;
}

.sticky-card {
    position: sticky;
    top: 88px;
}

.search-empty {
    display: none;
    padding: 48px;
    border-radius: 22px;
    text-align: center;
    color: #71717a;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.search-empty.active {
    display: block;
}

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

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

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

    .sticky-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 520px;
        padding: 28px 0;
    }

    .hero-stage {
        height: 460px;
        border-radius: 22px;
    }

    .hero-mask {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.2));
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 46px;
        width: auto;
    }

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

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

    .section-title,
    .page-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .page-shell,
    .footer-shell {
        width: min(100% - 22px, 1280px);
    }

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

    .hero-stage {
        width: calc(100% - 22px);
        height: 430px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .hero p {
        font-size: 15px;
    }

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

    .category-panel,
    .content-card,
    .side-card {
        padding: 20px;
        border-radius: 18px;
    }

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

    .play-ring {
        width: 66px;
        height: 66px;
    }
}

.hero-slide a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.site-footer {
    margin-top: 0;
    color: #d4d4d8;
    background: #27272a;
}

.footer-shell {
    padding: 48px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 420px;
    margin: 0;
    color: #a1a1aa;
    font-size: 14px;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: #d4d4d8;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #f7a027;
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid #3f3f46;
    color: #a1a1aa;
    text-align: center;
    font-size: 13px;
}

.section-title p {
    max-width: 680px;
    margin: 8px 0 0;
    color: #71717a;
}

@media (max-width: 820px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
