/* https://www.joshwcomeau.com/css/custom-css-reset/ */
*, *::before, *::after {
  box-sizing: border-box;
}
*:not(dialog) {
  margin: 0;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  /* and also */
  background-color: #121526;
  color: #ffdcb3;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
#root, #__next {
  isolation: isolate;
}

header {
  text-align: center;
}

header img {
  max-width: 600px;
  margin: 0 auto -1rem auto;
}

main {
  margin: 0 auto;
  width:100%;
  max-width: 500px;
}

@media screen and (min-width: 800px) {
  main {
    display: flex;
    width:96%;
    max-width: 1400px;
  }
}

main > div {
  flex: 1 0 50%;
  margin-top: -1rem;
}

form {
  /* For now */
  display: none;
}

.mirror-wrapper {
  position: relative;
  aspect-ratio: calc(8/6);
  overflow: hidden;
}

@media screen and (min-width: 800px) {
  .mirror-wrapper {
    margin: -1rem 0;
  }
}

h2 {
  display: none;
}

.mirror-frame {
  position: absolute;
  top: 0;
  bottom: 0;
  width:100%;
  z-index:10;
  background-position: center center;
  background-size: 110%; /* You should re-export these frames */
}

.local-frame {
  background-image: url('gfx/localmagic-mirror--2x.png')
}
.remote-frame {
  background-image: url('gfx/remotemagic-mirror--2x.png')
}

.mirror-wrapper video {
  position: absolute;
  z-index: 5;
  aspect-ratio: calc(16/9);
  overflow: hidden;

  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);

  margin: 0 auto;
  width: 100%; /* The frame image has a built-in border */
}

footer {
  text-align: center;
  margin: 1rem;
  font-style: italic;
  font-size: 0.825rem;
}

footer a {
  text-decoration: none;
  color: #FF6600;
  text-shadow: 1px 1px 0 black;
}
