@keyframes blink {
  from, 25%, to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(720deg);
  }
  to {
    transform: rotate(1440deg);
  }
}

@keyframes bounce {
  from, 6.66%, 17.66%, 33.33% {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }
  13.33%, 14.33% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -30px, 0) scaleY(1.1);
  }
  23.33% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -15px, 0) scaleY(1.05);
  }
  26.66% {
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0) scaleY(0.95);
  }
  30% {
    transform: translate3d(0, -4px, 0) scaleY(1.02);
  }
}

html,
body {
  background-color: #1e1e1e;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  background-color: #1e1e1e;
}

body input,
body h3,
body span {
  color: #5a5a5a;
  font-family: "Rubik", sans-serif;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

.background-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.clear-button {
  backdrop-filter: blur(3px);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.clear-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#app {
  background-color: #1e1e1e;
  min-height: 100vh;
  position: relative;
}

#app.logged-out #app-info {
  margin-left: 40px;
  opacity: 1;
  transform: translateX(0%);
}

#app.logged-out #app-background {
  cursor: pointer;
}

#app.logged-out #sign-in-button-wrapper {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -40px);
}

#app.logging-in #app-background #app-background-image,
#app.verifying-log-in #app-background #app-background-image,
#app.log-in-error #app-background #app-background-image {
  filter: blur(8px);
  transform: scale(1.2);
}

#app.logging-in #app-pin-wrapper,
#app.log-in-error #app-pin-wrapper {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

#app.verifying-log-in #app-loading-icon {
  opacity: 1;
  transform: translate(-50%, -50%);
}

#app.log-in-error #app-pin-wrapper #app-pin .app-pin-digit {
  background-color: rgba(239, 83, 80, 0.05);
  border-color: rgba(239, 83, 80, 0.5);
}

#app.logged-in #app-menu {
  height: auto;
  overflow: initial;
  opacity: 1;
  pointer-events: all;
  transform: translateY(0%);
}

#app #app-loading-icon {
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, 0%);
  transition: opacity 250ms, transform 250ms;
  z-index: 2;
}

#app #app-loading-icon i {
  animation: 2s spin ease-in-out infinite;
  color: white;
  font-size: 2em;
}

#app #app-logo {
  cursor: pointer;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 400ms;
  z-index: 2;
}

#app.logged-out #app-logo {
  opacity: 1;
  pointer-events: all;
}

#app.logged-out.showing-about #app-logo {
  opacity: 0;
  pointer-events: none;
}

#app #app-logo img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.3));
}

#app #app-background {
  height: 100%;
  left: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1;
}

#app #app-background #app-background-image {
  background-image: url("images/login_background.jpg");
  height: 100%;
  transition: filter 250ms, transform 250ms;
  width: 100%;
}

#app #app-info {
  bottom: 0;
  left: 0;
  margin: 40px;
  margin-left: 0;
  opacity: 0;
  position: absolute;
  transform: translateX(-100%);
  transition: margin 250ms, opacity 250ms, transform 250ms;
  z-index: 2;
}

#app .user-status-button {
  cursor: pointer;
  margin-top: 10px;
  outline: none;
  padding: 10px;
  width: 100px;
}

#app .user-status-button i {
  color: whitesmoke;
  font-size: 1.25em;
}

#app #sign-in-button-wrapper {
  bottom: 0;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 40px);
  transition: opacity 250ms, transform 250ms;
  z-index: 2;
}

#app #sign-in-button-wrapper #sign-in-button:not(:hover) {
  animation: bounce 3s infinite;
  animation-delay: 3s;
}

#app .info {
  align-items: flex-end;
  display: flex;
}

#app .info .time {
  color: whitesmoke;
  font-size: 6em;
  height: 80px;
  line-height: 80px;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

#app .info .weather {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin-bottom: 6px;
  margin-left: 20px;
}

#app .info .weather .weather-temp-wrapper {
  display: flex;
  flex-direction: column;
}

#app .info .weather .weather-city {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.65em;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
}

