/* GameTukuuru2 - メインスタイル */

/* ヘッダーとコンテナ */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-button {
  border-bottom: 2px solid transparent;
}

.tab-button.active {
  border-bottom-color: #6366f1;
  color: #6366f1;
}

/* 画像プレビュー */
.image-preview {
  height: 100px;
  object-fit: contain;
  background-color: #f3f4f6;
}

/* 編集ボタン */
.edit-name-btn, .replace-btn {
  transition: all 0.2s ease;
  opacity: 0.8;
}

.edit-name-btn:hover, .replace-btn:hover {
  transform: scale(1.05);
  opacity: 1;
}

/* 画像カードのホバー効果 */
.border.rounded.p-2 {
  transition: all 0.3s ease;
}

.border.rounded.p-2:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* シーンコンテナ */
.scene-container {
  background-size: contain; /* coverではなくcontainに変更 */
  background-position: center center;
  background-repeat: no-repeat;
  background-color: transparent; /* 透過に変更 */
  transition: background-image 0.5s ease;
  height: 300px; /* 固定高さに戻す */
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

/* キャラクター画像 */
.character-image {
  max-height: 85%;
  height: auto;
  object-fit: contain;
  width: auto;
  max-width: 40%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* AIシナリオジェネレーター */
#aiScenarioModal .animate-spin {
  animation: spin 1s linear infinite;
}

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

#scenarioOutput {
  font-family: monospace;
  white-space: pre;
  min-height: 200px;
}

/* AIシナリオボタン */
.ai-scenario-button {
  background-color: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.ai-scenario-button:hover {
  background-color: #059669;
}

/* 画像セレクター */
.image-option {
  width: 80px;
  display: inline-block;
  vertical-align: top;
  margin: 0.25rem;
  transition: all 0.2s ease;
  position: relative;
}

.image-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-option.selected-image {
  background-color: #dbeafe;
  border-color: #3b82f6;
}

/* 選択済み画像のチェックマーク */
.image-option.selected-image::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #3b82f6;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#backgroundSelector, #characterSelector, #itemSelector {
  max-height: 220px;
  overflow-y: auto;
}

/* 画像選択アニメーション */
@keyframes pulse-border {
  0% { border-color: #3b82f6; }
  50% { border-color: #93c5fd; }
  100% { border-color: #3b82f6; }
}

.selected-image {
  animation: pulse-border 2s infinite;
}

/* ドラッグ&ドロップ領域 */
.image-drop-zone {
  transition: all 0.3s ease;
  position: relative;
}

.image-drop-zone.drag-over {
  background-color: #dbeafe !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.image-drop-zone.drag-over::after {
  content: 'ここにドロップ';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(59, 130, 246, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

/* 複数選択表示 */
#selectedBackgrounds.has-selection,
#selectedCharacters.has-selection,
#selectedItems.has-selection {
  color: #3b82f6;
  font-weight: 500;
}
