@import url("https://fonts.googleapis.com/css2?family=VT323&display=swap");

/* GENERAL ELEMENTS */

* {
  padding: 0;
  margin: 0;
  font-size: 14px;
  font-family: VT323 !important;
  user-select: none;
}
body,
html {
  height: 100vh;
  overflow: hidden !important;
  cursor: cell;
  background-color: #000;
}

/* BUILDINGS */

#buildings {
  display: flex;
  width: 100vw;
  justify-content: space-evenly;
  align-items: flex-end;
  flex-direction: row;
  height: 100vh;
  gap: 20px;
  padding: 0 30px;
}

.building {
  background: #333;
  background: url(../img/stone.webp);
  padding: 10px;
}

.building:nth-child(1) {
  height: 70vh;
}

.building:nth-child(2) {
  height: 80vh;
}

.building:nth-child(3) {
  height: 90vh;
}

.building:nth-child(4) {
  height: 70vh;
}

.windows {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  flex-wrap: wrap;
  padding: 10px;
  gap: 20px;
}

.window {
  background: #000;
  height: 20px;
  width: 10px;
}

[class="window on"] {
  background: #85e6c5;
}

/* BILLBOARD */

#billboard {
  position: relative;
  border-radius: 10px;
  background: #fff;
  height: 25%;
  width: 100%;
  margin: 0px auto;
  box-sizing: border-box;
  border: 2px solid #fff;
  box-shadow: 0px 0px 50px 0px #fff;
}

#billboard.off {
  box-shadow: none !important;
  background: #000 !important;
}

#billboard.destroyed {
  background: url(../img/broken-lcd.webp) !important;
  background-size: cover !important;
  background-repeat: no-repeat;
  color: transparent !important;
  border: 2px solid #000 !important;
  transform: rotate(-4deg) !important;
  box-shadow: none !important;
}

#billboard-content {
  margin: 0;
  position: absolute;
  width: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  word-wrap: break-word;
  text-align: center;
}

#billboard-content p {
  animation: zoom-in-zoom-out 2s linear infinite;
}

#ad-name {
  font-size: 25px;
}

#ad-content {
  font-size: 18px;
}

/* MARLBORO SIGN */

#marlboro {
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  line-height: 3vw;
  color: #f8ff95;
  text-transform: uppercase;
  position: relative;
  font-weight: bold;
  animation: pulse-glow 5s linear infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99;
}

#marlboro.destroyed {
  animation: none;
  color: #222 !important;
  transform: rotate(-4deg) !important;
  text-shadow: 3px 3px 0 #000 !important;
  animation: none !important;
}

.marlboro-text {
  font-size: 4vw;
  margin-bottom: 2px;
}

#soda {
  background: url(../img/soda.webp) no-repeat center center;
  background-size: auto 110%;
  height: 50%;
}

/* NOODLE BAR */

.noodle-bar {
  background: url(../img/noodle-bar.webp);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: bottom;
  width: 40vw;
  height: 40vw;
}

/* SPEEDERS */

#speeders {
  user-select: none !important;
  pointer-events: none !important;
}

.speeder {
  position: fixed;
  user-select: none !important;
  pointer-events: none !important;
}

[class="speeder start-left"] {
  animation: move-right 5s linear infinite;
  transform: translateX(-200px);
}

[class="speeder start-right"] {
  animation: move-left 5s linear infinite;
  transform: translateX(100vw);
}

.speeder span {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-image: url(../img/Speeders/speeder-1.webp);

  display: block;
  height: 100%;
  width: 100%;
}

[class="speeder start-right"] span {
  transform: scaleX(-1) !important;
}

/* STREET */

#street {
  width: 100vw;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  position: fixed;
  bottom: 0;
}

/* PEOPLE */

#people {
  position: fixed;
  bottom: 0;
  width: 100vw;
  height: 7vw;
}

.person {
  width: 7vw;
  height: 7vw;
  display: inline-block;
}

[class="person start-left"] {
  background: url(../img/walking-right.gif);
  background-size: auto 100%;
  background-repeat: no-repeat;
  background-position: bottom;
  transform: translateX(-10vw);
  position: fixed;
}

[class="person start-right"] {
  background: url(../img/walking-left.gif);
  background-size: auto 100%;
  background-repeat: no-repeat;
  background-position: bottom;
  transform: translateX(100vw);
  position: fixed;
}

/* LAMPS */

#lamps {
  width: 80vw;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  position: fixed;
  bottom: 0;
}

.lamp {
  background: tomato;
  height: 50vh;
  width: 20vw;
  background: url(../img/lamp-on.webp);
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position-y: bottom;
}

[class="lamp off"] {
  background: url(../img/lamp-off.webp);
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position-y: bottom;
}

/* RAIN */

#rain hr {
  border-color: transparent;
  border-right-color: #8c485e;
  border-right-width: 40px;
  position: fixed;
  bottom: 100%;
  transform-origin: 100% 50%;
  opacity: 0.4;
  user-select: none !important;
  pointer-events: none !important;
}

/* MOBILE SCREENS */

@media only screen and (max-width: 600px) {
  #buildings {
    justify-content: space-evenly;
  }

  .building {
    margin: 0px !important;
    width: 40vw !important;
  }

  .building:nth-child(2),
  .building:nth-child(4),
  .building:nth-child(5) {
    display: none;
  }

  #billboard {
    height: 15%;
  }

  #ad-name {
    font-size: 15px;
  }

  #ad-content {
    font-size: 10px;
  }

  #rain hr:nth-child(n + 50):nth-child(-n + 200) {
    display: none;
  }
  /* MOBILE SCREENS END */
}

/* FOG */

#fog {
  background-image: url(../img/fog.webp);
  background-repeat: no-repeat;
  background-size: cover;
  display: block;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0.6;
  user-select: none !important;
  pointer-events: none !important;
}

/* ANIMATIONS */

@keyframes rain {
  from {
    transform: rotate(105deg) translateX(0);
  }
  to {
    transform: rotate(105deg) translateX(calc(100vh + 20px));
  }
}

@keyframes zoom-in-zoom-out {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse-glow {
  0% {
    text-shadow: 0 0 30px #85e6c5;
  }
  50% {
    text-shadow: 0 0 0 #85e6c5;
  }
  100% {
    text-shadow: 0 0 30px #85e6c5;
  }
}

@keyframes move-right {
  0% {
    transform: translateX(-10vw);
  }
  100% {
    transform: translateX(100vw);
  }
}

@keyframes move-left {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-10vw);
  }
}
