body {
  max-width: 1200px;
  margin: 0 auto;
  color: whitesmoke;
  font-size: 1rem;
  background-color: #0a0d30;
}

.model-viewer-wrapper {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  grid-template-rows: 26px auto auto 1fr auto auto;
  width: 100%;
  height: auto;
  padding: 1.5em;
  overflow: hidden;
  /* border: 4px solid #222; */
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  background-color: #222;
}

model-viewer {
  z-index: 4;
  grid-column: 1/-1;
  grid-row: 4/5;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: auto;
  min-height: 300px;
  /* ---experimental */

  opacity: 0.8;
  filter: contrast(0.6);
}

.page-titles {
  grid-column: 3/4;
  grid-row: 1/2;
  font-family: var(--font-headings);
  font-size: 1.25rem;
  text-align: center;
  letter-spacing: 3px;
  color: #999;
}
@media (max-width: 800px) {
  .page-titles {
    grid-column: 3/4;
    grid-row: 1/2;
    font-family: var(--font-headings);
    font-size: 1rem;
  }

  model-viewer {
    width: 80%;
    height: 80%;
  }
}
@media (max-width: 400px) {
  .page-titles {
    grid-column: 3/4;
    grid-row: 1/2;
    font-family: var(--font-headings);
    font-size: 0.85rem;
  }

  model-viewer {
    width: 80%;
    height: 80%;
  }
}

.github-icon {
  grid-column: 1/2;
  grid-row: 1/2;
  justify-self: center;
  color: #999;
}
.mail-icon {
  grid-column: 5/6;
  grid-row: 1/2;
  justify-self: center;
  color: #999;
}
.model-data {
  font-family: Departure;
  font-size: 0.5rem;
  color: #00ffffab;
}
.model-data-bg {
  grid-column: 1/-1;
  grid-row: 4/5;
  display: flex;
  justify-self: center;
  align-self: center;
  text-align: center;
  font-size: 14rem;
  color: #3333331e;
}
.model-data-tl {
  grid-column: 1/2;
  grid-row: 2/3;
  text-align: start;
}
.model-data-tr {
  grid-column: 5/6;
  grid-row: 2/3;
  text-align: end;
}
.model-data-bl {
  grid-column: 1/2;
  grid-row: 6/7;
  text-align: start;
}
.model-data-br {
  grid-column: 5/6;
  grid-row: 6/7;
  text-align: end;
}

.page-swap-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0rem auto;
  padding: 1em;
  border-top: 1px dotted #00ffffab;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  background: #222;
}
.page-swap-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-headings);
  /* font-size: 0.85rem; */
  letter-spacing: 2px;
  padding: 0.25rem;
  height: 60px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
  /* border: 2px solid #fff; */
  color: #999;
  transition: all 0.3s ease;
}

.page-swap-icon {
  font-size: 0.25rem;
}
.home-icon {
  padding-bottom: 4px;
}
.tldr-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  padding: 0.25rem;
  font-size: 1rem;
  letter-spacing: 3px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 50%;
}

.page-swap-btn:hover {
  color: #ffffff;
}
.page-swap-btn.active-btn:hover {
  color: #ffffff;
}
.page-swap-btn.active-btn {
  background: #222;
  color: #ff00ff;
}

