#team-ranking-widget {
  background: #ffffff; /* Pure white background for a crisp look */
  border: none; /* Remove default border */
  border-radius: 12px; /* More rounded corners for a softer card feel */
  padding: 20px; /* Increase padding for more breathing room */
  font-family: 'Segoe UI', Arial, sans-serif; /* A slightly more modern font */
  max-width: 100%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* Stronger, more noticeable shadow */
  overflow: hidden; /* Ensures content stays within rounded corners */
}

#team-ranking-widget h3 {
  margin-top: 0;
  font-size: 1.5em; /* Slightly larger heading */
  margin-bottom: 20px; /* More space below heading */
  border-bottom: 2px solid #e0e0e0; /* Lighter border for subtlety */
  padding-bottom: 12px;
  color: #333;
  text-align: center; /* Center the title */
  font-weight: 600; /* Bolder heading */
}

.tabs {
  display: flex;
  justify-content: center; /* Center the tabs */
  margin-bottom: 25px; /* More space below tabs */
  gap: 15px; /* Increase gap between tabs */
  border-radius: 8px; /* Rounded corners for the tab container */
  background-color: #f5f5f5; /* Light background for the tab container */
  padding: 5px; /* Padding inside the tab container */
}

.tab {
  padding: 8px 18px; /* More padding for larger click area */
  background: transparent; /* Transparent background by default */
  border: none;
  cursor: pointer;
  font-size: 15px; /* Slightly larger tab text */
  border-radius: 6px; /* Rounded corners for individual tabs */
  color: #555;
  font-weight: 500; /* Medium font weight */
  transition: all 0.3s ease; /* Smooth transition for hover and active states */
  position: relative; /* For the active indicator */
}

.tab:hover {
  background: #e9e9e9; /* Light hover background */
  color: #333;
}

.tab.active {
  background: #4CAF50;
  color: white;
  font-weight: 600; /* Bolder for active tab */
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); /* Subtle shadow for active tab */
}

.tab-content {
  display: none;
  padding-top: 5px; /* Small padding at the top of content */
}

.team-bar {
  margin-bottom: 10px; /* Slightly more space between bars */
  display: flex;
  align-items: center;
  background-color: #f9f9f9; /* Light background for each team row */
  border-radius: 8px; /* Rounded corners for team rows */
  padding: 8px 10px; /* Padding within each team row */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03); /* Very subtle shadow for each row */
  transition: transform 0.2s ease-in-out; /* Slight hover effect */
}

.team-bar:hover {
  transform: translateY(-2px); /* Lift effect on hover */
}

.label {
  margin-right: 12px; /* More space between flag and bar */
  display: flex;
  align-items: center;
  color: #333;
  font-weight: bold;
  flex-shrink: 0;
}

.label .flag {
  font-size: 1.8em; /* Slightly larger flag */
  line-height: 1; /* Ensure flag aligns well */
}

.bar-container {
  background: #e9e9e9; /* Lighter background for the track */
  border-radius: 12px; /* More rounded track */
  overflow: hidden;
  height: 28px; /* Slightly increased height for readability */
  flex-grow: 1;
}

.bar {
  background: linear-gradient(to right, #66BB6A, #4CAF50); /* More vibrant gradient */
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px; /* More padding inside the bar */
  border-radius: 12px; /* Match bar container radius */
  font-size: 13px; /* Slightly larger font inside bar */
  line-height: 28px; /* Vertically center text based on new height */
  transition: width 0.8s ease-out, background 0.3s ease; /* Add transition for background for potential future use */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15); /* More pronounced inner shadow */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600; /* Bolder text inside bar */
  height: 28px; /* Ensure height matches bar-container */
}