:root {
    --bg: #000212;
    --text: #ffffff;
    --text-63: rgba(255, 255, 255, 0.63);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100vw;
}

body.news-detail-body {
    margin: 0;
    font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* ============================================
   滚动渐入动画效果（参考首页）
   ============================================ */

/* 基础动画类：初始隐藏状态 */
.scroll-animate-up {
    opacity: 0;
    transform: translateY(200px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 300ms;
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-220px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 400ms;
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(220px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 800ms;
}

/* 激活状态：显示并移除偏移 */
.scroll-animate-up.visible,
.scroll-animate-left.visible,
.scroll-animate-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* ================================
   首页同款：星空 / 流星背景
   ================================ */
.background-visuals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    max-width: 100vw;
}

#meteorCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.background-visuals .gradient-1 {
    position: absolute;
    width: 1142px;
    height: 1142px;
    left: -300px;
    top: -300px;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(10, 130, 255, 0.15) 0%, rgba(168, 55, 255, 0) 100%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.background-visuals .gradient-2 {
    position: absolute;
    width: 1142px;
    height: 1142px;
    right: -400px;
    top: 200px;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(168, 55, 255, 0.1) 0%, rgba(168, 55, 255, 0) 100%);
    animation: float 25s ease-in-out infinite;
    animation-delay: 5s;
    pointer-events: none;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(20px, -20px) rotate(180deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* ================================
   页面结构 / Figma 版式
   ================================ */
.news-detail-main {
    position: relative;
    padding-top: min(115px,calc(115/1414*100vw)); /* 与首页 header 顶部留白一致 */
}

/* Banner 本身在最上层 */
.news-detail-banner {
    position: relative;
    z-index: 2;
}

/* Banner 下方主体区域：装饰层在底，正文在上 */
.news-detail-after-banner {
    position: relative;
    z-index: 1;
}

.news-detail-content {
    position: relative;
    z-index: 2;
}



.news-detail-banner {
    position: relative;
    /*width: 100%;*/
    overflow: hidden;
    width: min(1414px,calc(1414/1414*100vw));
    margin: 0 auto;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Figma 装饰图层（6.png / 7.png）
   说明：设计稿里装饰图是在正文区域周围出现，不是叠在 Banner 上。 */
.news-detail-decos {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.detail-deco {
    position: absolute;
    width: min(320.3px, 40vw);
    height: auto;
    pointer-events: none;
}

/* 7.png：靠近正文区域左上 */
.detail-deco-left {
    left: clamp(0px, 3.8vw, 54px);

    /* Figma：约在 Banner 底部下方 31px 开始出现 */
    top: 31px;
}


/* 6.png：靠近正文区域右下（用 bottom 锚定，适配动态正文高度） */
.detail-deco-right {
    right: clamp(0px, 3.8vw, 54px);
    bottom: 220px;
}


.news-detail-content {
    max-width: 798px;
    margin: 74px auto 0;
    padding: 0 16px 20px;
}

.news-title {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
    /* Figma: background-clip: text（只有文字本身，无背景块） */
    background: #ffffff;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-family: "PingFang SC Semibold";
}

.news-date {
    margin-top: 17px;
    font-size: 16px;
    font-weight: 400;
    text-align: center;

    background: #ffffff;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-family: "PingFang SC Medium";
}


.news-content {
    margin-top: 54px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    word-break: break-word;
    font-family: "PingFang SC Regular";
}

.news-content p {
    margin: 0 0 16px;
    text-indent: 2em;
}

.news-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px auto;
}

.news-content a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 768px) {
    .news-detail-main {
        padding-top: 72px;
    }

    .news-detail-content {
        margin-top: 24px;
        padding-bottom: 72px;
    }

    .detail-deco {
        width: min(220px, 46vw);
        opacity: 0.9;
    }

    .detail-deco-left {
        top: 320px;
    }

    .detail-deco-right {
        bottom: 140px;
    }
}


@media (max-width: 430px) {
    .news-title {
        font-size: 18px;
    }

    .news-date {
        font-size: 15px;
    }
}