.page-swap-btn.loading {
  color: #666;
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.page-swap-btn.loading:hover {
  color: #666;
}

/* Responsive styles for page swap controls */
@media (max-width: 600px) {
  .page-swap-btn {
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 0.2rem;
  }

  .model-data-bg {
    font-size: 8rem;
    color: #3333331e;
  }
}

@media (max-width: 400px) {
  .page-swap-btn {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    height: 50px;
  }
   .model-data-bg {
    font-size: 6rem;
    color: #3333331e;
  }
}

@media (max-width: 320px) {
  .page-swap-btn {
    font-size: 0.6rem;
    letter-spacing: 0px;
    height: 45px;
    padding: 0.15rem;
  }

  .page-swap-controls {
    gap: 0.5rem;
    padding: 0.75em;
  }

  .tldr-btn {
    width: 45px;
    height: 45px;
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
   .model-data-bg {
    font-size: 4rem;
    color: #3333331e;
  }
}

/* -------------- */
/* -------------- */
/* -------------- */

.dot {
  position: absolute;
  transform: translate3d(-50%, -50%, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12px;
  height: 12px;
  padding: 2.5em;
  font-family: var(--font-headings);
  font-size: 10px;
  font-weight: 700;

  border-radius: 50%;
  border: 1px dotted #b2b0987d;
  background-color: transparent;

  cursor: pointer;
  transition: all 0.3s ease;
  --min-hotspot-opacity: 0.8;
}

.dot:hover {
  background-color: #ff47566c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transform: translate3d(-50%, -50%, 0) scale(1.2);
}

.dim {
  border-radius: 4px;
  border: none;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  color: transparent;
  display: block;
  font-family: Futura, Helvetica Neue, sans-serif;
  font-size: 1.2em; /* Increase text size */
  font-weight: 700;
  max-width: 128px;
  overflow-wrap: break-word;
  padding: 0.5em 1em;
  position: absolute;
  width: max-content;
  height: max-content;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
  --min-hotspot-opacity: 0;
}

@media only screen and (max-width: 800px) {
  .dim {
    font-size: 3vw;
  }

  .dot {
    width: 16px;
    height: 16px;
    border-width: 3px;
  }

  .dot:hover {
    transform: translate3d(-50%, -50%, 0) scale(1.3);
  }
}

.dimensionLineContainer {
  pointer-events: none;
  display: block;
}

.dimensionLine {
  stroke: #ffffff;
  stroke-width: 2;
  stroke-dasharray: 2;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.dimensionLine:hover {
  opacity: 1;
  stroke-width: 3;
}

/* Different styles for different edge types */
.dimensionLine:nth-child(1),
.dimensionLine:nth-child(2),
.dimensionLine:nth-child(3),
.dimensionLine:nth-child(4) {
  /* Bottom face edges */
  stroke: #ffff00;
}

.dimensionLine:nth-child(5),
.dimensionLine:nth-child(6),
.dimensionLine:nth-child(7),
.dimensionLine:nth-child(8) {
  /* Top face edges */
  stroke: #00ffff;
}

.dimensionLine:nth-child(9),
.dimensionLine:nth-child(10),
.dimensionLine:nth-child(11),
.dimensionLine:nth-child(12) {
  /* Vertical edges */
  stroke: #ff00ff;
  stroke-width: 3;
}

.hide {
  display: none;
}

/* This keeps child nodes hidden while the element loads */
:not(:defined) > * {
  display: none;
}
/* -------------- */
/* -------------- */

/* LOADING */
/* #load-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #fff;
} */

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  width: 35px;
  height: auto;
  aspect-ratio: 1;
  --_g: no-repeat radial-gradient(circle closest-side, rgb(212, 208, 198) 90%, #0000);
  background: var(--_g) 0 0, var(--_g) 0 100%, var(--_g) 100% 100%;
  background-size: 40% 40%;
  animation: l11 1s infinite linear;
}
@keyframes l11 {
  25% {
    background-position: 100% 0, 0 100%, 100% 100%;
  }
  50% {
    background-position: 100% 0, 0 0, 100% 100%;
  }
  75% {
    background-position: 100% 0, 0 0, 0 100%;
  }
  100% {
    background-position: 100% 100%, 0 0, 0 100%;
  }
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(34, 34, 34, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  display: none;
}

.pulsar {
  width: 20px;
  border-radius: 50%;
  height: 20px;
  background-image: radial-gradient(circle, #00ffffab 0%, #222 70%);
  background-size: 0% 0%;
  background-position: center;
  background-repeat: no-repeat;

  animation: pulse 3s ease-out infinite;
}

@keyframes pulse {
  0% {
    background-size: 0% 0%;
    opacity: 1;
  }
  100% {
    background-size: 200% 200%;
    opacity: 0;
  }
}
