/* 沙箱与网络授权动画 —— 场景样式(主页 feature 行 / anim2-demo 页共用) 无边框无底色,融于星空;无 glow。恶意命令红 --danger 定义在 .anim2-window 作用域。 */ /* ───────── 动画容器 ───────── */ .anim2-window { --danger: #d47b6b; /* 恶意命令红,仅本动画作用域 */ width: 100%; height: 100%; display: flex; flex-direction: column; } .anim2-tabs { display: flex; gap: 2px; padding: 0 2px 6px; flex: none; } .anim2-tab { height: 26px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); font-size: 12.5px; font-family: inherit; cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; } .anim2-tab:hover { color: var(--text-2); } .anim2-tab.is-active { background: rgba(169, 194, 240, 0.14); color: var(--accent-strong); } /* ───────── 场景区 ───────── */ .anim2-stage { position: relative; flex: 1; overflow: hidden; } /* 防御者:右侧,六边形 + 盾牌 */ .defender { position: absolute; right: 36px; bottom: 26px; width: 96px; height: 96px; } .defender-avatar { display: block; width: 96px; height: 96px; color: var(--text-1); } .defender-avatar .astrion-avatar { width: 100%; height: 100%; } /* 盾牌举向左上方:顺时针倾斜(尖底朝左下),与六边形左上部分重叠遮挡,实色填充不透底 */ .defender-shield { position: absolute; left: -26px; top: -12px; width: 70px; height: 70px; color: var(--accent); fill: var(--bg-1); transform: rotate(24deg); } /* 盾牌/智能体受击后坐回弹 */ @keyframes defender-brace { 0% { transform: translateX(0); } 30% { transform: translateX(5px); } 60% { transform: translateX(-1.5px); } 100% { transform: translateX(0); } } .defender.is-hit { animation: defender-brace 0.34s ease; } /* ───────── 飞行中的命令块 ───────── */ .cmd-projectile { position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; color: var(--danger); white-space: nowrap; will-change: transform; /* 装填入场只动透明度:fill both 保持 transform 会压住 JS 逐帧位移动画 */ animation: cmd-load 0.4s ease both; } @keyframes cmd-load { from { opacity: 0; } to { opacity: 1; } } /* ───────── 字符碎片(撞击后炸开) ───────── */ .cmd-shard { position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; color: var(--danger); will-change: transform, opacity; } /* ───────── 撞击扩散环(描边圆环,非光晕) ───────── */ .impact-ring { position: absolute; width: 56px; height: 56px; border: 2px solid var(--accent-strong); border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.3); } .impact-ring.is-active { animation: impact-expand 0.45s ease-out both; } @keyframes impact-expand { 0% { opacity: 0.75; transform: translate(-50%, -50%) scale(0.3); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); } } /* ───────── 底部说明行 ───────── */ .anim2-caption { flex: none; min-height: 46px; padding: 6px 2px 0; font-family: var(--font-sans); } .caption-note { font-size: 12.5px; color: var(--ok); margin-top: 2px; animation: caption-in 0.3s ease both; } @keyframes caption-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }