@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --left-bg-color: rgba(87, 84, 236, 0.7);
  --right-bg-color: rgba(43, 43, 43, 0.8);
  --left-btn-hover-color: rgba(87, 84, 236, 1);
  --right-btn-hover-color: rgba(28, 122, 28, 1);
  --active-width: 70%;
  --other-width: 30%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  height: 100vh;
  overflow: hidden;
}

.container {
  position: relative;
  width: 100%;
  height: 100%;
}

h1 {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4rem;
  color: #fff;
  white-space: nowrap;
}

.btn {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  border: 0.2rem solid #fff;
  width: 15rem;
  font-size: 1rem;
  padding: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
}

.split {
  position: absolute;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.split.left {
  position: absolute;
  left: 0;
  background: url("images/ps.jpg");
  background-repeat: no-repeat;
  background-size: cover;
}

.split.left::before {
  content: "";
  position: absolute;
  background-color: var(--left-bg-color);
  width: 100%;
  height: 100%;
}

.split.right {
  position: absolute;
  right: 0;
  background: url("images/xbox.jpg");
  background-repeat: no-repeat;
  background-size: cover;
}

.split.right::before {
  content: "";
  position: absolute;
  background-color: var(--right-bg-color);
  width: 100%;
  height: 100%;
}

.split.left .btn:hover {
  background-color: var(--left-btn-hover-color);
  border-color: var(--left-btn-hover-color);
}

.split.right .btn:hover {
  background-color: var(--right-btn-hover-color);
  border-color: var(--right-btn-hover-color);
}

.left-active .left {
  width: var(--active-width);
}

.left-active .right {
  width: var(--other-width);
}

.right-active .right {
  width: var(--active-width);
}

.right-active .left {
  width: var(--other-width);
}

.split.left,
.split.right,
.split.left::before,
.split.right::before {
  transition: all 1s ease;
}

@media (max-width: 800px) {
  h1 {
    font-size: 2rem;
    top: 40%;
  }

  .btn {
    padding: 1.2rem;
    width: 12rem;
  }
}
