@font-face {
  font-family: "TimezoneMono";
  src: url("../Font/timezone-mono.otf") format("opentype");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-image: url("../Images/background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.page-frame {
  width: calc(100vw - 80px);
  min-height: calc(100vh - 80px);
  margin: 40px;
  padding: 28px 42px 38px;

  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.7);

  display: flex;
  flex-direction: column;
}

.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  font-family: "TimezoneMono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.top-bar a,
.top-bar button {
  color: white;
  background: transparent;
  border: none;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.top-bar h1 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}

#save-button {
  justify-self: end;
}

.type-area {
  height: 45vh;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 25px;
  align-items: center;

  padding-bottom: 28px;
}

.letter-output {
  width: 170vw;
  max-width: 3000px;
  height: 500px;

  display: flex;
  justify-content: center;
  align-items: flex-end;

  gap: 8px;
  overflow: hidden;
}

.letter-output img {
  height: 100%;
  max-width: calc(100% / 10);
  object-fit: contain;
}

#text-input {
  width: 320px;
  margin-top: 28px;

  background: transparent;
  border: none;
  color: white;

  font-family: "TimezoneMono", monospace;
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;

  outline: none;
}

#text-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.underline {
  width: 76vw;
  max-width: 1180px;
  height: 1px;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;

  margin-top: 32px;
}

.letter-card {
  position: relative;

  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.75);

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  cursor: pointer;

  background: #000;
  transition: background 0.25s ease;
}

.letter-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.letter-info {
  position: absolute;
  inset: 0;

  padding: 16px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  color: #000;
  font-family: "TimezoneMono", monospace;
  font-size: 12px;
  text-transform: uppercase;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease;
}

.letter-info span:first-child {
  font-size: 28px;
}

.letter-card:hover {
  background: #fff;
}

.letter-card:hover img {
  opacity: 0.12;
  filter: invert(1);
}

.letter-card:hover .letter-info {
  opacity: 1;
}

.image-modal {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.94);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;

  z-index: 9999;
}

.image-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.image-modal img {
  width: 80vw;
  height: 80vh;

  object-fit: contain;
}

.export-caption {
  display: none;
  margin: 28px 0 0;

  color: white;
  font-family: "TimezoneMono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

.page-frame {
  width: calc(100vw - 80px);
  max-width: calc(100vw - 80px);
  overflow: hidden;
}

.alphabet-grid {
  width: 100%;
  max-width: 100%;
  overflow: hidden;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.letter-card {
  min-width: 0;
}

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