* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #eee;
  font-family: system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

#toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  background: #1c1c1c;
  border-bottom: 1px solid #333;
  flex: 0 0 auto;
}

#toolbar .title {
  font-weight: 600;
}

#toolbar .interval,
#toolbar .shuffle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

#toolbar .shuffle {
  cursor: pointer;
  user-select: none;
}

#toolbar input[type="number"] {
  width: 56px;
  padding: 3px 6px;
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
}

#toolbar .hint {
  margin-left: auto;
  font-size: 12px;
  color: #999;
}

/* 全画面表示中は上部ツールバーを隠す（ESCキーで全画面解除） */
:fullscreen #toolbar,
:-webkit-full-screen #toolbar {
  display: none;
}

button {
  padding: 6px 12px;
  background: #2f6fed;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

button:hover {
  background: #3a7bff;
}

button:disabled {
  background: #444;
  color: #999;
  cursor: default;
}

#screens {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  min-height: 0;
}

.panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background: #000;
  overflow: hidden;
}

.panel + .panel {
  border-left: 2px solid #333;
}

.panel video {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  width: auto;
  transform: translate(-50%, -50%);
  background: #000;
  display: block;
}

.panel .controls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  opacity: 0.25;
  transition: opacity 0.2s;
}

.panel:hover .controls {
  opacity: 1;
}

.panel .status {
  font-size: 12px;
  color: #ddd;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
