/* StreamTranslate Twitch Extension — Video Overlay */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  pointer-events: none; /* let clicks pass through to video */
}

#subtitle-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  text-align: center;
  z-index: 9999;
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Position variants */
#subtitle-container.pos-bottom {
  bottom: 8%;
}

#subtitle-container.pos-top {
  top: 8%;
}

#subtitle-container.pos-middle {
  top: 50%;
  transform: translate(-50%, -50%);
}

.subtitle-line {
  display: inline-block;
  padding: 6px 16px;
  margin: 3px 0;
  border-radius: 6px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 100%;
  word-wrap: break-word;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.subtitle-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.subtitle-line.original {
  font-size: 16px;
  color: #ccc;
  background: rgba(0, 0, 0, 0.55);
}

.subtitle-line.translated {
  font-size: 22px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  font-weight: 600;
}

/* Translation-only mode: hide original */
.trans-only .subtitle-line.original {
  display: none;
}

/* When there's no text, hide fully */
.subtitle-line:empty {
  display: none;
  opacity: 0;
}

/* Powered by badge — subtle */
#st-badge {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  z-index: 10000;
  transition: color 0.2s;
}

#st-badge:hover {
  color: rgba(255,255,255,0.6);
}
