/**
 * 评价评分样式表
 * 为评分可视化提供样式支持
 */

.evaluation-score-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  margin-bottom: 25px;
}

.score-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

/* 总体评分卡片样式 */
.total-score-card {
  flex: 0 0 150px;
  color: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

/* 根据分数调整背景颜色 */
.total-score-card.excellent {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.total-score-card.good {
  background: linear-gradient(135deg, #43a047, #2e7d32);
}

.total-score-card.average {
  background: linear-gradient(135deg, #fb8c00, #ef6c00);
}

.total-score-card.poor {
  background: linear-gradient(135deg, #e53935, #c62828);
}

.total-score-card.fail {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
}

.total-score-value {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.total-score-label {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 10px;
}

.total-score-level {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* 分项评分样式 */
.score-details {
  flex: 1;
  min-width: 280px;
}

.score-item {
  margin-bottom: 15px;
}

.score-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.score-item-label {
  font-size: 14px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-item-label i {
  font-size: 16px;
}

.score-item-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
}

.score-value-number {
  font-size: 16px;
  font-weight: 700;
}

.score-value-separator {
  margin: 0 1px;
  opacity: 0.6;
}

.score-total-number {
  opacity: 0.7;
}

.score-level {
  font-size: 0.8em;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 5px;
  font-weight: 500;
}

.score-level.excellent {
  background-color: rgba(76, 175, 80, 0.2);
  color: #388e3c;
}

.score-level.good {
  background-color: rgba(33, 150, 243, 0.2);
  color: #1976d2;
}

.score-level.average {
  background-color: rgba(255, 152, 0, 0.2);
  color: #f57c00;
}

.score-level.poor {
  background-color: rgba(244, 67, 54, 0.2);
  color: #d32f2f;
}

.score-level.fail {
  background-color: rgba(117, 117, 117, 0.2);
  color: #616161;
}

.score-level.not-applicable {
  opacity: 0.7;
}

.score-na-text {
  font-style: italic;
  color: #757575;
  font-size: 0.95em;
  border: 1px dashed #bdbdbd;
  padding: 1px 8px;
  border-radius: 10px;
  background-color: #f5f5f5;
}

.score-item-bar-container {
  height: 12px;
  background-color: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.score-item-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 1s ease-in-out;
  position: relative;
}

/* 添加刻度标记 */
.score-item-bar-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(90deg, 
    transparent 0%, transparent 24%, rgba(255, 255, 255, 0.15) 25%, 
    rgba(255, 255, 255, 0.15) 25%, transparent 26%, transparent 49%, 
    rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 50%, 
    transparent 51%, transparent 74%, rgba(255, 255, 255, 0.15) 75%, 
    rgba(255, 255, 255, 0.15) 75%, transparent 76%, transparent 99%);
  background-size: 20% 100%;
  z-index: 1;
  pointer-events: none;
}

/* 添加分数标记 */
.score-item-bar-container::after {
  content: '0 5 10 15 20';
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #999;
  padding: 0 2px;
  opacity: 0.7;
}

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

.evaluation-score-section {
  animation: scoreAppear 0.6s ease-out forwards;
}

@keyframes barGrow {
  from { width: 0; }
  to { width: 100%; }
}

.score-item-bar {
  animation: barGrow 1.5s ease-out forwards;
}

/* 逐个显示每项评分 */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.score-item {
  animation: fadeSlideIn 0.4s ease-out forwards;
  opacity: 0;
}

.score-item:nth-child(1) { animation-delay: 0.1s; }
.score-item:nth-child(2) { animation-delay: 0.2s; }
.score-item:nth-child(3) { animation-delay: 0.3s; }
.score-item:nth-child(4) { animation-delay: 0.4s; }
.score-item:nth-child(5) { animation-delay: 0.5s; }

/* 总分数字动画 */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.total-score-value {
  animation: countUp 1s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

/* 评分等级标签动画 */
@keyframes badgeAppear {
  from { opacity: 0; transform: scale(0); }
  50% { transform: scale(1.2); }
  to { opacity: 1; transform: scale(1); }
}

.score-level {
  animation: badgeAppear 0.4s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

/* 分数条左右扭动效果 */
@keyframes barWiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(2px); }
  75% { transform: translateX(-2px); }
}

.score-item:hover .score-item-bar {
  animation: barWiggle 0.5s ease-in-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .score-container {
    flex-direction: column;
  }
  
  .total-score-card {
    width: 100%;
    flex: none;
  }
}
