/* ═══════════════════════════════════════════
   BASE RESET
═══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -ms-touch-action: none;
  height: 100%;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0; margin: 0;
  overflow: hidden;
  background-color: #0d0d1f;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  cursor: default;
}

/* ═══════════════════════════════════════════
   COCOS ENGINE CANVAS
═══════════════════════════════════════════ */
#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0; top: 0;
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

/* ═══════════════════════════════════════════
   SPLASH / LOADING SCREEN
═══════════════════════════════════════════ */
#splash {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #101428 0%, #0d0d1f 60%, #080810 100%);
  z-index: 9999;
  overflow: hidden;
}

/* Animated grid background */
.splash-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 197, 222, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 197, 222, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridDrift 25s linear infinite;
}

@keyframes gridDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Ambient glow orbs */
.splash-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.splash-glow-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(61, 197, 222, 0.15) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}

.splash-glow-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(120, 80, 220, 0.12) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(20px, -20px) scale(1.08); }
}

/* Center content wrapper */
.splash-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 30px;
  animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo block */
.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Arrow icon cluster */
.logo-icon {
  width: 72px; height: 72px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  background: rgba(61, 197, 222, 0.08);
  border: 1px solid rgba(61, 197, 222, 0.2);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 0 30px rgba(61, 197, 222, 0.12), inset 0 1px 0 rgba(255,255,255,0.05);
}

.logo-icon .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #3dc5de;
  line-height: 1;
  animation: arrowPop 2s ease-in-out infinite;
}

.logo-icon .a1 { animation-delay: 0.0s; }
.logo-icon .a2 { animation-delay: 0.3s; }
.logo-icon .a3 { animation-delay: 0.6s; }
.logo-icon .a4 { animation-delay: 0.9s; }

@keyframes arrowPop {
  0%, 100% { opacity: 0.5; transform: scale(1);    color: #3dc5de; }
  50%       { opacity: 1;   transform: scale(1.2);  color: #7ee8f8;
              text-shadow: 0 0 8px rgba(61, 197, 222, 0.9); }
}

/* Logo title */
.logo-title {
  margin: 0;
  font-family: 'Rajdhani', 'Arial Black', Impact, sans-serif;
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.logo-title span {
  color: #3dc5de;
  text-shadow: 0 0 24px rgba(61, 197, 222, 0.6);
}

/* Tagline */
.splash-tagline {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.65rem, 2.5vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* ═══════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════ */
.progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(280px, 70vw);
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease-in-out;
  background: linear-gradient(90deg, #3dc5de, #7ee8f8, #3dc5de);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(61, 197, 222, 0.8);
}

.stripes span {
  animation: shimmer 1.8s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-text {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  animation: textPulse 1.8s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.6; }
}
