/**
 * @file index_earth.css
 * @description 3D地球渲染容器、全息消融渐变背景与浮动数据卡片样式
 */

 .earth_track_container {
    position: relative;
    width: 100%;
    height: 5000px;
}

.earth_track_container .earth_container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* perspective: 1200px; */
    --bg-top: #EEEFF1;
    --bg-bottom: #EEEFF1;
    background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
}

.earth_track_container .earth_container::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #ECEBED;
    background-image: 
        radial-gradient(circle at 0% 0%, rgb(232, 56, 0) 0%, rgba(232, 56, 0, 0.55) 20%, rgba(235, 173, 158, 0) 55%),
        radial-gradient(circle at 100% 100%, rgb(232, 56, 0) 0%, rgba(232, 56, 0, 0.55) 0%, rgba(235, 173, 158, 0) 55%);
    background-repeat: no-repeat;
    opacity: var(--news-bg-opacity, 0);
    pointer-events: none;
    will-change: opacity;
}

.earth_track_container .earth_container .title {
    position: absolute;
    z-index: 1;
    top: 25%;
    font-weight: bold;
    font-size: 16vh;
    font-size: 16svh;
    color: #EF4123;
    line-height: 1;
    background: linear-gradient(0deg, rgba(238,239,241,0.98) 8%, rgba(232,56,13,0.69) 100%);
    opacity: 0.95;
    -webkit-background-clip: text;
    -webkit-text-fill-color: rgba(255, 255, 255, 0); 
}

.earth_track_container .earth_container #webgl_container {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#webgl_container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* 浮动 3D 数据卡片 */
.earth_container .float_card_item {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    width: 37vh;
    width: 37svh;
    height: auto;
    visibility: hidden;
    perspective: 1200px;
}

.earth_container .float_card_item .card_inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
}

.earth_container .float_card_item .card_front {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 6.8vh 2.1vw 2.5vh 2.1vw;
    padding: 6.8svh 2.1vw 2.5svh 2.1vw;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.7vw;
    box-shadow: 0px 0px 1vw #ddd;
    border: 1px solid #fff;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    /* 🌟 核心修复 1：使用 translate3d 强制独占 GPU 合成上下文 */
    transform: rotateY(0deg) translate3d(0, 0, 1px);
    -webkit-transform: rotateY(0deg) translate3d(0, 0, 1px);
    
    /* 🌟 核心修复 2：隔离层叠上下文，避免被外层高速平移撕裂 */
    isolation: isolate;
    
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.earth_container .float_card_item .card_back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0.7vw;
    background: linear-gradient(
        135deg, 
        #FFFFFF 0%, 
        #E1E4E9 22%, 
        #BFC5CE 46%, 
        #F1F3F6 54%, 
        #A8AFBA 76%, 
        #DCE0E6 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 
        inset 1px 1px 2px rgba(255, 255, 255, 0.9),
        inset -1px -1px 2px rgba(110, 116, 128, 0.4),
        0 1vw 2.5vw rgba(0, 0, 0, 0.12),
        0 0.2vw 0.5vw rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotateY(180deg) translateZ(1px);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    transition: 
        box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.4s ease;
}

.earth_container .float_card_item .card_back::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        115deg,
        transparent 35%,
        rgba(255, 255, 255, 0.15) 44%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0.25) 56%,
        transparent 65%
    );
    transform: translateX(-120%) rotate(0deg);
    transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 2;
}

.earth_container .float_card_item:hover .card_back {
    border-color: #FFFFFF;
    box-shadow: 
        inset 1px 1px 3px rgba(255, 255, 255, 1),
        inset -1px -1px 3px rgba(110, 116, 128, 0.55),
        0 1.5vw 3.5vw rgba(0, 0, 0, 0.22),
        0 0 1vw rgba(255, 255, 255, 0.5);
}

.earth_container .float_card_item:hover .card_back::before {
    transform: translateX(120%) rotate(0deg);
}

.earth_container .float_card_item .card_back .back_logo {
    position: relative;
    z-index: 3;
    font-size: 10vw;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    color: #484F5D;
    pointer-events: none;
    transition: 
        color 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        text-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.earth_container .float_card_item:hover .card_back .back_logo {
    color: #0A0C10;
    transform: scale(1.06);
}

.earth_container .float_card_item .p_1 {
    font-size: 1.25vw;
    color: #262626;
}

.earth_container .float_card_item .p_2 {
    color: #434343;
    font-weight: bold;
    font-size: 7vh;
    font-size: 7svh;
}

.earth_container .float_card_item .p_3 {
    font-size: 1.4vh;
    font-size: 1.4svh;
    color: #434343;
    margin-top: 9vh;
    margin-top: 9svh;
}

.earth_container .float_card_item .logo_text {
    color: #fff;
    font-size: 3vh;
    font-size: 3svh;
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1;
    margin-top: 4vh;
    margin-top: 4svh;
}

/* ========================================================
   📱 移动端响应式适配 (Max-Width: 996px)
======================================================== */
@media screen and (max-width: 996px) {
    .earth_track_container {
        height: 4200px; /* 适度缩短手势滚动行程 */
    }
    .earth_track_container .earth_container {
        height: 100vh;
        height: 100lvh;
    }
    /* 🌟 移动端大标题：分2行展示、字体显著变大、居中对齐 */
    .earth_track_container .earth_container .title {
        top: 15%;
        font-size: 20vw;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
        width: 100%;
        max-width: 100%;
    }

    /* 隐藏中间的点 · */
    .earth_track_container .earth_container .title .dot {
        display: none !important;
    }

    /* 两段文字各自独占一行（分2行） */
    .earth_track_container .earth_container .title .line {
        display: block;
    }

    .earth_container .float_card_item {
        width: 44vh;
        width: 44svh;
        /* max-width: 320px;
        min-width: 260px; */
    }
    .earth_container .float_card_item .card_front {
        background-color: rgba(255, 255, 255, 0.32);
        will-change: transform, backdrop-filter;
        padding: 9vh 3vh 3vh 3vh;
        padding: 9svh 3svh 3svh 3svh;
        border-radius: 2vh;
        border-radius: 2svh;
    }

    .earth_container .float_card_item .card_back {
        border-radius: 16px;
    }

    .earth_container .float_card_item .card_back .back_logo {
        font-size: 40vw;
    }

    .earth_container .float_card_item .p_1 {
        font-size: 2.9vh;
        font-size: 2.9svh;
    }

    .earth_container .float_card_item .p_2 {
        font-size: 8.5vh;
        font-size: 8.5svh;
        /* margin-top: 4px; */
    }

    .earth_container .float_card_item .p_3 {
        font-size: 1.95vh;
        font-size: 1.95svh;
        line-height: 1.6;
        margin-top: 7.8vh;
        margin-top: 7.8svh;
    }

    .earth_container .float_card_item .logo_text {
        font-size: 3.5vh;
        font-size: 3.5svh;
        margin-top: 7.3vh;
        margin-top: 7.3svh;
    }
}