#faceit-widget-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 100%;
  max-width: 420px;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#faceit-widget-container.loading {
  opacity: 0;
  transform: scale(0.98);
}

.faceit-widget-toggle {
  width: 36px;
  height: 5px;
  background-color: #282828;
  border-radius: 2.5px;
  transition: transform 0.4s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

.faceit-widget-toggle:hover {
  background-color: #3f3f3f;
}

.faceit-widget {
  width: 100%;
  background-color: #111113;
  border-radius: 8px;
  border: 1px solid #282828;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, opacity 0.4s ease-in-out, transform 0.4s ease-in-out, border-width 0.1s linear;
  max-height: 1000px;
  opacity: 1;
  transform: scaleY(1);
  transform-origin: top;
  color: #f2f2f2;
}

#faceit-widget-container.collapsed {
  gap: 0;
}

#faceit-widget-container.collapsed .faceit-widget-toggle {
  transform: rotate(180deg);
}

#faceit-widget-container.collapsed .faceit-widget {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  border-width: 0;
}

.faceit-banner {
  height: 100px;
}
.faceit-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faceit-content {
  padding: 0 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.faceit-header {
  display: flex;
  justify-content: center;
  margin-top: -48px;
}

.faceit-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}

.faceit-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #111113;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

.faceit-info-container {
  display: flex;
  justify-content: center;
}

.faceit-nickname {
  color: #f2f2f2;
  font-weight: 600;
  font-size: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.faceit-country {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}

.faceit-rank-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.faceit-level-img {
  width: 40px;
  height: 40px;
}
.faceit-level-svg-wrapper {
  width: 40px;
  height: 40px;
}
.faceit-level-svg {
  width: 100%;
  height: 100%;
}

.faceit-elo {
  text-align: center;
}

.faceit-elo-value-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.faceit-elo-icon {
  width: 20px;
  height: 20px;
  color: #b9bbbe;
}

.faceit-elo-icon svg {
  width: 100%;
  height: 100%;
}

.faceit-elo-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.faceit-elo-label {
  font-size: 0.75rem;
  color: #b9bbbe;
  text-transform: uppercase;
  margin-top: 4px;
}

.faceit-main-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  text-align: center;
}

.faceit-stat {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 6px;
}

.faceit-stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #a85db9;
}

.faceit-stat-label {
  font-size: 0.75rem;
  color: #b9bbbe;
  text-transform: uppercase;
  margin-top: 4px;
}

.faceit-recent-matches {
  margin-top: 8px;
}

.faceit-recent-matches-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #b9bbbe;
  margin-bottom: 8px;
  text-align: center;
}

.matches-list {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.match-result {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
}
.match-result.win { background-color: #3ba55d; }
.match-result.loss { background-color: #ed4245; }

.faceit-error {
  padding: 20px;
  text-align: center;
  color: #ed4245;
}
.faceit-error p { margin: 0; }

@media (max-width: 480px) {
  #faceit-widget-container {
    bottom: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
  }
  .faceit-banner {
    height: 75px;
  }
  .faceit-header {
    margin-top: -42px;
  }
  .faceit-avatar-wrapper {
    width: 84px;
    height: 84px;
  }
  .faceit-nickname {
    font-size: 1.1rem;
  }
}