* {
  box-sizing: border-box;
}

/* Set a background color */
body {
  background-color: #b8b8ba;
  font-family: Helvetica, sans-serif;
}

/* The actual timeline (the vertical ruler) */
.timeline {
  position: relative;
  padding: 20px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
}

.timeline-content {
  background-color: #f9f9f9;
  padding: 20px;
  position: relative;
  border-radius: 8px;
  border: 1px solid black;
}

.timeline-content-match {
  background-color: rgb(69, 69, 69);
  color: white;
  min-width: 100px;
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 30px;
  padding-right: 30px;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px;
  border: 1px solid purple;
  text-align:center;
}
.match:first-child {
  margin-top: -20px;
}
.match:last-child {
  margin-bottom: -20px;
}

.score-panel {
  font-size: 20px;
  color: white;
  background-color: gray;
  padding: 5px 10px 5px 10px;
  position: absolute;
  left: 50.1%;
  border-radius: 8px;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #f00;
  /* background-color: #ff6347; */
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.icon {
  position: absolute;
  left: 50.1%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: black;
  /* Set the color of the icon */
  z-index: 1;
  /* Ensure the icon appears above the panel */
}
.yc {
  color: yellow;
}
.rc {
  color: red;
}

.away+.icon {
  color: red;
}

.away {
  margin-left: auto;
}

.timeline:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px solid black;
}

@media screen and (min-width: 768px) {
  .timeline-item {
    flex-direction: row;
    justify-content: space-between;
  }

  .timeline-content {
    width: 45%;
  }
}