* { box-sizing: border-box; }

body {
  padding: 0;
  margin: 0;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(79, 172, 254, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 242, 254, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(30, 58, 95, 0.5) 0%, transparent 70%),
    linear-gradient(180deg, #0a0f1a 0%, #111827 50%, #0d1421 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #e8e8e8;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(79, 172, 254, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 172, 254, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

#unity-container { position: absolute; }
#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(79, 172, 254, 0.2);
  padding: 3px;
}
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100%; }

#unity-canvas {
  background: #231F20;
  display: block;
}
.unity-mobile #unity-canvas { width: 100%; height: 100%; border-radius: 0; }

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  text-align: center;
}

#unity-logo {
  width: 154px;
  height: 130px;
  background: url('unity-logo-dark.png') no-repeat center;
  margin: 0 auto;
}

#unity-progress-bar-empty {
  width: 200px;
  height: 8px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

#unity-footer {
  position: relative;
  background: linear-gradient(180deg, #1e3a5f 0%, #152238 100%);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.unity-mobile #unity-footer { display: none; }

#unity-logo-title-footer {
  width: 102px;
  height: 38px;
  background: url('unity-logo-title-footer.png') no-repeat center;
  opacity: 0.7;
  flex-shrink: 0;
}

#unity-build-title {
  line-height: 38px;
  font-size: 16px;
  font-weight: 500;
  color: #a8c5e2;
  flex-shrink: 0;
}

#version-link {
  color: #4facfe;
  text-decoration: none;
  font-size: 14px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(79, 172, 254, 0.1);
  transition: all 0.2s ease;
}
#version-link:hover {
  background: rgba(79, 172, 254, 0.25);
  color: #00f2fe;
}

#unity-fullscreen-button {
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: rgba(79, 172, 254, 0.1);
  border: 1px solid rgba(79, 172, 254, 0.3);
  position: relative;
}
#unity-fullscreen-button::before,
#unity-fullscreen-button::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid #4facfe;
}
#unity-fullscreen-button::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
}
#unity-fullscreen-button::after {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
}
#unity-fullscreen-button:hover {
  background: rgba(79, 172, 254, 0.25);
  border-color: rgba(79, 172, 254, 0.6);
}
#unity-fullscreen-button:hover::before,
#unity-fullscreen-button:hover::after {
  border-color: #00f2fe;
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: #fff3cd;
  color: #856404;
  padding: 12px 20px;
  border-radius: 6px;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Controls Footer */
#controls-footer {
  background: linear-gradient(180deg, #0d1a2d 0%, #0a1320 100%);
  padding: 12px 20px;
  border-top: 1px solid rgba(79, 172, 254, 0.15);
}

#controls-footer h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #4facfe;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 30px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #b8c9dc;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  background: linear-gradient(180deg, #2a4a6d 0%, #1e3550 100%);
  border: 1px solid #3a6a9d;
  border-radius: 5px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #e8f4ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.key-group {
  display: flex;
  gap: 3px;
}

.control-desc {
  color: #8fa8c4;
}
