@use '../../ios-theme.scss' as *;

.skill-radar-container {
  background-color: $ios-card-background;
  border-radius: $ios-radius-lg;
  padding: $ios-spacing-xl;
  box-shadow: $ios-shadow-card;
  margin-bottom: $ios-spacing-xl;
  border: 1px solid $ios-border;
}
.skill-radar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: $ios-spacing-xl;
}

.skill-radar-header h3 {
  margin: 0;
  font-size: $ios-font-size-lg;
  color: $ios-text-primary;
  font-weight: $ios-font-weight-medium;
  font-family: $ios-font-family;
}

.view-toggle {
  display: flex;
  background-color: $ios-background-secondary;
  border-radius: $ios-radius-full;
  padding: $ios-spacing-xs;
}

.btn-toggle {
  padding: $ios-spacing-sm $ios-spacing-xl;
  border: none;
  border-radius: $ios-radius-full;
  background-color: transparent;
  color: $ios-text-secondary;
  font-size: $ios-font-size-sm;
  font-weight: $ios-font-weight-medium;
  cursor: pointer;
  transition: $ios-feedback-tap;
  font-family: $ios-font-family;
  outline: none;
}

.btn-toggle.active {
  background-color: $ios-card-background;
  color: $ios-primary;
  box-shadow: $ios-shadow-sm;
}

.btn-toggle:hover:not(.active) {
  opacity: 0.8;
}

.btn-toggle:active {
  transform: scale(0.97);
}

.skill-legend {
  display: flex;
  gap: $ios-spacing-md;
  justify-content: center;
  margin-bottom: $ios-spacing-xl;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: $ios-font-size-sm;
  color: $ios-text-secondary;
  font-family: $ios-font-family;
}

.legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: $ios-spacing-xs;
  border-radius: $ios-radius-full;
  box-shadow: $ios-shadow-sm;
}

.radar-chart-wrapper {
  width: 100%;
  height: 300px;
  margin-bottom: $ios-spacing-xl;
  position: relative;
  background-color: $ios-background-secondary;
  border-radius: $ios-radius-md;
  padding: $ios-spacing-lg;
  border: 1px solid $ios-border;
}

.radar-chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* 技能分析区域 */
.skill-analysis {
  margin-bottom: $ios-spacing-xl;
  background-color: $ios-background-secondary;
  border-radius: $ios-radius-md;
  padding: $ios-spacing-lg;
  border: 1px solid $ios-border;
}

.skill-analysis h4 {
  font-size: $ios-font-size-base;
  color: $ios-text-primary;
  font-weight: $ios-font-weight-medium;
  margin-bottom: $ios-spacing-md;
  font-family: $ios-font-family;
}

.analysis-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: $ios-spacing-md;
}

.analysis-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  gap: $ios-spacing-xs;
}

.skill-name {
  width: auto;
  font-size: $ios-font-size-sm;
  color: $ios-text-secondary;
  font-weight: $ios-font-weight-medium;
  flex-shrink: 0;
  font-family: $ios-font-family;
}

.skill-score {
  flex: 1;
  display: flex;
  align-items: center;
  gap: $ios-spacing-sm;
}

.score-bar {
  flex: 1;
  height: 8px;
  background-color: $ios-background-tertiary;
  border-radius: $ios-radius-full;
  position: relative;
  overflow: hidden;
}

.current-score {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: $ios-primary;
  border-radius: $ios-radius-full;
  transition: width 0.5s ease-out;
}

.score-info {
  display: flex;
  justify-content: space-between;
  font-size: $ios-font-size-xs;
  color: $ios-text-tertiary;
  margin-top: $ios-spacing-xs;
}

.target-score {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: $ios-success;
  opacity: 0.3;
  border-radius: $ios-radius-full;
}

.score-text {
  font-size: $ios-font-size-sm;
  font-weight: $ios-font-weight-medium;
  color: $ios-text-primary;
  width: 40px;
  text-align: right;
  font-family: $ios-font-family;
}

.target-text {
  font-size: $ios-font-size-xs;
  color: $ios-text-tertiary;
  font-family: $ios-font-family;
}

.skill-rating {
  width: 60px;
  text-align: right;
  font-size: $ios-font-size-sm;
  font-weight: $ios-font-weight-medium;
  font-family: $ios-font-family;
}

.rating-high {
  color: $ios-success;
}

.rating-medium {
  color: $ios-warning;
}

.rating-low {
  color: $ios-danger;
}

/* 提升建议区域 */
.improvement-suggestions {
  margin-top: $ios-spacing-xl;
  background-color: color-mix(in srgb, $ios-primary 5%, transparent);
  border-radius: $ios-radius-md;
  padding: $ios-spacing-lg;
  border: 1px solid color-mix(in srgb, $ios-primary 20%, transparent);
}

.improvement-suggestions h4 {
  margin: 0 0 $ios-spacing-sm 0;
  font-size: $ios-font-size-base;
  color: $ios-primary;
  font-weight: $ios-font-weight-medium;
  font-family: $ios-font-family;
}

.suggestion-list {
  margin: 0;
  padding-left: $ios-spacing-lg;
}

.suggestion-list li {
  font-size: $ios-font-size-sm;
  color: $ios-text-secondary;
  line-height: 1.6;
  margin-bottom: $ios-spacing-xs;
  font-family: $ios-font-family;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .skill-radar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: $ios-spacing-md;
  }

  .view-toggle {
    width: 100%;
    justify-content: center;
  }

  .analysis-items {
    grid-template-columns: 1fr;
  }

  .radar-chart-wrapper {
    height: 250px;
  }

  .improvement-suggestions {
    padding: $ios-spacing-md;
  }

  .radar-legend {
    width: 100%;
    justify-content: space-between;
  }

  .analysis-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .skill-name {
    width: auto;
  }

  .skill-score {
      width: 100%;
    }
}