/* Estilos personalizados para la gráfica */
.race-chart-wrapper {
  max-width: 1000px;
  margin: auto;
  font-family: "Segoe UI", sans-serif;
  padding: 40px 20px;
  position: relative;
}
.race-chart-header {
  display: flex;
  justify-content: space-around;
  font-weight: bold;
  font-size: 14px;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}
.bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.bar-label {
  width: 180px;
  text-align: left;
  font-weight: bold;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar {
  flex: 1;
  height: 30px;
  display: flex;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f1f1;
}
.bar-segment {
  height: 100%;
  transition: width 0.8s ease;
  animation: grow 1s ease forwards;
}
.youtube {
  background: #ed602b;
}
.instagram {
  background: #ed81ef;
}
.facebook {
  background: #4aa6eb;
}
.tiktok {
  background: #63b859;
}
.bar-total {
  width: 80px;
  text-align: right;
  font-weight: bold;
  font-size: 13px;
  color: #333;
  margin-left: 10px;
}
.chart-controls {
  text-align: center;
  margin-bottom: 20px;
}
.chart-controls .filter-btn {
  border: none;
  padding: 8px 14px;
  margin: 7px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: white;
}
.filter-btn.youtube {
  background-color: #ed602b;
}
.filter-btn.instagram {
  background-color: #ed81ef;
}
.filter-btn.facebook {
  background-color: #4aa6eb;
}
.filter-btn.tiktok {
  background-color: #63b859;
}
.filter-btn.all {
  background-color: #555;
}
.filter-btn.active {
  box-shadow: 0 0 0 2px #222 inset;
  opacity: 1;
  transform: scale(1.05);
}
.chart-controls .filter-btn i {
  color: white !important;
}
.chart-controls .filter-btn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}
.scale-line {
  position: absolute;
  bottom: -20px;
  left: 180px;
  right: 0;
  height: 1px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}
.scale-line span {
  position: relative;
}
.scale-line span::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 1px;
  height: 8px;
  background: #aaa;
}
@keyframes grow {
  from {
    width: 0%;
  }
  to {
    width: var(--target-width);
  }
}

.race-chart-header .fa-youtube {
  color: #ff0000;
}
.race-chart-header .fa-instagram {
  color: #c13584;
}
.race-chart-header .fa-facebook {
  color: #1877f2;
}
.race-chart-header .fa-tiktok {
  color: #000000;
}
