/* ===========================================
   AnimBone Module Styles - 骨骼驱动动画
   =========================================== */

/* --- Upload Area --- */
#ab-upload-area {
  margin: 8px 12px;
  padding: 16px 8px;
  border: 1px dashed #2A2A2A;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
#ab-upload-area:hover {
  border-color: #3A3A3A;
  background: rgba(255,255,255,0.01);
}
#ab-upload-area span {
  font-size: 11px;
  color: #666;
}
#ab-upload-area input[type="file"] {
  display: none;
}

/* --- Image List --- */
#ab-image-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px;
}
#ab-image-list .image-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
#ab-image-list .image-item:hover {
  background: rgba(255,255,255,0.03);
}
#ab-image-list .image-item.active {
  border-color: #00D4FF;
  background: rgba(0,212,255,0.05);
}
#ab-image-list .image-item.selected {
  background: rgba(0,212,255,0.03);
}
#ab-image-list .image-item .thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a1a1a;
}
#ab-image-list .image-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#ab-image-list .image-item .info {
  flex: 1;
  min-width: 0;
}
#ab-image-list .image-item .name {
  font-size: 11px;
  color: #aaa;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ab-image-list .image-item .size {
  font-size: 10px;
  color: #666;
}
#ab-image-list .image-item {
  position: relative;
}
#ab-image-list .image-item .delete-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FF4444;
  border: 1.5px solid #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.15s;
  z-index: 2;
  padding: 0;
}
#ab-image-list .image-item .delete-btn:hover {
  transform: scale(1.1);
  background: #FF6666;
}
#ab-image-list .image-item:hover .delete-btn {
  opacity: 1;
}

/* --- Preview Area --- */
#ab-preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
}
#ab-preview-canvas-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
#ab-preview-canvas-wrap canvas {
  max-width: 90%;
  max-height: 70vh;
  image-rendering: pixelated;
  border: 1px solid #2A2A2A;
  border-radius: 4px;
  background: repeating-conic-gradient(#1a1a1a 0% 25%, #222 0% 50%) 50% / 20px 20px;
}
#ab-playback-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ab-play-btn {
  padding: 4px 16px;
  border: 1px solid #3A3A3A;
  border-radius: 4px;
  background: #1a1a1a;
  color: #aaa;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.ab-play-btn:hover {
  border-color: #00D4FF;
  color: #00D4FF;
}
#ab-frame-indicator {
  font-size: 12px;
  color: #888;
  font-variant-numeric: tabular-nums;
}
#ab-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #444;
}
#ab-empty-state p {
  font-size: 13px;
  color: #555;
}

/* --- MediaPipe Status --- */
.mp-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 4px 0;
}
.mp-status.mp-loading {
  color: #FFA500;
  background: rgba(255,165,0,0.05);
}
.mp-status.mp-ready {
  color: #00FF88;
  background: rgba(0,255,136,0.05);
}
.mp-status.mp-error {
  color: #FF6B6B;
  background: rgba(255,107,107,0.05);
}

/* --- Skeleton Overlay --- */
#ab-skeleton-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* --- Progress --- */
#ab-progress-section {
  margin-top: 12px;
}
#ab-progress-bar {
  height: 4px;
  background: #2A2A2A;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
#ab-progress-fill {
  height: 100%;
  background: #00D4FF;
  width: 0%;
  transition: width 0.2s;
}
#ab-progress-text {
  font-size: 11px;
  color: #888;
  text-align: right;
}
