html, body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

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

#unity-canvas {
  width: 100% !important;
  height: 100% !important;
  background: #000;
  display: block;
}

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

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

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

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

#fullscreen-btn {
  position: fixed;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.45);
  background-image: url('fullscreen-button.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  z-index: 99;
  transition: all 0.2s ease;
  opacity: 0.65;
}

#fullscreen-btn:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.85);
  border-color: #ffcc00;
  transform: scale(1.08);
}

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

/* Lớp phủ yêu cầu xoay ngang màn hình trên thiết bị di động */
#rotate-device-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 16, 0.96);
  z-index: 9999999;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}

@media screen and (orientation: portrait) and (max-width: 900px) {
  #rotate-device-screen {
    display: flex;
  }
}

.rotate-content {
  padding: 24px;
  max-width: 320px;
}

.phone-icon {
  margin: 0 auto 20px auto;
  width: 80px;
  height: 80px;
  animation: rotatePhone 2.2s ease-in-out infinite;
}

@keyframes rotatePhone {
  0%, 15% { transform: rotate(0deg); }
  50%, 65% { transform: rotate(-90deg); }
  90%, 100% { transform: rotate(0deg); }
}

.rotate-text {
  font-size: 17px;
  font-weight: bold;
  color: #f0a500;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.rotate-sub {
  font-size: 13px;
  color: #a0a6b5;
  margin-bottom: 22px;
  line-height: 1.4;
}

#btn-force-landscape {
  background: #f0a500;
  color: #111;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(240, 165, 0, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
}

#btn-force-landscape:active {
  transform: scale(0.96);
  background: #d89400;
}
