/* ============================================================
 * 虚拟世界入口 —— 顶部横幅 + 炫酷渐变按钮
 * 独立文件（不污染 site.css），中英文站共用
 * 动效全部走 CSS 变量 + transform，避免布局抖动
 * ============================================================ */

:root {
    --vw-c1: #22d3ee;   /* 青 */
    --vw-c2: #6366f1;   /* 靛 */
    --vw-c3: #a855f7;   /* 紫 */
    --vw-c4: #f43f5e;   /* 玫红 */
    --vw-grad: linear-gradient(100deg, var(--vw-c1), var(--vw-c2) 30%, var(--vw-c3) 62%, var(--vw-c4) 100%);
}

/* ---------------- 顶部横幅 ---------------- */
.vw-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background:
        linear-gradient(115deg, rgba(34, 211, 238, .10), rgba(168, 85, 247, .10) 45%, rgba(244, 63, 94, .10)),
        rgba(255, 255, 255, .02);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
    overflow: hidden;
    animation: vw-drop .7s cubic-bezier(.2, .9, .2, 1) both;
}

/* 横幅底部流动光线 */
.vw-bar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--vw-c1), var(--vw-c3), var(--vw-c4), transparent);
    background-size: 220% 100%;
    animation: vw-run 6s linear infinite;
    opacity: .9;
}

@keyframes vw-drop {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes vw-run {
    from { background-position: 0 0; }
    to   { background-position: 220% 0; }
}

/* ---------------- 左侧品牌标识 ---------------- */
.vw-bar__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.vw-bar__mark {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(140deg, rgba(34, 211, 238, .22), rgba(168, 85, 247, .22));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 0 18px rgba(99, 102, 241, .35);
}

.vw-bar__mark svg {
    width: 20px; height: 20px;
    fill: none;
    stroke: #e9f6ff;
    stroke-width: 1.4;
    stroke-linejoin: round;
    animation: vw-spin 9s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes vw-spin {
    to { transform: rotate(360deg); }
}

.vw-bar__text { min-width: 0; }

.vw-bar__name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .4px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vw-bar__sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: #93a1b5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vw-bar__sub b {
    color: #7dd3fc;
    font-weight: 700;
}

/* ---------------- 横幅内中英文切换 ---------------- */
.vw-bar__lang {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .10);
}

.vw-bar__lang a {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #93a1b5;
    text-decoration: none;
    white-space: nowrap;
    transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}

.vw-bar__lang a:hover {
    color: #ffffff;
}

.vw-bar__lang a.is-active {
    background: var(--vw-grad);
    background-size: 200% 100%;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(99, 102, 241, .55);
}

/* ---------------- 炫酷按钮 ---------------- */
.vw-btn {
    position: relative;
    isolation: isolate;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px 11px 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .5px;
    background: transparent;
    transform: translateZ(0) rotateX(var(--vx, 0deg)) rotateY(var(--vy, 0deg));
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    -webkit-tap-highlight-color: transparent;
}

.vw-btn:hover,
.vw-btn:focus-visible {
    transform: translateZ(0) translateY(-2px) scale(1.035) rotateX(var(--vx, 0deg)) rotateY(var(--vy, 0deg));
}

/* 按钮底板：深色内底 + 流动彩色渐变边框 */
.vw-btn__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 2px solid transparent;
    border-radius: inherit;
    background:
        linear-gradient(140deg, #2b3346, #171c28 60%, #10141d) padding-box,
        linear-gradient(100deg, var(--vw-c1), var(--vw-c2) 32%, var(--vw-c3) 64%, var(--vw-c4)) border-box;
    background-size: 100% 100%, 300% 100%;
    background-position: 0 0, 0% 50%;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 255, 255, .06) inset;
    animation: vw-flow 4.5s linear infinite;
    transition: box-shadow .3s ease;
    pointer-events: none;
}