#app .info .weather .weather-temp-row {
  align-items: flex-start;
  display: inline-flex;
}

#app .info .weather i,
#app .info .weather span {
  align-items: center;
  display: inline-flex;
}

#app .info .weather i {
  align-self: center;
  color: #fdd835;
  font-size: 0.9em;
}

#app .info .weather span {
  color: white;
}

#app .info .weather .weather-temperature-value {
  font-size: 1.5em;
  height: 20px;
  margin-left: 5px;
}

#app .info .weather .weather-temperature-unit {
  align-items: flex-start;
  font-size: 0.8em;
  margin-left: 3px;
}

#app #app-pin-wrapper {
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -30%) scale(0.8);
  transition: opacity 250ms, transform 250ms;
  z-index: 2;
}

#app #app-pin-wrapper #app-email {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: max-content;
}

#app #app-pin-wrapper #app-email .app-email-input-wrapper {
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.06);
  display: inline-flex;
  gap: 10px;
  padding: 0 10px;
  min-width: 260px;
  height: 80px;
  transition: border-color 250ms, background-color 250ms;
}

#app #app-pin-wrapper #app-email .app-email-input-wrapper.has-error {
  border-color: rgba(239, 83, 80, 0.5);
  background-color: rgba(239, 83, 80, 0.05);
}

#app #app-pin-wrapper #app-email .app-email-input {
  background-color: transparent;
  border: none;
  color: whitesmoke;
  flex: 1;
  font-size: 1.5em;
  outline: none;
  padding: 0;
}

#app #app-pin-wrapper #app-email .app-email-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#app #app-pin-wrapper #app-email .app-email-input:-webkit-autofill,
#app #app-pin-wrapper #app-email .app-email-input:-webkit-autofill:hover,
#app #app-pin-wrapper #app-email .app-email-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  -webkit-text-fill-color: whitesmoke;
  transition: background-color 9999s ease-in-out 0s;
}

#app #app-pin-wrapper #app-email .app-email-submit-button {
  align-items: center;
  background: none;
  border: none;
  color: whitesmoke;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.75em;
  height: 100%;
  justify-content: center;
  outline: none;
  padding: 0 5px;
  transition: transform 200ms;
}

#app #app-pin-wrapper #app-email .app-email-submit-button:disabled {
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

#app #app-pin-wrapper #app-email .app-email-submit-button:not(:disabled):hover {
  transform: translateX(3px);
}

#app #app-pin-wrapper #app-email .app-email-error {
  color: #ef5350;
  font-size: 0.9em;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

#app #app-pin-wrapper #app-pin-label {
  color: whitesmoke;
  font-size: 0.9em;
  margin: 10px;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

#app #app-pin-wrapper #app-pin-label #app-pin-cancel-text {
  color: #c0580a;
  cursor: pointer;
  margin-left: 2px;
}

#app #app-pin-wrapper #app-pin-label #app-pin-cancel-text:hover {
  text-decoration: underline;
}

#app #app-pin-wrapper #app-pin-label #app-pin-error-text {
  color: #ef5350;
}

#app #app-pin-wrapper #app-pin-hint {
  color: rgba(255, 255, 255, 0.45);
  font-family: "Rubik", sans-serif;
  font-size: 0.8em;
  margin: 8px 10px 0;
  text-align: center;
}

#app #app-pin-wrapper #app-pin-hidden-input {
  background-color: transparent;
  border: none;
  height: 0;
  outline: none;
  pointer-events: none;
  position: absolute;
  width: 0;
}

#app #app-pin-wrapper #app-pin {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#app #app-pin-wrapper #app-pin .app-pin-digit {
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.06);
  display: inline-flex;
  font-size: 3em;
  height: 80px;
  justify-content: center;
  position: relative;
  transition: background-color 250ms, border-color 250ms;
  width: 60px;
}

#app #app-pin-wrapper #app-pin .app-pin-digit:before,
#app #app-pin-wrapper #app-pin .app-pin-digit:after {
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.06);
  content: "";
  position: absolute;
  transition: opacity 250ms, transform 250ms;
  z-index: 2;
}

