@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fadein {
  animation: fadeIn 2s ease-in;
}

.fadeout {
  opacity: 0;
  transition: opacity 2s ease-out;
}

html {
  position: relative;
  width: 100%;
  height: 100%;
  font-family: sans-serif;
  font-size: calc(1.1vw * var(--ui-size-multiplier, 1));
}

body {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000 no-repeat center center;
  background-size: contain;
  margin: 0;
}

body.idle {
  background-image: var(--standby-background-image);
}

#logo-spinner-container {
  position: fixed;
  left: 3vw;
  bottom: 3vw;
}

#logo-spinner {
  display: block;
  margin: auto;
  width: 3rem;
  height: 3rem;
  content: url(../images/spinner.png);
  animation: spin 1s infinite linear;
}

#app-version {
  position: fixed;
  right: 3vw;
  bottom: 3vw;
  font-size: 1rem;
  color: #fff;
  opacity: 0.01;
  filter: drop-shadow( 3px 3px 2px rgba(0, 0, 0, .7));
}

body.idle #app-version {
  opacity: 1;
}

#standby-message {
  display: none;
  position: fixed;
  left: 3.3vw;
  bottom: 2.2vw;
  padding-left: 4.5rem;
  color: #fff;
  font-size: 2rem;
  background: url(../images/googlecast.svg) no-repeat left center;
  background-size: 3rem;
  filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, .7));
}

body.idle #standby-message {
  display: block;
}

.playback {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

#toast {
  position: fixed;
  top: 4.3%;
  left: 21%;
  min-height: 3rem;
  width: 58%;
  box-sizing: border-box;
  padding: 24px;
  text-align: center;
  letter-spacing: normal;
  word-wrap: break-word;
  white-space: pre-wrap;
  color: white;
  border-radius: 55px;
  background-color: grey;
  opacity: 0.7;
}

#debug-board {
  position: fixed;
  top: 0.5rem;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 70%;
  box-sizing: border-box;
  font-size: 0.7rem;
  color: white;
  background-color: #3a3b3d;
  opacity: 0.7;
  display: none;
}

#display-board {
  position: fixed;
  box-sizing: border-box;
  width: 100%;
  height: 75%;
  bottom: 0;
  z-index: 2;
}

#board-background {
  position: fixed;
  opacity: 0.7;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000000);
  width: 100%;
  height: 100%;
}

.page {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
}
/*==================================================*/
/* current media information                        */
/*==================================================*/
#current-info {
  padding: 3.75vw 5.3vw;
  flex-direction: column;
  justify-content: flex-end;
}

#metadata-comp {
  margin-bottom: 3%;
}

.playing-ad #metadata-comp {
  display: none;
}

#title {
  color: white;
  font-size: 2.84rem;
  font-weight: 500;
}

#subtitle {
  color: white;
  font-size: 1.4rem;
  /* display: none; */
}

#title, #subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#status-icon-comp{
  position: relative;
  margin-right: 2%;
  width: 3.41rem;
  height: 3.41rem;
}

#status-icon {
  display: none;
  width: inherit;
  height: inherit;
}

#status-icon.playing {
  display: inline-block;
  content: url(../images/play.png);
}

#status-icon.buffering {
  display: inline-block;
  content: url(../images/spinner.png);
  animation: spin 1s infinite linear;
}

#status-icon.paused {
  display: inline-block;
  content: url(../images/pause.png);
}

#progress-bar {
  background-color: rgba(255, 255, 255, 0.3);
  height: 0.7rem;
  width: 100%;
  margin-bottom: 0.7rem;
  overflow: hidden;
}

#progress {
  height: inherit;
  background-color: var(--primary-light, #79b5fb);
}

#progress.live {
  width: 100%;
}

@keyframes progress-loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

#progress.loading {
  animation: progress-loading 2s linear infinite;
}

.playing-ad #progress {
  background-color: #f7983c;
}

#time-row {
  height: 1rem;
  flex: 0;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: calc(1.4rem * var(--timestamp-font-size-multiplier, 1));
}

.time {
  color: white;
  display: inline-block;
}

#live-mark:not(.hidden) {
  padding: 0 0.8rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  color: white;
  border: 1px solid #fff;
  border-radius: 0.3rem;
  font-size: 0.9rem;
}

.dot {
  margin-right:0.8rem;
  width: 1.4rem;
  height: 0.9rem;
  background-color: #f00;
  -webkit-mask-image: url(../images/liveIcon.svg);
  -webkit-mask-size: cover;
}

#ad-info {
  display: flex;
  box-sizing: border-box;
  height: 100%;
  padding: 8.3vw;
}

#ad-status {
  align-self: flex-start;
  margin-bottom: 2vw;
  padding: 0.5vw;
  color: #fff;
  font-size: 2vw;
}

.playing-ad #ad-status {
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.6);
  transition: transform 0.5s ease-out;
}

.playing.playing-ad #ad-status {
  transform: translateY(4.5rem);
  transition: transform 1s ease-in 3s;
}

/*==================================================*/
/* next media information                           */
/*==================================================*/
#next-info {
  justify-content: flex-end;
  padding: 8.3vw;
}

#next-description {
  color: white;
  justify-content: flex-end;
  align-items: flex-end;
}

#next-prefix {
  font-size: 1.4rem;
  font-weight: bold;
}

#next-title {
  font-size: calc(2rem, var(--title-font-size-multiplier));
  font-weight: bold;
}

#next-thumbnail-container {
  flex-basis: 25%;
  margin-left: 1%;
  align-self: flex-end;
}

#next-thumbnail {
  width: 100%;
}
/*==================================================*/
/* common attribute classes                         */
/*==================================================*/
.display-page {
  display: flex;
}

.flex-box {
  flex: none;
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-grow {
  flex-grow: 1;
}

.hidden {
  display: none;
}

#dai-ad-container {
  opacity: 0;
}

body.idle #watermark {
  opacity: 0;
}

#watermark {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  padding: 0px 24px;
  width: 100%;
  font-size: 12px;
  text-align: left;
  color: var(--primary-highlight, #79b5fb);
}

#watermark div {
  background-color: unset;
  border-radius: 4px;
  padding: 4px;
  max-width: 90px;
  box-sizing: border-box;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: var(--watermark-transform);
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}

