/**
 * Viewer CSS
 * 配信ソフト(OBS/vMix)に取り込まれることを想定
 * - スクロールバーなし
 * - 余白なし
 * - 操作UIなし（デバッグパネルは開発時のみ）
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

#viewer-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
}

/* ======================================
   読み込み中オーバーレイ
====================================== */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  color: white;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  z-index: 1000;
  position: relative;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ======================================
   デバッグパネル（開発時のみ表示）
====================================== */
.debug-panel {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #0f0;
  pointer-events: none;
  z-index: 1000;
  user-select: none;
  display: none;
}

.debug-panel.visible {
  display: block;
}

.debug-title {
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #0f0;
  padding-bottom: 4px;
}

.debug-content p {
  margin: 4px 0;
  line-height: 1.4;
}

.debug-content span {
  color: #fff;
  font-weight: bold;
}

/* オーバーレイ非表示（配信時） */
@media screen and (max-width: 1920px) {
  .debug-panel {
    display: none !important;
  }
}
