@media (pointer: coarse)  {
  /* device */
  html, body {
    margin: 0;
  }
}

@media (pointer: fine), (pointer: none) {
  /* desktop */
  html, body {
    width: 66%;
    margin: 0 auto;
  }
}

body.fullscreen-mode {
  /* hide/disable scroll when in fullscreen-mode */
  overflow: hidden;
}

.top-banner {
  border: 1px solid black;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* height: 100px; */
  padding: 10px;
  background-color: #333333;
  color: white;
  font-size: 4em;
  text-align: center;
}

.top-banner > * {
  margin: 10px;
}

.top-banner > a:first-child {
  font-weight: 700;
}

.top-banner > a:last-child {
  visibility: hidden;
}

.primary {
  background-color: black;
  border: 1px solid black;
}

.player {
  margin: 0;
  /* background-color: lightblue; */
  border: 1px solid black;
  position: relative;
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
  user-select: none;
  touch-action: manipulation;
}

body.fullscreen-mode .player {
  background-color: black;
  margin: 0;
  padding: 0;
  border: 0;
  position: fixed;
  z-index: 10000;
}

@media (pointer: coarse) and (orientation: portrait) {
  /* portrait device */
  body.fullscreen-mode .player {
    top: 0;
    left: 0;
    width: 100dvh;
    height: 100dvw;
    transform-origin: top left;
    transform: rotate(90deg) translateY(-100%);
  }
}

@media (pointer: fine), (pointer: none), (orientation: landscape) {
  /* desktop and landscape device */
  body.fullscreen-mode .player {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    /* width: 100vw; */
    /* height: 100vh; */
  }
}

.player .tool {
  background-color: var(--ytc-gray-200);
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  z-index: 75;

  flex: 1;
  overflow: hidden;
}

.player .tool .bpm-tool {
  width: 100%;
  height: 100%;
}

@media (pointer: coarse)  {
  /* device */
  body.fullscreen-mode .player .tool {
    flex-direction: row;
  }
}

.player .tool .bpm-button {
  width: 4cm;
  height: 4cm;
  border: none;
  outline: none;
  margin: 0;
  background-color: var(--ytc-gray-200);
  transition-duration: 30ms;
  /* box-shadow: 0px 0px 8px 4px rgba(0,0,0,0.2); */
}

@media (pointer: coarse)  {
  /* device */
  body.fullscreen-mode .player .tool .bpm-tool {
    flex: 5;
  }
  body.fullscreen-mode .player .tool .bpm-button {
    width: 8cm;
    height: 8cm;
    flex: 1;
    margin-right: 1cm;
  }
}

.player .tool .bpm-button svg {
  /* filter: drop-shadow(0px 0px 8px rgb(0 0 0 / 0.2)); */
  filter: drop-shadow(2px 2px 6px rgb(256, 0, 0, 0.4));
}

.player .tool .bpm-button svg:active,
.player .tool .bpm-button svg.active {
  filter: drop-shadow(2px 2px 0.5px rgb(0, 0, 0, 0.2));
}

.player .controller {
  position: relative;
  bottom: 0px;
  background-color: black;
  margin: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
  transition: all 200ms ease-in-out;
  opacity: 0.3;
}

@media (pointer: fine), (pointer: none) {
  /* desktop */
  .player .controller {
    transition: all 200ms ease-in-out;
    opacity: 0.3;
  }

  .player:hover .controller {
    opacity: 1.0;
  }
}

@media (pointer: coarse)  {
  /* device */
  .player .controller {
    opacity: 0.65;
  }
}

.player .play-progress {
  background-color: #f30000;
  /* border-radius: 4px; */
  box-shadow: inset 0 0.5em 0.5em rgba(0, 0, 0, 0.05);
  height: 5px;
  /* margin: 2rem 0; */
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: auto;
}

