/* --- Base Reset --- */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  background: #fff;
}

/* --- Unity Container --- */
#unity-container {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
}

/* --- Canvas --- */
#unity-canvas {
  width: 100%;
  aspect-ratio: 640 / 480;
  display: block;
  background: #231F20;
}

/* --- Loading Bar --- */
#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  text-align: center;
  z-index: 10;
}

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

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin: 10px auto 0;
  background: url('progress-bar-empty-dark.png') no-repeat center;
  background-size: contain;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  background: url('progress-bar-full-dark.png') no-repeat center;
  background-size: contain;
}

/* --- Footer --- */
#unity-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 16px;
  background: #f2f2f2;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 12px;
}

#unity-webgl-logo {
  width: 160px;
  height: 30px;
  background: url('webgl-logo.png') no-repeat center;
  background-size: contain;
  flex-shrink: 0;
}

#unity-fullscreen-button {
  width: 30px;
  height: 30px;
  background: url('fullscreen-button.png') no-repeat center;
  background-size: contain;
  cursor: pointer;
  flex-shrink: 0;
}

#unity-build-title {
  flex-grow: 1;
  text-align: center;
  font-size: 16px;
  line-height: 30px;
  min-width: 100px;
}

/* --- Warning --- */
#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* --- Mobile Footer Layout --- */
@media (max-width: 600px) {
  #unity-footer {
    justify-content: center;
    text-align: center;
  }

  #unity-webgl-logo,
  #unity-fullscreen-button {
    margin-bottom: 5px;
  }

  #unity-build-title {
    width: 100%;
  }
}
