:root {
  --primary-color: #027c43;
  --font-color: #fff;
}

html {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #1b3a4b;
  background-image: url("data:image/svg+xml,%3Csvg width='44' height='12' viewBox='0 0 44 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 12v-2L0 0v10l4 2h16zm18 0l4-2V0L22 10v2h16zM20 0v8L4 0h16zm18 0L22 8V0h16z' fill='%23000000' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Helvetica, sans-serif;
}

.player {
  max-width: 70vw;
  min-width: 800px;
  border: 5px solid #fff;
  background: #000;
  position: relative;
  cursor: pointer;
}

.video {
  border-radius: 5px;
  width: 100%;
  height: auto;
}

.fas {
  color: #fff;
  font-size: 35px;
  cursor: pointer;
}
.fas:hover {
  color: var(--primary-color);
}

/* containers */
.show-controls {
  width: 100%;
  height: 30%;
  z-index: 2;
  position: absolute;
  bottom: 0;
  cursor: default;
}

.controls-container {
  position: absolute;
  bottom: -5px;
  width: 100%;
  height: 88px;
  margin-top: -95px;
  background-color: rgba(15, 137, 141, 0);
  z-index: 5;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transform: all 0.5s ease-out 2s;
}
.show-controls:hover .controls-container {
  opacity: 1;
  transform: all 0.2s ease-out;
}

.control-group {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
}
.controls-left,
.controls-right {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  top: 40px;
}

/* Progress Bar */
.progress-range {
  height: 8px;
  width: calc(100% - 30px);
  background: rgba(202, 202, 202, 0.5);
  margin: auto;
  border-radius: 10px;
  position: absolute;
  left: 15px;
  top: 15px;
  cursor: pointer;
  transition: height 0.1s ease-in-out;
}

.progress-range:hover {
  height: 10px;
}

.progress-bar {
  background: var(--primary-color);
  width: 50%;
  height: 100%;
  border-radius: 10px;
  transition: all 0.5s ease;
}
/* Left Controls ------*/
.controls-left {
  justify-content: flex-start;
  margin-left: 15px;
}

/* Play & Pause */
.play-controls {
  margin-right: 15px;
}

.fa-play:hover,
.fa-pause:hover {
  color: Var(--primary-color);
  cursor: pointer;
}

/* Volume */
.volume-icon {
  cursor: pointer;
}

.volume-range {
  height: 8px;
  width: 100px;
  background: rgba(70, 70, 70, 0.5);
  border-radius: 10px;
  position: relative;
  top: -21px;
  left: 50px;
  cursor: pointer;
}

.volume-bar {
  background: var(--font-color);
  width: 100%;
  height: 100%;
  border-radius: 10px;
  transition: width 0.2s ease-in;
}

.volume-bar:hover {
  background: var(--primary-color);
}

/* Right Controls ----------- */
.controls-right {
  justify-content: flex-end;
  margin-right: 15px;
}
.speed,
.time {
  position: relative;
  top: 10px;
}

/* Playback Speed */
.speed {
  margin-right: 15px;
}
select,
option {
  cursor: pointer;
}

select {
  background: transparent;
  color: var(--font-color);
  border: none;
  font-size: 18px;
  position: relative;
  top: -2.5px;
  border-radius: 5px;
}
select:focus {
  outline: none;
}

select > option {
  background: rgba(0, 0, 0, 0.9);
  border: none;
  font-size: 14px;
}

/* Elapsed Time & Duration */
.time {
  margin-right: 15px;
  color: var(--font-color);
  font-weight: bold;
  user-select: none;
}
/* fullscreen */
.fullscreen {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}
/* Media Query: Large Smartphone (Vertical) */
@media screen and (max-width: 600px) {
  .player {
    min-width: 0;
    max-width: 95vw;
  }
  .fas {
    font-size: 20px;
  }
  .controls-container {
    height: 50px;
  }
  .control-group {
    position: relative;
    top: -25px;
  }
  .progress-range {
    width: 100%;
    top: 0;
    left: 0;
    border-radius: 0;
  }
  .progress-bar {
    border-radius: 0;
  }
  .volume-range {
    width: 50px;
    left: 30px;
    top: -15px;
  }
  .speed,
  .time {
    top: 3px;
  }
  select {
    font-size: 12px;
  }
  .time {
    font-size: 12px;
  }
}
/* Media Query: Large Smartphone (Horizontal) */
@media screen and (max-width: 900px) and (max-height: 500px) {
  .player {
    max-height: 95vh;
    max-width: auto;
  }

  video {
    height: 95vh;
    object-fit: cover;
  }

  .video-fullscreen {
    height: 97.5vh;
    border-radius: 0;
  }
}
