@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;400;600;800&family=Mulish:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-rendering: geometricprecision !important;
}

html {
  font-family: sans-serif;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0px;
  padding: 0px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0px;
}

:root {
  --body-font: 'Inter', sans-serif;
  --images-width: 900px;
  --images-height: 600px;

  --black: rgb(0, 0, 0);
  --dark-mode-500: rgb(43, 50, 65);
  --dark-mode-200: rgba(121, 131, 151, 0.6);
  --yellow-dark-11: rgba(240, 192, 0, 94);
  --scaleup-color: rgba(255, 255, 255, 1);

  --zoom-start: 1.08;
  --zoom-end: 1;
  --duration-time: 0.8s;
}

body {
  background-color: var(--black);
  font-family: var(--body-font);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.stories-container {
  width: 100vw;
  height: 100vh;
}

.slide-group {
  touch-action: none;
  display: grid;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
}

.slides {
  grid-area: 1/1;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  display: -webkit-flex;
  -webkit-box-flex: 1;
  -webkit-align-items: center;
  -webkit-justify-content: center;
}

.slides > img {
  max-width: 100%;
  height: auto;
}

.slides > * {
  display: none;
  pointer-events: none;

  -webkit-transition: -webkit-transform var(--duration-time) ease-in-out;
  transition: -webkit-transform var(--duration-time) ease-in-out;
  -o-transition: transform var(--duration-time) ease-in-out;
  transition: transform var(--duration-time) ease-in-out;

  -webkit-transform: scale(var(--zoom-start));
  -ms-transform: scale(var(--zoom-start));
  transform: scale(var(--zoom-start));
}

.slides > .active {
  display: block;
  pointer-events: initial;

  -webkit-transform: scale(var(--zoom-end));
  -ms-transform: scale(var(--zoom-end));
  transform: scale(var(--zoom-end));
}

.slides__navigation {
  z-index: 1;
  display: grid;
  grid-area: 1/1;

  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto 1fr;
}

.slides__thumb {
  display: flex;
  grid-column: 1 / 3;
}

.slides__thumb > span {
  flex: 1;
  display: block;

  margin: 5px 2px;
  border-radius: 3px;
  overflow: hidden;

  height: 3px;
  background: var(--dark-mode-200);
}

.slides__thumb > span.question {
  background-color: var(--yellow-dark-11);
}

.slides__thumb > span.active::after,
span.watched::after,
span.question {
  content: '';
  display: block;
  height: inherit;
  border-radius: 3px;
}

.slides__thumb > span.active::after {
  background: var(--scaleup-color);

  transform: initial;

  /* Animation time needs to match
  with the Js const "eachSlideTime":
  */
  transform: translateX(-100%);
  animation: thumbAnim 4s forwards linear;
}

.slides__thumb > span.watched::after {
  /* content: '';
  display: block;
  height: inherit; */

  background: var(--scaleup-color);
  /* border-radius: 3px; */
}

.slides__navigation button {
  opacity: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

@keyframes thumbAnim {
  to {
    transform: initial;
  }
}

/* Only Desktop */
html:not(.mobile-story) .slide-group {
  max-width: calc(var(--images-width) / 2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 95vh;
}

html:not(.mobile-story) .slides > img {
  max-height: 100%;
  width: auto;
}

@supports (-webkit-touch-callout: none) {
  body {
    /* The hack for Safari */
    height: -webkit-fill-available;
  }
}

/* only mobile */
@media screen and (orientation: landscape) {
  html.mobile-story {
    transform: rotate(-90deg);
    transform-origin: left top;
    width: 100vh;
    overflow-x: hidden;
    position: absolute;
    top: 100%;
    left: 0;
  }

  html.mobile-story > body,
  .stories-container {
    width: 100vh;
    height: 100vw;
  }

  .mobile-story > .slides__navigation button {
    min-width: 50vh;
  }
}
