/**
 * 装备提升指南 - 专属样式
 * 用于装备模拟器页面中的提升指南面板
 */

/* ==================== 主面板容器 ==================== */
.enhancement-guide-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.enhancement-guide-wrapper.placeholder {
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.placeholder-content {
  color: #9ca3af;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.placeholder-content h3 {
  color: #6b7280;
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
}

.placeholder-content p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.875rem;
}

/* ==================== 主面板 ==================== */
.enhancement-guide-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #1f2937;
  color: #f3f4f6;
  overflow: hidden;
}

.enhancement-guide-panel.loading,
.enhancement-guide-panel.error,
.enhancement-guide-panel.empty {
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #374151;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.retry-button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
}

.retry-button:hover {
  background: #2563eb;
}

/* ==================== 工具栏 ==================== */
.guide-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #374151;
  background: #111827;
}

.guide-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f3f4f6;
}

.refresh-button {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #374151;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.refresh-button:hover {
  background: #374151;
  transform: rotate(180deg);
}

/* ==================== 装备名称 ==================== */
.guide-item-name {
  padding: 0.75rem 1rem;
  background: #1f2937;
  border-bottom: 1px solid #374151;
  font-size: 0.875rem;
  color: #d1d5db;
  text-align: center;
}

/* ==================== 头部区域 ==================== */
.guide-header {
  padding: 1rem;
  border-bottom: 1px solid #374151;
  background: #111827;
}

.guide-score-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* 评分圆环 */
.guide-score-ring {
  position: relative;
  width: 8rem;
  height: 8rem;
  border: 4px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-score-content {
  text-align: center;
}

.guide-score-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.guide-score-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.guide-score-grade {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* 完成度进度条 */
.guide-completion {
  flex: 1;
  min-width: 0;
}

.completion-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #d1d5db;
}

.completion-value {
  font-weight: 600;
}

.completion-bar-bg {
  height: 0.75rem;
  background: #374151;
  border-radius: 0.375rem;
  overflow: hidden;
}

.completion-bar-fill {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 0.375rem;
}

/* 快速统计 */
.guide-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #374151;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: #1f2937;
  border-radius: 0.375rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f3f4f6;
}

/* ==================== 标签页 ==================== */
.enhancement-tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tabs-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #111827;
  border-bottom: 1px solid #374151;
  overflow-x: auto;
}

.tab-button {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.tab-button:hover {
  background: #1f2937;
  color: #d1d5db;
}

.tab-button.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.tab-label {
  white-space: nowrap;
}

.tab-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.tab-button.active .tab-count {
  background: rgba(255, 255, 255, 0.3);
}

/* 标签页内容 */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.tab-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}

.tab-empty p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.empty-hint {
  font-size: 0.75rem !important;
  color: #6b7280;
}

/* ==================== 建议列表 ==================== */
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==================== 建议卡片 ==================== */
.recommendation-card {
  position: relative;
  padding: 1rem;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.recommendation-card:hover {
  border-color: #4b5563;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 优先级徽章 */
.card-priority-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.priority-level {
  text-transform: uppercase;
}

.priority-score {
  opacity: 0.9;
}

/* 提升类型标签 */
.card-type-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #3b82f6;
  color: white;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* 标题和描述 */
.card-title-section {
  margin-bottom: 1rem;
}

.card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f3f4f6;
}

.card-description {
  margin: 0;
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.5;
}

/* 状态对比 */
.card-state-comparison {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #111827;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.state-current,
.state-target {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.state-label {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
}

.state-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f3f4f6;
  word-break: break-word;
}

.state-arrow {
  font-size: 1.25rem;
  color: #6b7280;
  flex-shrink: 0;
}

/* 预期提升 */
.card-improvement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.improvement-label {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 600;
}

.improvement-stat {
  font-size: 0.875rem;
  color: #22c55e;
  font-weight: 600;
}

.improvement-change {
  font-size: 0.875rem;
  color: #f3f4f6;
}

.improvement-percent {
  color: #22c55e;
  font-weight: 600;
}

/* 成本估算 */
.card-cost {
  padding: 0.75rem;
  background: #111827;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.cost-row:last-child {
  margin-bottom: 0;
}

.cost-label {
  color: #9ca3af;
}

.cost-value {
  color: #f3f4f6;
  font-weight: 600;
}

/* 风险指示器 */
.card-risk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #111827;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.risk-label {
  font-size: 0.875rem;
  color: #9ca3af;
}

.risk-value {
  font-size: 0.875rem;
  font-weight: 600;
}

/* 额外说明 */
.card-notes {
  padding: 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.card-notes ul {
  margin: 0;
  padding-left: 1.25rem;
  list-style-type: disc;
}

.card-notes li {
  font-size: 0.875rem;
  color: #d1d5db;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.card-notes li:last-child {
  margin-bottom: 0;
}

/* 不可执行状态 */
.card-not-actionable {
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.375rem;
  color: #f87171;
  font-size: 0.875rem;
  text-align: center;
  font-weight: 600;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  .guide-score-section {
    flex-direction: column;
    text-align: center;
  }

  .guide-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabs-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .card-state-comparison {
    flex-direction: column;
  }

  .state-arrow {
    transform: rotate(90deg);
  }
}

/* ==================== 滚动条样式 ==================== */
.tab-content::-webkit-scrollbar,
.tabs-nav::-webkit-scrollbar {
  height: 0.5rem;
  width: 0.5rem;
}

.tab-content::-webkit-scrollbar-track,
.tabs-nav::-webkit-scrollbar-track {
  background: #111827;
}

.tab-content::-webkit-scrollbar-thumb,
.tabs-nav::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 0.25rem;
}

.tab-content::-webkit-scrollbar-thumb:hover,
.tabs-nav::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* ==================== 动画效果 ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recommendation-card {
  animation: fadeIn 0.3s ease;
}

.completion-bar-fill {
  transition: width 0.5s ease, background-color 0.3s ease;
}
