/**
 * 多媒体调试面板样式
 * 左上角透明灰底面板，实时显示调试信息
 */

/* 调试面板容器 */
.multimedia-debug-panel {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 350px;
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 11px;
  line-height: 1.3;
  z-index: 9999;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.multimedia-debug-panel.collapsed .debug-panel-content {
  display: none;
}

.multimedia-debug-panel.collapsed {
  height: auto;
}

/* 面板头部 */
.debug-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.panel-title {
  font-weight: 600;
  color: #00ff88;
}

.panel-toggle {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.panel-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 面板内容 */
.debug-panel-content {
  padding: 8px;
  max-height: calc(80vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* 滚动条样式 */
.debug-panel-content::-webkit-scrollbar {
  width: 6px;
}

.debug-panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.debug-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* 调试区块 */
.debug-section {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.section-title {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  font-weight: 600;
  color: #ffdd44;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 状态内容 */
.status-content,
.queue-content,
.pointer-content {
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.status-line,
.queue-line,
.pointer-line {
  margin-bottom: 4px;
}

.pointer-section {
  margin-top: 8px;
  margin-bottom: 4px;
  font-weight: 600;
  color: #ffdd44;
  font-size: 10px;
}

.status-value {
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.status-value.idle {
  background: rgba(108, 117, 125, 0.3);
  color: #6c757d;
}

.status-value.speaking {
  background: rgba(40, 167, 69, 0.3);
  color: #28a745;
}

.queue-detail {
  font-size: 10px;
  color: #aaaaaa;
  margin-left: 10px;
}

.queue-items {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.queue-item {
  font-size: 9px;
  color: #cccccc;
  margin-bottom: 2px;
  line-height: 1.2;
}

/* JSON显示 */
.json-content {
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  max-height: 200px;
  overflow-y: auto;
}

.json-display {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 10px;
  line-height: 1.2;
  color: #dddddd;
}

.no-data,
.error {
  color: #ffc107;
  font-style: italic;
}

/* API按钮 */
.api-buttons {
  padding: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.api-btn {
  background: rgba(0, 123, 255, 0.3);
  color: #ffffff;
  border: 1px solid rgba(0, 123, 255, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.2s;
}

.api-btn:hover {
  background: rgba(0, 123, 255, 0.5);
  border-color: rgba(0, 123, 255, 0.8);
}

.api-btn:active {
  transform: scale(0.95);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .multimedia-debug-panel {
    width: 280px;
    font-size: 10px;
  }
  
  .debug-panel-header {
    padding: 6px 8px;
  }
  
  .debug-panel-content {
    padding: 6px;
  }
  
  .api-buttons {
    padding: 6px;
  }
  
  .api-btn {
    padding: 3px 6px;
    font-size: 9px;
  }
}

/* 动画效果 */
.multimedia-debug-panel {
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 隐藏样式（如果需要） */
.multimedia-debug-panel.hidden {
  display: none;
}

/* 高亮更新效果 */
.debug-section.updated {
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.5);
}

@keyframes flash {
  0% { background: rgba(0, 255, 136, 0.1); }
  50% { background: rgba(0, 255, 136, 0.2); }
  100% { background: rgba(0, 255, 136, 0.1); }
}

.debug-section.flash {
  animation: flash 0.5s ease-in-out;
}