.vw-btn:hover .vw-btn__bg,
.vw-btn:focus-visible .vw-btn__bg {
    box-shadow:
        0 14px 34px rgba(0, 0, 0, .6),
        0 0 0 1px rgba(255, 255, 255, .14) inset;
    animation-duration: 2.4s;
}

@keyframes vw-flow {
    from { background-position: 0 0, 0% 50%; }
    to   { background-position: 0 0, 300% 50%; }
}

.vw-btn:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 3px;
}

/* 按钮外圈旋转彩色光雾（模糊，无需 mask，兼容性最稳） */
.vw-btn__ring {
    position: absolute;
    inset: -8px;
    z-index: 0;
    border-radius: inherit;
    background: conic-gradient(from 0deg, var(--vw-c1), var(--vw-c2), var(--vw-c3), var(--vw-c4), var(--vw-c1));
    filter: blur(11px);
    opacity: .45;
    animation: vw-spin 4s linear infinite;
    pointer-events: none;
}

/* 鼠标跟随光斑（限制在按钮内部，内容之下） */
.vw-btn__spot {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    overflow: hidden;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .24), transparent 58%);
    animation: vw-breathe 3.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes vw-breathe {
    0%, 100% { opacity: .35; }
    50%      { opacity: .85; }
}

/* 掠过高光 */
.vw-btn__sheen {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.vw-btn__sheen::after {
    content: "";
    position: absolute;
    top: -60%; bottom: -60%;
    left: -60%;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
    transform: skewX(-18deg);
    animation: vw-sheen 3.6s ease-in-out infinite;
}

@keyframes vw-sheen {
    0%   { left: -60%; }
    55%  { left: 130%; }
    100% { left: 130%; }
}

/* 图标 */
.vw-btn__icon {
    position: relative;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--vw-grad);
    background-size: 200% 100%;
    animation: vw-run 3.2s linear infinite;
    box-shadow: 0 0 14px rgba(99, 102, 241, .6);
}

.vw-btn__icon svg {
    width: 14px; height: 14px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* 文案 */
.vw-btn__label {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.vw-btn__label strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .6px;
}

.vw-btn__label em {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: #a5b4fc;
    letter-spacing: .3px;
}

.vw-btn__arrow {
    position: relative;
    z-index: 4;
    font-size: 16px;
    line-height: 1;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.vw-btn:hover .vw-btn__arrow {
    transform: translateX(4px);
}

/* 点击涟漪 */
.vw-ripple {
    position: absolute;
    z-index: 5;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    animation: vw-ripple .65s ease-out forwards;
}

/* ---------------- 启动（点击进入）动效 ---------------- */
.vw-btn.is-launching {
    transform: translateZ(0) scale(.9);
}

.vw-btn.is-launching .vw-btn__ring {
    filter: blur(18px);
    opacity: .95;
    animation-duration: .5s;
}

.vw-btn.is-launching .vw-btn__bg {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .3) inset,
        0 0 44px rgba(139, 120, 255, .8);
}

.vw-btn.is-launching::after {
    content: "";
    position: absolute;
    inset: -4px;
    z-index: 6;
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, .7);
    animation: vw-burst .6s ease-out forwards;
    pointer-events: none;
}

@keyframes vw-burst {
    from { transform: scale(1); opacity: .95; }
    to   { transform: scale(1.45); opacity: 0; }
}

@keyframes vw-ripple {
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
    .vw-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    .vw-btn {
        justify-content: center;
        padding: 11px 18px;
    }
    .vw-bar__lang {
        align-self: center;
    }
    .vw-bar__sub { display: none; }
}

/* ---------------- 无障碍：减少动态效果 ---------------- */
@media (prefers-reduced-motion: reduce) {
    .vw-bar,
    .vw-bar::after,
    .vw-bar__mark svg,
    .vw-btn__ring,
    .vw-btn__spot,
    .vw-btn__sheen::after,
    .vw-btn__icon {
        animation: none !important;
    }
    .vw-btn {
        transition: none;
    }
}
