@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');:root {
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
}

body {
  margin: 0;
  padding: 0;
  background-color: #030510;
  color: #e2e8f0;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; /* 防止 iOS 橡皮筋回弹导致漏底 */
}

* {
  box-sizing: border-box;
}

#app {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
/* ======== 极简轻量级高颜质按钮系统 (替换旧版复杂结构) ======== */
.ab {
  --c-main: #6366f1;
  --c-hover: #818cf8;
  --c-active: #4f46e5;
  --shadow: rgba(99, 102, 241, 0.3);
  
  height: 38px;
  border-radius: 12px;
  padding: 0 24px;
  background: linear-gradient(180deg, var(--c-main) 0%, var(--c-active) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}

/* 隐藏旧版复杂的 DOM 层，强制使用极简渲染 */
.ab-blur, .ab-glow, .ab-grad, .ab-bg {
  display: none !important;
}

.ab:hover {
  background: linear-gradient(180deg, var(--c-hover) 0%, var(--c-main) 100%);
  box-shadow: 0 6px 16px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.ab:active {
  background: var(--c-active);
  box-shadow: 0 2px 4px var(--shadow), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(1px) scale(0.97);
}

.ab-inner {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: normal;
  line-height: 1.15;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* 尺寸变体 */
.ab-full {
  width: 100%;
}

.ab-sm {
  height: 32px;
  padding: 0 16px;
  border-radius: 10px;
}

.ab-sm .ab-inner {
  font-size: 12px;
}

/* 颜色变体 */
.ab-blue {
  --c-main: #3b82f6; --c-hover: #60a5fa; --c-active: #2563eb; --shadow: rgba(59, 130, 246, 0.3);
}

.ab-gold {
  --c-main: #f59e0b; --c-hover: #fbbf24; --c-active: #d97706; --shadow: rgba(245, 158, 11, 0.3);
}

.ab-teal {
  --c-main: #14b8a6; --c-hover: #2dd4bf; --c-active: #0d9488; --shadow: rgba(20, 184, 166, 0.3);
}

.ab-cyan {
  --c-main: #06b6d4; --c-hover: #22d3ee; --c-active: #0891b2; --shadow: rgba(6, 182, 212, 0.3);
}

.ab-red {
  --c-main: #ef4444; --c-hover: #f87171; --c-active: #dc2626; --shadow: rgba(239, 68, 68, 0.3);
}

.ab-purple {
  --c-main: #8b5cf6; --c-hover: #a78bfa; --c-active: #7c3aed; --shadow: rgba(139, 92, 246, 0.3);
}

.ab-gray {
  --c-main: #64748b; --c-hover: #94a3b8; --c-active: #475569; --shadow: rgba(100, 116, 139, 0.2);
}

.ab-green {
  --c-main: #10b981; --c-hover: #34d399; --c-active: #059669; --shadow: rgba(16, 185, 129, 0.3);
}

/* ======== Loading 状态增强 ======== */
.ab.is-loading, .mbtn.is-loading, .save-btn.is-loading, .ct-submit.is-loading {
  pointer-events: none;
  opacity: 0.8 !important;
  color: transparent !important;
}

.ab.is-loading .ab-inner {
  visibility: hidden;
}

.ab.is-loading::after, .mbtn.is-loading::after, .save-btn.is-loading::after, .ct-submit.is-loading::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin-top: -9px; margin-left: -9px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ab-spin 0.6s linear infinite;
  z-index: 9;
}

@keyframes ab-spin {
  to { transform: rotate(360deg); }
}

html, body, #app {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background-color: #060818;
}
#omni-app { width: 100vw; height: 100vh; height: 100dvh; position: relative;
}

/* Cocos Canvas 容器 */
#cocos-game-div {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}
#Cocos3dGameContainer { width: 100%; height: 100%;
}
#GameCanvas { width: 100%; height: 100%; display: block; pointer-events: auto !important; touch-action: none;
}

/* Vue UI 层 */
#vue-ui {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10; pointer-events: none;
}
#vue-ui.vue-ui-opaque { pointer-events: auto;
}
#vue-ui:not(.vue-ui-opaque) > * { pointer-events: auto;
}

/* ====== 启动页 ====== */
#omni-splash {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: radial-gradient(ellipse at 50% 30%, #0a1628 0%, #050d1a 50%, #020408 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; transition: opacity 0.8s ease;
}
#omni-splash.hide { opacity: 0; pointer-events: none;
}
.splash-particle {
  position: absolute; bottom: 0; border-radius: 50%;
  pointer-events: none; animation: splash-float linear infinite;
  opacity: 0;
}
@keyframes splash-float {
0% { transform: translateY(0) scale(0); opacity: 0;
}
10% { opacity: 1; transform: translateY(-10vh) scale(0.5);
}
90% { opacity: 1;
}
100% { transform: translateY(-120vh) scale(1); opacity: 0;
}
}
.splash-logo-wrap { position: relative; margin-bottom: 30px;
}
.splash-logo-glow {
  position: absolute; top: 50%; left: 50%;
  width: 280px; height: 280px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(30,100,220,0.4) 0%, rgba(30,100,220,0) 70%);
  border-radius: 50%; animation: splash-glow 2s ease-in-out infinite;
}
@keyframes splash-glow {
0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6;
}
50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1;
}
}
.splash-logo-img {
  position: relative; width: 180px; height: 180px;
  border-radius: 28px; animation: splash-logo-float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(30,100,220,0.5));
}
@keyframes splash-logo-float {
0%, 100% { transform: translateY(0);
}
50% { transform: translateY(-8px);
}
}
.splash-brand-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px; font-weight: 900; letter-spacing: 8px;
  background: linear-gradient(135deg, #4a9eff 0%, #a78bfa 50%, #60a5fa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 40px;
  animation: splash-shimmer 3s ease-in-out infinite;
}
@keyframes splash-shimmer {
0%, 100% { filter: brightness(1);
}
50% { filter: brightness(1.4);
}
}
.splash-progress-wrap { width: 220px; position: relative;
}
.splash-progress-track {
  width: 100%; height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.splash-progress-fill {
  height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #3b82f6);
  background-size: 200% 100%;
  animation: splash-bar-flow 2s linear infinite;
  transition: width 0.3s ease;
}
@keyframes splash-bar-flow {
0% { background-position: 200% 0;
}
100% { background-position: 0 0;
}
}
.splash-progress-text {
  text-align: center; margin-top: 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px; color: rgba(148,163,184,0.6);
  letter-spacing: 3px;
}
.splash-progress-hint {
  text-align: center; margin-top: 8px;
  font-size: 11px; color: rgba(255,255,255,0.4);
}
.splash-version {
  text-align: center; margin-top: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px; color: rgba(148,163,184,0.3);
  letter-spacing: 2px;
}
.splash-tips {
  position: absolute; bottom: 60px; width: 80%;
  text-align: center; font-size: 12px; color: rgba(255,255,255,0.6);
  padding: 0 20px; box-sizing: border-box; line-height: 1.6;
}
.tip-fade-enter-active, .tip-fade-leave-active {
  transition: opacity 0.5s ease;
}
.tip-fade-enter-from, .tip-fade-leave-to {
  opacity: 0;
}
.splash-deco-line {
  position: absolute; bottom: 40px;
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
}

/* ★ TG 全屏切换按钮 */
.splash-fullscreen-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(99,102,241,0.25); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(99,102,241,0.4); border-radius: 20px;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
  backdrop-filter: blur(8px); transition: all 0.2s;
  z-index: 999;
}
.splash-fullscreen-btn:active {
  background: rgba(99,102,241,0.5); transform: scale(0.95);
}
