/* world.html 引用块（{{template "world" .}}）样式
   作为块级片段被 index.html 等页面引用，因此不使用 *、body 之类的全局规则，
   全部限定在 .world-wrap 内部，避免污染宿主页面样式。 */

.world-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    /* 与原独立页面 700 × 650 的比例保持一致 */
    aspect-ratio: 700 / 650;
    /* 宿主容器有固定高度时（如首页 hero 的 .img1-right）以容器高度为准，
       lottie 生成的 SVG 会按自身比例居中缩放，不会变形 */
    max-height: 100%;
    margin: 0 auto;
}

/* 不支持 aspect-ratio 的浏览器回退到固定高度 */
@supports not (aspect-ratio: 1 / 1) {
    .world-wrap {
        height: 480px;
    }
}

.world-globe {
    width: 100%;
    height: 100%;
    color: #87bbff;
}

.world-globe svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* 品牌文字：在地球右上侧循环淡入淡出 */
.world-brand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(30%, -90%);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(20px, 2.4vw, 42px);
    font-weight: 600;
    font-style: italic;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(100, 180, 255, 0.8), 0 0 40px rgba(100, 180, 255, 0.4);
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    animation: worldBrandCycle 4s ease-in-out infinite;
}

@keyframes worldBrandCycle {

    0%,
    100% {
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    65% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .world-wrap {
        max-width: 320px;
    }
}

/* 降低动效偏好：停止闪烁，文字常态可见 */
@media (prefers-reduced-motion: reduce) {
    .world-brand {
        animation: none;
        opacity: 1;
    }
}