.player .play-progress-bar {
  background-color: var(--ytc-gray-200);
  box-shadow: inset 0 0.5em 0.5em rgba(94, 49, 49, 0.05);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.player .play-progress-bar.active {
  transition: all 20000ms linear;
  transform: translateX(100%);
  -webkit-transform: translateX(100%)
}

.player .controller button {
  height: 2cm;
  width: 2cm;
  border: none;
  outline: none;
  background-color: black;
  padding: 0;
  /* z-index: 100; */
  cursor: pointer;
}

@media (pointer: coarse)  {
  /* device */
  .player .controller button {
    height: 3cm;
    width: 3cm;
  }
}

.controller button svg {
  fill: #fff;
  transition: all 0.25s;
}

.controller button svg:hover {
  animation-name: svg-blink-animation;
  animation-duration: 0.35s;
}

@keyframes svg-blink-animation {
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.controller button svg:active {
  transform: scale(0.9);
}

.controller .svg-button-shadow {
  stroke: white;
  stroke-opacity: .15;
  stroke-width: 2px;
  fill: none;
}

.controller .fullscreen-button {
  margin-left: auto;
  margin-top: auto;
}

.player .lock-screen {
  display: none; /* <-> flex */
  opacity: 0;
  transition: all 500ms ease-in-out;
  
  background-color: rgba(0, 0, 0, .3);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 2cm;
  right: 0;
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

@media (pointer: coarse)  {
  .player .lock-screen {
    bottom: 3cm;
  }
}

.player .lock-screen svg {
  fill: white;
  height: 33%;
}

hr {
  margin: 0;
  border-width: 1px;
  border-color: var(--ytc-gray-77);
}

@media (pointer: coarse)  {
  /* device */
  .text-contents {
    margin: 0 20px;
  }
}

.title {
  background-color: black;
  margin: 10px 0;
  font-size: 2em;
  color: white;
}

@media (pointer: coarse)  {
  /* device */
  .title {
    font-size: 16px;
  }
}

.action-bar-wrapper {
  overflow: hidden;
  height: 60px;
}

.action-bar {
  margin: 10px;
  display: flex;
  /* flex-direction: column; */
  justify-content: space-between;
  overflow: hidden;
  gap: 5px;
  overflow-x: scroll;
}

.action-bar .left-section,
.action-bar .right-section {
  display: flex;
  align-items: center;
  gap: 5px;
}

.action-bar button {
  width: auto;
  height: 24px;
  padding: 16px;
  border-width: 0;
  border-radius: 16px;
  background-color: var(--ytc-gray-55);

  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;

  fill: white;
}

.action-bar button>span {
  color: white;
}

.action-bar button:hover {
    background-color: #5b9e4d;
    box-shadow: 0 2px 4px 0 rgba(172, 170, 170, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.action-bar button:active {
  background-color: #5b9e4d;
}

.action-bar .thumbs {
  display: flex;
}

.action-bar .thumbs-up {
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
  border-right-width: 2px;
  border-right-color: rgba(0, 0, 0, 0.25);
}

.action-bar .thumbs-down {
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
  border-left-width: 2px;
  border-left-color: rgba(0, 0, 0, 0.25);
}

.action-bar .left-section .profile img {
  border-radius: 50px;
  /* enclosing anchor tag is a little bit larger than its content
     because of the white-space reserved for characters that go below the line like "y".
     hence making the content 'block' disables the unwanted white-space.
     ref: https://stackoverflow.com/questions/22786357/anchor-tag-is-larger-than-element-it-holds
  */
  display: block;
}

.tool-description {
  margin: 20px 0;
  padding: 10px;
  border-radius: 10px;
  background-color: var(--ytc-gray-55);
  color: white;

  cursor: pointer;
  white-space: pre-line;
  position: relative;
}

.tool-description.showless {
  overflow: hidden;
  height: 150px;
}

.tool-description.showless::after {
  position: absolute;
  content: "";
  left: 0px;
  top: 0px;
  height: 100%;
  width: 100%;
  background: linear-gradient(transparent, black);
  pointer-events: none;
}

#showmore {
  color: whitesmoke;
  display: none;
  position: absolute;
  bottom: 0;
}

#showmore.showless {
  display: inline;
}

#showless {
  color: whitesmoke;
}

#showless.showless {
  display: none;
}

.tool-reply {
  margin: 0 0 5vh 0;
  padding: 10px;
  color: white;
  background-color: var(--ytc-gray-55);
  border-radius: 10px;
}

#reply-title {
  font-size: 1.2em;
}

#reply-count {
  font-size: 0.8em;
  margin-left: 5px;
  color: var(--ytc-gray-200);
}

#reply-panel {
  display: flex;
  align-items: center;
  margin-top: 16px;
}

#user-logo {
  background-color: purple;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 15px;
  cursor: default;
}

.leave-comment {
  display: inline-block;
  background-color: var(--ytc-gray-77);
  margin: 0 0 0 10px;
  
  height: 20px;
  padding: 5px 20px;
  border-radius: 20px;
  color: var(--ytc-gray-200);

  flex-grow: 1;
}