#app #app-pin-wrapper #app-pin .app-pin-digit:before {
  background-color: whitesmoke;
  border-radius: 10px;
  bottom: 0;
  height: 3px;
  left: 15%;
  opacity: 0;
  transform: translateY(0);
  width: 70%;
}

#app #app-pin-wrapper #app-pin .app-pin-digit:after {
  background-color: whitesmoke;
  border-radius: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.25);
  width: 20px;
}

#app #app-pin-wrapper #app-pin .app-pin-digit.focused:before {
  animation: blink 2s ease-in-out infinite;
  opacity: 1;
  transform: translateY(-10px);
}

#app #app-pin-wrapper #app-pin .app-pin-digit.hidden:after {
  opacity: 1;
  transform: scale(1);
}

#app #app-pin-wrapper #app-pin .app-pin-digit.hidden .app-pin-digit-value {
  opacity: 0;
  transform: scale(0.25);
}

#app #app-pin-wrapper #app-pin .app-pin-digit .app-pin-digit-value {
  color: whitesmoke;
  transition: opacity 250ms, transform 250ms;
}

#app #app-menu {
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  position: relative;
  transform: translateY(-10%);
  transition: opacity 250ms, transform 250ms;
  z-index: 2;
}

#app #app-menu #app-menu-content-wrapper {
  background: linear-gradient(to bottom, transparent, #1e1e1e);
  margin-top: 30vh;
  min-height: 60vh;
  padding: 80px;
  padding-top: 0;
}

#app #app-menu #app-menu-content-wrapper #app-menu-content {
  margin: auto;
  max-width: 1600px;
}

#app .menu-section {
  margin-top: 60px;
}

#app .menu-section .menu-section-title {
  align-items: center;
  display: flex;
  gap: 6px;
}

#app .menu-section .menu-section-title i,
#app .menu-section .menu-section-title span {
  color: whitesmoke;
}

#app .menu-section .menu-section-title .menu-section-title-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25em;
}

#app.showing-about #app-background #app-background-image {
  filter: blur(8px);
  transform: scale(1.2);
}

#app #about-button-wrapper {
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 40px;
  transform: translateY(40px);
  transition: opacity 250ms, transform 250ms;
  z-index: 2;
}

#app.logged-out #about-button-wrapper {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-40px);
}

#app #about-button {
  color: whitesmoke;
  font-family: "Rubik", sans-serif;
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: 2px;
  width: 100px;
}

#app #app-about {
  align-items: center;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  height: 100%;
  width: 100%;
  transition: opacity 300ms;
  z-index: 3;
}

#app #app-about.is-visible {
  opacity: 1;
  pointer-events: all;
}

#app .about-card {
  backdrop-filter: blur(16px);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-width: 480px;
  padding: 40px;
  text-align: center;
  width: 90%;
}

#app .about-card .about-logo {
  margin-bottom: 24px;
}

#app .about-card p {
  color: rgba(255, 255, 255, 0.85);
  font-family: "Rubik", sans-serif;
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 16px;
}

#app .about-card .about-owner {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85em;
}

#app .about-card a {
  color: whitesmoke;
}

@media (max-width: 600px) {
  #app .info .time {
    font-size: 4em;
    height: 60px;
    line-height: 60px;
  }

  #app .user-status-button {
    width: 60px;
  }

  #app #app-info {
    bottom: auto;
    top: 0;
    margin: 24px 0 0 24px;
  }

  #app.logged-out #app-info {
    margin-left: 24px;
    transform: translateX(0%);
  }

  #app #sign-in-button-wrapper {
    left: 24px;
    transform: translateY(40px);
  }

  #app.logged-out #sign-in-button-wrapper {
    transform: translateY(-24px);
  }

  #app #about-button-wrapper {
    right: 24px;
  }

  #app.logged-out #about-button-wrapper {
    transform: translateY(-24px);
  }
}
