#twitch-live-container {
  position: fixed;
  top: 180px;
  right: 10px;
  width: 360px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stream-wrapper {
  width: 340px;
  height: 200px;
  background: #000;
  border: 2px solid #9146ff;
  border-radius: 8px;
  position: relative;
}

.stream-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 10;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}

#twitch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 20px;
  background-color: #9146ff;
  color: white;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(145, 70, 255, 0.32);
}

#twitch-button:hover,
#twitch-button:focus-visible {
  filter: brightness(1.08);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: red;
  animation: blink 1s infinite;
}

.stream-widget__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 25px;
}

.stream-widget__title {
  position: absolute;
  top: -22px;
  left: 0;
  width: 100%;
  padding: 2px 0;
  border-radius: 6px 6px 0 0;
  background: #9146ff;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 575.98px) {
  #twitch-live-container {
    top: auto;
    right: 10px;
    bottom: 14px;
    left: 10px;
    width: auto;
    align-items: flex-end;
  }

  .stream-widget__item,
  .stream-wrapper {
    width: min(340px, calc(100vw - 20px));
  }
}
