* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  color: #f1ead8;
  font-family: "Helvetica Neue", Helvetica, sans-serif;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(151, 197, 223, 0.17), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(82, 113, 132, 0.24), transparent 33%),
    linear-gradient(135deg, #090c10, #10161d 58%, #131a22);
}

.display-shell {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.26;
  pointer-events: none;
}

.display {
  position: absolute;
  top: 50%;
  left: 50%;
  overflow: hidden;
  width: 438px;
  height: 238px;
  margin-left: -219px;
  margin-top: -119px;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(28, 34, 39, 0.92), rgba(4, 7, 10, 0.98) 22%, rgba(0, 0, 0, 0.99)),
    rgba(17, 25, 32, 0.88);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  padding-top: 20px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.clock-face {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 5px 14px 2px;
}

.clock-face:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 54px;
  border-top-right-radius: 15px;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 65%);
  pointer-events: none;
}

.date-band {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
}

.weather-left {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.date-center {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
}

.date-line {
  color: #00ff41;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 24px;
  line-height: 0.96;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.clock-main {
  color: #00ff41;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 106px;
  font-weight: bold;
  line-height: 0.86;
  letter-spacing: -0.07em;
  text-shadow: 0 0 16px rgba(0, 255, 65, 0.11);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.clock-separator {
  position: relative;
  top: -0.13em;
  padding: 0 6px;
  letter-spacing: 0;
  color: #00ff41;
  -webkit-animation: pulse 1.2s infinite;
  animation: pulse 1.2s infinite;
}

.time-band {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-top: 16px;
}

.weekday-block {
  color: #00ff41;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 2px;
}

.weather-icon {
  width: 38px;
  height: 26px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}

.weather-condition {
  color: #00ff41;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.temperature-block {
  text-align: right;
}

.bottom-band {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  padding: 16px 14px 0;
}

.temperature-now {
  color: #00ff41;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 24px;
  line-height: 0.9;
  letter-spacing: 0.02em;
}

.weather-range {
  margin-top: 7px;
  color: rgba(0, 255, 65, 0.88);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dog-strip {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 72px;
  flex: 0 0 72px;
  position: relative;
  overflow: hidden;
}

.formula-label {
  color: rgba(255, 195, 60, 0.85);
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
  margin-bottom: 3px;
}

.formula-katex {
  color: rgba(255, 200, 50, 0.95);
  font-size: 34px;
  line-height: 1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

/* MathJax output inherits colour from the parent */
.formula-katex .MathJax,
.formula-katex .MathJax_Display {
  color: inherit !important;
  display: inline !important;
}

.notification-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: rgba(255, 40, 40, 0.80);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: normal;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-sprite {
  position: absolute;
  bottom: 0;
  left: 0;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@-webkit-keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }

  100% {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }

  100% {
    opacity: 1;
  }
}

@media screen and (max-height: 260px) {
  .display {
    width: 426px;
    height: 232px;
    margin-left: -213px;
    margin-top: -116px;
  }

  .clock-face {
    padding: 4px 12px 4px;
  }

  .date-line {
    font-size: 22px;
  }

  .clock-main {
    font-size: 100px;
  }

  .weekday-block {
    font-size: 14px;
  }

  .weather-condition {
    font-size: 10px;
  }

  .temperature-now {
    font-size: 22px;
  }

  .weather-range {
    font-size: 17px;
  }

  .formula-label {
    font-size: 13px;
  }
}

@media screen and (orientation: portrait) {
  .display {
    width: 296px;
    height: 432px;
    margin-left: -148px;
    margin-top: -216px;
  }

  .dog-strip {
    -webkit-flex: 0 0 84px;
    flex: 0 0 84px;
  }

  .formula-katex {
    font-size: 34px;
  }

  .formula-label {
    font-size: 14px;
  }

  .clock-face {
    padding: 10px 16px 10px;
  }

  .date-line {
    font-size: 21px;
  }

  .clock-main {
    font-size: 80px;
  }

  .weekday-block {
    font-size: 13px;
  }

  .weather-icon {
    width: 32px;
    height: 22px;
  }

  .weather-condition {
    font-size: 10px;
  }

  .temperature-now {
    font-size: 22px;
  }

  .weather-range {
    font-size: 15px;
  }
}
