/* 基本設定 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background-color: #000;
    -webkit-text-size-adjust: 100%; /* iOSで勝手に拡大されるのを防ぐ */
    -ms-text-size-adjust: 100%;
}
*, *::before, *::after {
    box-sizing: border-box;
}

/* Unity Canvas */
#unity-container {
    width: 100%;
    height: 100%;
    position: relative;
}
#unity-canvas {
    width: 100%;
    height: 100%;
    background: #000; /* Unity側背景色 */
    display: block;
}

/* ロードカバー */
#loading-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

/* ロゴ */
#unity-logo {
    text-align: center;
}
#unity-logo img {
    max-width: 50%;
    height: auto;
}

/* プログレスバー */
#unity-progress-bar-empty {
    width: 80%;
    height: 24px;
    margin-top: 20px;
    border: 1px solid #fff;
    padding: 2px;
    display: none; /* 初期は非表示 */
}
#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: #fff;
    transition: width 0.2s linear; /* スムーズに伸びる */
}

/* スピナー */
.spinner,
.spinner:after {
  border-radius: 50%;
  width: 5em;
  height: 5em;
}
.spinner {
  margin-top: 20px;
  font-size: 10px;
  position: relative;
  text-indent: -9999em;
  border-top: 1.1em solid rgba(255, 255, 255, 0.2);
  border-right: 1.1em solid rgba(255, 255, 255, 0.2);
  border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
  border-left: 1.1em solid #ffffff;
  transform: translateZ(0);
  animation: spinner-spin 1.1s infinite linear;
}
@keyframes spinner-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* フルスクリーンボタン */
#unity-fullscreen-button {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    background: url('fullscreen-button.png') no-repeat center;
    background-size: contain;
    display: none; /* 初期は非表示 */
}

/* スマホ用入力ズーム防止 */
input, textarea {
    font-size: 16px;
}

/* モバイル用調整 */
@media (max-width: 768px) {
    #unity-logo img {
        max-width: 70%;
    }
    #unity-progress-bar-empty {
        width: 90%;
    }
}
