:root {
  color-scheme: dark;
  background: #020711;
  font-family: "Segoe UI", Arial, sans-serif;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  box-sizing: border-box;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow-x: hidden;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 215, 255, 0.13), transparent 31rem),
    radial-gradient(circle at 15% 10%, rgba(232, 14, 187, 0.09), transparent 25rem),
    linear-gradient(135deg, #020711 0%, #061629 48%, #020711 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.28;
  background-image: linear-gradient(rgba(0, 225, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 225, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
}

#unity-container {
  position: relative;
  isolation: isolate;
  width: min(960px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: #03101e;
  box-shadow: 0 0 0 5px rgba(0, 206, 255, 0.08), 0 0 42px rgba(0, 212, 255, 0.22), 0 0 96px rgba(224, 18, 187, 0.12);
}

#unity-container::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 0, 190, 0.28);
}

#unity-canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 8 / 5;
  outline: none;
  background: #03101e;
}

#unity-loading-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(280px, calc(100% - 56px));
  transform: translate(-50%, -50%);
  text-align: center;
}

#unity-logo {
  width: 100%;
  height: 62px;
}

#unity-logo::before {
  display: block;
  content: "CYBERNET";
  color: #09e8ff;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-shadow: 0 0 18px rgba(9, 232, 255, 0.9);
}

#unity-logo::after {
  display: block;
  margin-top: 10px;
  content: "LINKING TO THE GRID";
  color: #f02ac7;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

#unity-progress-bar-empty {
  box-sizing: border-box;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 233, 255, 0.72);
  background: rgba(1, 12, 26, 0.88);
  box-shadow: 0 0 14px rgba(0, 233, 255, 0.3);
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00dffc, #e91fc8);
  box-shadow: 0 0 14px rgba(0, 233, 255, 0.9);
}

#unity-warning {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 4;
  width: min(560px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #fff;
}

#unity-container.unity-mobile {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: none;
}

.unity-mobile #unity-canvas {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto;
}

@media (max-width: 640px) {
  body { padding: 0; }
  #unity-container { width: 100vw; border-right: 0; border-left: 0; }
}
