* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

#media-player {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
}

.media-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.01);
  transition: opacity 1s ease, transform 1.2s ease, visibility 1s ease;
}

.media-item.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

body.no-transition .media-item {
  transition: none !important;
  transform: scale(1) !important;
}

#empty-message {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: #999;
  background: #000;
  font-size: 1.1rem;
  line-height: 1.5;
}

#empty-message strong {
  color: #fff;
  font-size: 1.35rem;
}

#empty-message.active {
  display: flex;
}

#media-image,
#media-video {
  will-change: opacity, transform;
}

#attention-feed {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#attention-panel {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: min(92vw, 430px);
  padding: 0.8rem 0.95rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  pointer-events: none;
}

#attention-panel[data-state="locked"] {
  border-color: rgba(0, 230, 118, 0.75);
}

#attention-panel[data-state="error"] {
  border-color: rgba(255, 80, 80, 0.75);
}

.attention-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}

#attention-dot {
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #777;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

#attention-panel[data-state="idle"] #attention-dot,
#attention-panel[data-state="cooldown"] #attention-dot {
  background: #777;
}

#attention-panel[data-state="searching"] #attention-dot {
  background: #ffd60a;
}

#attention-panel[data-state="watching"] #attention-dot {
  background: #ff9f1c;
}

#attention-panel[data-state="locked"] #attention-dot {
  background: #00e676;
}

#attention-panel[data-state="error"] #attention-dot {
  background: #ff5050;
}

#attention-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#attention-detail {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
}

.attention-progress {
  overflow: hidden;
  width: 100%;
  height: 0.32rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

#attention-progress-fill {
  width: 0%;
  height: 100%;
  background: #ffd60a;
  border-radius: inherit;
  transition: width 0.16s linear, background 0.2s ease;
}

#attention-panel[data-state="watching"] #attention-progress-fill {
  background: #ff9f1c;
}

#attention-panel[data-state="locked"] #attention-progress-fill {
  background: #00e676;
}

#attention-panel[data-state="error"] #attention-progress-fill {
  background: #ff5050;
}

@media (max-width: 520px) {
  #attention-panel {
    bottom: 0.75rem;
    padding: 0.7rem 0.8rem;
  }

  #attention-label {
    font-size: 0.84rem;
  }

  #attention-detail {
    font-size: 0.66rem;
  }
}
