body {
  margin: 0;
  padding: 0;
  background: #1a1a2e;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative;
}

#unity-container {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: #231F20;
}

/* Desktop - chiếm toàn bộ màn hình */
@media screen and (min-width: 768px) {
  #unity-container {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
  }
}

/* Mobile - tỉ lệ 4:3, ưu tiên chiều cao */
@media screen and (max-width: 767px) {
  body {
    overflow: hidden;
  }

  #unity-container {
    width: 100vw;
    height: 75vh;
    /* Lấy 75% chiều cao màn hình */
    max-width: 100vw;
    max-height: 75vh;
    position: relative;
  }

  /* Nếu 75vh quá rộng so với tỉ lệ 4:3, thì giới hạn width */
  @supports (aspect-ratio: 4/3) {
    #unity-container {
      aspect-ratio: 4/3;
      height: auto;
      max-height: 100dvh;
    }
  }

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