/* --- Reset & Base --- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Courier New", Courier, monospace;
  color: #545F66;
  background: linear-gradient(to right, #EDEBE8, #EDEBE8 30%, #FFF 30%, #FFF);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Entry page --- */

.page-entry {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.logo {
  position: fixed;
  top: 2.5vmin;
  right: 2.5vmin;
  z-index: 10;
  display: block;
  width: 5vmin;
  height: 5vmin;
  background: #000;
}

.logo:hover {
  opacity: 0.85;
}

.top-links {
  position: fixed;
  top: 3.5vmin;
  right: calc(2.5vmin + 5vmin + 1em);
  z-index: 10;
  font-size: 0.85em;
  color: #000;
}

.top-links a {
  margin-left: 1em;
}


.arrow {
  position: absolute;
  top: 50vh;
  transform: translateY(-50%);
  width: 2vmin;
  height: 2vmin;
  border: solid #000;
  border-width: 0 3px 3px 0;
  z-index: 10;
  display: inline-block;
}

.arrow-prev {
  left: 5vh;
  transform: translateY(-50%) rotate(135deg);
}

.arrow-next {
  right: 5vh;
  transform: translateY(-50%) rotate(-45deg);
}

.arrow:hover {
  opacity: 0.5;
}

.photo {
  width: 80vw;
  height: 60vh;
  margin: 20vh auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.info {
  display: flex;
  justify-content: flex-end;
  gap: 1.5em;
  margin-right: 5px;
  margin-top: 2.5vmin;
  font-size: 0.72em;
}

.info .date {
  white-space: nowrap;
  flex-shrink: 0;
}

.info .title {
  max-width: 400px;
}

/* --- Empty diary state --- */

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40vmin;
  height: 40vmin;
  border: 2px solid #545F66;
  font-size: 10vmin;
  color: #545F66;
  text-decoration: none;
  opacity: 0.3;
  transition: opacity 0.2s;
  line-height: 1;
}

.upload-cta:hover {
  opacity: 0.7;
  text-decoration: none;
}

.empty-label {
  font-size: 1.2em;
  opacity: 0.4;
}

.inline {
  display: inline;
}

.char-count {
  float: right;
  opacity: 0.5;
}

/* --- Form pages (login, register, upload) --- */

.page-form {
  min-height: 100vh;
}

.form-page {
  max-width: 400px;
  margin: 0 auto;
  padding: 10vh 2em 4em;
}

.form-page h1 {
  font-size: 1.2em;
  font-weight: normal;
  margin-bottom: 2em;
}

.form-page form {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.form-page label {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  font-size: 0.85em;
}

.form-page input[type="text"],
.form-page input[type="password"] {
  font: inherit;
  padding: 0.5em;
  border: 1px solid #ccc;
  background: #fff;
}

.form-page input[type="file"] {
  font: inherit;
  margin-top: 0.3em;
}

.form-page button {
  font: inherit;
  padding: 0.6em 1.5em;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

.form-page button:hover {
  opacity: 0.85;
}

.error {
  color: #c44;
  font-size: 0.85em;
  margin-bottom: 1em;
}

.done {
  margin-bottom: 1em;
}

.alt {
  margin-top: 2em;
  font-size: 0.85em;
}

/* --- Mobile --- */

@media (max-width: 600px) {
  body {
    background: #fff;
  }

  .photo {
    width: 96vw;
    height: 93vh;
  }

  .arrow {
    width: 3vmin;
    height: 3vmin;
  }

  .arrow-prev {
    left: 3vw;
  }

  .arrow-next {
    right: 3vw;
  }

  .logo {
    top: 2.5vmin;
    right: 2.5vmin;
  }

  .info {
    margin-right: 2vw;
  }

}
