:root {
  --ticker-height: 6vh;
  --stage-bg: #000;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--stage-bg);
  color: #fff;
  font-family: system-ui, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  cursor: none;
}

#container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--stage-bg);
}

#ad-player {
  position: absolute;
  top: var(--ticker-height);
  bottom: var(--ticker-height);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: none;
}

.media.is-active { display: block; }

#media-placeholder {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 4vh;
  color: #bbb;
  padding: 2vh;
  flex-direction: column;
  gap: 1vh;
}
#media-placeholder.is-active { display: flex; }
#media-placeholder .ph-name { color: #fff; font-weight: 700; }
#media-placeholder .ph-meta { font-size: 2.4vh; color: #888; }

/* Ticker / 跑馬燈（對應 ScrollTextView） */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--ticker-height);
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  background: #111;
  color: #ff0;
  font-size: 4vh;
  z-index: 10;
}
.ticker--top { top: 0; }
.ticker--bottom { bottom: 0; }

.ticker__run {
  display: inline-block;
  padding-left: 100%;
  will-change: transform;
  animation: ticker-scroll linear infinite;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

#sleep-view {
  position: absolute;
  inset: 0;
  background: #000;
  display: none;
  z-index: 20;
}
#sleep-view.is-active { display: block; }

#status {
  position: absolute;
  right: 8px;
  bottom: calc(var(--ticker-height) + 6px);
  font-size: 12px;
  color: #6f6;
  opacity: 0.7;
  z-index: 15;
  white-space: pre;
  text-align: right;
}
#status.is-hidden { display: none; }
