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

html {
  font-size: 16px;
  font-family: "Courier New", monospace;
}

body {
  margin: 0;
  min-height: 100vh;
}

/* --------------------
   Layout
-------------------- */

.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.render-webcam-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0;
  width: 100%;
}

.render-containers {
  grid-column: 2;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 480px;
  max-width: 86vw;
}

.canvas-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.desc-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.two-column-wrapper {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 2rem;
}

/* --------------------
   Typography
-------------------- */

h1 {
  width: 100%;
  margin: 0.5rem auto;
  font-family: "Lucida Console", monospace;
  text-align: center;
  text-transform: uppercase;
  font-size: 3.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button {
  font-family: "Courier New", monospace;
}

.mode-button {
  font-family: "Lucida Console", monospace;
  font-size: 3.3rem;
  font-weight: bold;
  text-transform: uppercase;
  color: black;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: 0.2rem;
  text-underline-offset: 0.2rem;
  background: transparent;
  animation: blink 2s steps(1) infinite;
}

@keyframes blink {
  95% {
    opacity: 0;
  }
}

.mode-button:hover {
  text-decoration-style: solid;
  color: white;
  background: black;
}

p {
  font-size: 0.9rem;
  margin: 0;
}

#sub-h1 {
  font-size: 0.5rem;
  margin-top: -0.8rem;
  margin-bottom: 0.5rem;
}

.log {
  font-family: "Lucida Console", monospace;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

#pre-log {
  font-size: 0.8rem;
  font-weight: lighter;
  margin-top: 0.6rem;
}

.desc-top {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}

.desc-bottom {
  font-size: 0.8rem;
  text-align: center;
}

#inscription {
  color: #707070;
}

/* --------------------
   Canvas
-------------------- */

canvas {
  width: 86%;
  max-width: 480px;
  display: block;
}

#webcam {
  grid-column: 3;
  justify-self: start;
  width: 160px;
  height: 120px;
  border: 2px solid #000;
  display: block;
}

svg {
  max-width: 410px;
}

/* --------------------
   Controls
-------------------- */

#work-btn {
  background-color: black;
  margin-top: 0;
  font-size: 1.2rem;
  color: white;
  text-transform: uppercase;
  text-align: center;
  padding: 0.4rem 4rem;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#work-btn:active {
  color: black;
  background-color: white;
}

/* --------------------
   Footer
-------------------- */

footer {
  margin: 0.5rem;
  font-size: 0.8rem;
  color: #000;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 25%;
}

.footer-links {
  display: inline-flex;
  flex-direction: column;
  gap: 0.4rem;
}

footer a {
  color: inherit;
  text-decoration: underline;
}

footer a:hover {
  color: #696969;
}

.support {
  margin-top: 0.4rem;
}

.support summary {
  width: 8em;
  cursor: pointer;
}

.support summary:hover {
  color: #696969;
}

.support p {
  margin: 0.1rem 0;
  font-size: 0.65rem;
}

.wallets {
  margin-top: 0.3rem;
}

.wallet-copy {
  display: block;
  font-size: 0.65rem;
  color: #505050;
  text-decoration: underline;
  cursor: pointer;
  margin: 0.15rem 0;
}

.wallet-copy:active {
  opacity: 0.6;
}

/* --------------------
   About
-------------------- */

.about-page p {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0.5rem auto;
}

.about-page h2 {
  font-family: "Lucida Console", monospace;
}

.about-page .two-column-wrapper {
  grid-template-columns: 1fr 2fr;
  max-width: 1000px;
}

.images {
  justify-self: end;
}

.img-with-caption {
  margin: 1rem auto;
}

.img-with-caption img {
  max-width: 480px;
}

.img-with-caption .small-images {
  max-width: 280px;
  display: block;
  margin-left: auto;
}

.img-with-caption p {
  font-size: 0.6rem;
  font-family: "Lucida Console", monospace;
  color: #707070;
  text-align: right;
  margin: 0;
}

.description {
  min-width: 0;
}

#large-numbers {
  display: block;
  margin: 1rem auto;
}

/* --------------------
   Explore
-------------------- */

.exploreUI-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 300px;
}

.explore label {
  font-size: 0.85rem;
}

.discover-text {
  font-size: 0.85rem;
  margin: 0;
}

#counter-slider {
  -webkit-appearance: none;
  height: 8px;
  background: #ddd;
  outline: none;
}

#counter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #000;
  border-radius: 50%;
}

#counter-random {
  border: none;
  padding: 0.5rem;
  background-color: #d8d8d8;
}

#counter-random:hover {
  background-color: #c5c5c5;
}

#inscription-input {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  padding: 0.4rem;
  border: 1px solid #000;
  box-sizing: border-box;
  height: 4rem;
  width: 90%;
  margin: 0.5rem 0 0.5rem 5%;
}

#mint {
  background-color: black;
  color: white;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  margin: 0 0 0 5%;
  width: 90%;
  border: none;
}

#mint:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#mint:hover:not(:disabled) {
  background-color: #333;
}

.mint-status {
  font-size: 0.75rem;
  margin: 0;
  min-height: 1rem;
}

.explore {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.explore input[type="number"] {
  font-family: "Courier New", monospace;
  font-size: 1rem;
  padding: 0.3rem;
  border: 1px solid #000;
}

#counter-msg {
  font-size: 0.8rem;
  color: #d00;
}

#counter-msg a {
  color: #d00;
  text-decoration: underline;
}

/* --------------------
   Why Discover Modal
-------------------- */

.why-discover-btn {
  background: transparent;
  border: none;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: #505050;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-top: 0;
}

.why-discover-btn:hover {
  color: #000;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: white;
  margin: 7% auto;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  position: relative;
}

.modal-content ol {
  font-size: 0.9rem;
  padding-left: 1.5rem;
}

.modal-content li {
  margin: 0.3rem 0;
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  font-weight: bold;
  color: #505050;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #000;
}

/* --------------------
   Explorer Page
-------------------- */

.explorer-page .desc-top {
  margin: 0.7rem auto;
}

.explorer-page .render-containers {
  grid-column: auto;
  justify-content: flex-end;
  width: 100%;
}

.explorer-page .canvas-container {
  justify-content: flex-end;
}

.discover {
  display: flex;
  flex-direction: column;
  border: 2px solid #000;
  padding: 0.5rem;
  gap: 0.5rem;
}

.discover summary {
  background-color: #d8d8d8;
  color: black;
  cursor: default;
  list-style: none;
  padding: 0.5rem;
  text-align: center;
}

.discover summary:hover {
  background-color: #c5c5c5;
}

.discover details {
  display: flex;
  flex-direction: column;
  background: #ececec;
}

/* --------------------
   Responsive
-------------------- */

@media (max-width: 800px) {
  body {
    padding-bottom: 3rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .mode-button {
    font-size: 2.5rem;
  }

  .render-webcam-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .render-containers {
    grid-column: unset;
  }

  #webcam {
    grid-column: unset;
    justify-self: unset;
    width: 86%;
    max-width: 90px;
    height: auto;
  }

  canvas {
    width: 86%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  footer {
    width: 100%;
  }

  .footer-links {
    flex-direction: row;
    gap: 0.6rem;
  }

  .about-page .two-column-wrapper {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .about-page .description {
    order: -1;
    padding: 0 1rem;
    overflow-wrap: break-word;
  }

  .img-with-caption img {
    max-width: 100%;
  }
}
