body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: 'Noto Sans KR', Tahoma, Helvetica, Arial, sans-serif;
}

cast-media-player {
  --background-color: #000;
  --theme-hue: 320;
  --break-color: #FF0099;
  --progress-color: #FF0099;
  --ad-marker-color: #FF0099;
}

#debug-log {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: 72vw;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
  display: none;
}

#debug-log::-webkit-scrollbar { display: none; }
#debug-log.visible { display: block; }
#debug-log .log-entry { margin: 2px 0; word-break: break-all; }
#debug-log .log-entry.error { color: #ff6b6b; }
#debug-log .log-entry.warn  { color: #ffd93d; }

#error-screen {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.97);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5vh 5vw;
  z-index: 200;
  box-sizing: border-box;
  pointer-events: none;
}
#error-screen.visible { display: flex; }
#error-screen .es-icon {
  font-size: 96px;
  color: #FF0099;
  margin-bottom: 32px;
  line-height: 1;
}
#error-screen .es-title {
  color: #f0f6fc;
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
#error-screen .es-body {
  color: #b8bdc6;
  font-size: 24px;
  line-height: 1.5;
  margin: 0;
  max-width: 800px;
  white-space: pre-line;
}
#error-screen .es-detail {
  color: #6e7681;
  font-size: 14px;
  margin-top: 32px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

#manifest-pane {
  position: absolute;
  top: 0;
  right: 0;
  width: 24vw;
  height: 75vh;
  overflow-y: auto;
  scrollbar-width: none;
  background: rgba(0, 0, 0, 0.85);
  padding: 8px 12px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  color: #cfd2d6;
  display: none;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-all;
  box-sizing: border-box;
}

#manifest-pane::-webkit-scrollbar { display: none; }
#manifest-pane.visible { display: block; }
#manifest-pane .mf-line { padding: 1px 4px; }
#manifest-pane .mf-line.current {
  background: rgba(255, 0, 153, 0.5);
  color: #fff;
  font-weight: 600;
}

#up-next-card {
  position: fixed;
  right: 5vw;
  bottom: 12vh;
  width: 32vw;
  max-width: 520px;
  min-width: 420px;
  display: flex;
  flex-direction: row;
  align-items: center;
  background: rgba(18, 18, 18, 0.85);
  border-radius: 6px;
  padding: 10px 12px;
  gap: 12px;
  z-index: 150;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s 220ms;
}
#up-next-card.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 0s 0s;
}

#up-next-card .upn-thumb {
  flex: 0 0 auto;
  width: 160px;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: 3px;
}

#up-next-card .upn-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

#up-next-card .upn-countdown {
  color: #FF0099;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  white-space: nowrap;
}

#up-next-card .upn-title {
  color: #f0f6fc;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
