body { padding: 0; margin: 0; overflow: hidden; width: 100%; height: 100%; background-color: #0a1628; }

#unity-container { position: fixed; width: 100%; height: 100%; top: 0; left: 0; }

#unity-canvas { width: 100%; height: 100%; background: #0a1628; }

#unity-loading-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1628;
  transition: opacity 0.6s ease;
}

#unity-loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#unity-loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

#unity-portfolio-title {
  color: #E8F0FE;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  animation: sway 3s ease-in-out infinite;
}

#unity-loader {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#unity-loader-gem {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #0066CC, #4FC3F7, #0066CC);
  transform: rotate(45deg);
  border-radius: 3px;
  animation: gem-squish 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.4), 0 0 40px rgba(0, 102, 204, 0.15);
}

.sparkle {
  position: absolute;
  bottom: 10%;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #4FC3F7, #E8F0FE);
  transform: rotate(45deg);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.7);
  animation: sparkle-rise 4s ease-in-out infinite;
  opacity: 0;
}

#unity-loading-text {
  color: #E8F0FE;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: text-hop 1.6s ease-in-out infinite;
}

#unity-progress-track {
  width: 160px;
  height: 2px;
  background: rgba(0, 102, 204, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

#unity-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0066CC, #4FC3F7);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
}

#unity-loading-percent {
  color: #6B8DB5;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

#unity-fallback {
  color: #6B8DB5;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  border: 1px solid rgba(79, 195, 247, 0.2);
  border-radius: 6px;
  padding: 8px 14px;
  background: rgba(0, 102, 204, 0.06);
}

#unity-fallback a {
  color: #4FC3F7;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

#unity-fallback a:hover {
  border-bottom-color: #4FC3F7;
}

#unity-footer { position: fixed; top: 0; right: 0; z-index: 10; }

#unity-fullscreen-button {
  cursor: pointer;
  width: 38px;
  height: 38px;
  background: url('TemplateData/fullscreen-button.png') no-repeat center;
  background-size: 24px;
  opacity: 0.5;
  margin: 8px;
  filter: brightness(0) saturate(100%) invert(70%) sepia(10%) saturate(500%) hue-rotate(180deg);
  transition: opacity 0.3s ease;
}

#unity-fullscreen-button:hover { opacity: 1; }

#unity-warning {
  position: fixed;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
  z-index: 100;
}

@keyframes gem-squish {
  0%, 100% {
    transform: rotate(45deg) scale(1, 1);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3), 0 0 30px rgba(0, 102, 204, 0.1);
  }
  25% {
    transform: rotate(55deg) scale(0.85, 1.15);
    box-shadow: 0 0 28px rgba(79, 195, 247, 0.6), 0 0 55px rgba(0, 102, 204, 0.2);
  }
  50% {
    transform: rotate(45deg) scale(1.08, 0.92);
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.4), 0 0 40px rgba(0, 102, 204, 0.15);
  }
  75% {
    transform: rotate(35deg) scale(0.9, 1.08);
    box-shadow: 0 0 22px rgba(79, 195, 247, 0.45), 0 0 45px rgba(0, 102, 204, 0.18);
  }
}

@keyframes sparkle-rise {
  0% {
    opacity: 0;
    transform: rotate(45deg) translateY(0) scale(0.3);
  }
  15% {
    opacity: 1;
    transform: rotate(45deg) translateY(-15px) scale(1.1);
  }
  30% {
    opacity: 0.2;
    transform: rotate(45deg) translateY(-30px) scale(0.5);
  }
  45% {
    opacity: 1;
    transform: rotate(45deg) translateY(-45px) scale(1);
  }
  65% {
    opacity: 0.3;
    transform: rotate(45deg) translateY(-65px) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translateY(-95px) scale(0);
  }
}

@keyframes sway {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes text-hop {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-3px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-1px); }
}
