/* 实验页面Ajax功能样式 */

/* 加载状态 */
.experiment-grid.loading {
  position: relative;
  min-height: 200px;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  font-size: 16px;
  color: #666;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
}

.loading-spinner::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

/* 错误状态 */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
}

.error-state i {
  font-size: 48px;
  color: #dc3545;
  margin-bottom: 16px;
}

.error-state p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.retry-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.retry-btn:hover {
  background: #0056b3;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
}

.empty-state i {
  font-size: 48px;
  color: #6c757d;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* 筛选按钮状态 */
.type-filters {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.filter-btn {
  background: transparent;
  border: 2px solid #e1e5e9;
  color: #666;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
}

.filter-btn:hover {
  border-color: #007bff;
  color: #007bff;
}

.filter-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.filter-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 卡片动画 */
.experiment-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.experiment-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* 工具提示 */
.tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .type-filters {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .loading-spinner,
  .error-state,
  .empty-state {
    margin: 15px 0;
    padding: 30px 15px;
  }
  
  .error-state i,
  .empty-state i {
    font-size: 36px;
  }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
  .loading-spinner,
  .error-state,
  .empty-state {
    background: #2d3748;
    color: #e2e8f0;
  }
  
  .filter-btn {
    border-color: #4a5568;
    color: #a0aec0;
  }
  
  .filter-btn:hover {
    border-color: #63b3ed;
    color: #63b3ed;
  }
  
  .filter-btn.active {
    background: #63b3ed;
    border-color: #63b3ed;
  }
} 