.entry-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-heading {
  width: 100;
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  background: transparent;
  color: rgb(255, 227, 227);
  text-decoration: none;
  text-align: center;
  text-shadow:
  1px 1px   0  rgb(97, 4, 4),
  -1px 1px  0  rgb(97, 4, 4),
  1px -1px  0  rgb(97, 4, 4),
  -1px -1px 0  rgb(97, 4, 4);
  border: 4px solid rgb(183, 73, 73);
  border-radius: 727px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.entry-panel {
  background: rgba(0, 0, 0, 0.8);
  width: 90%;
  height: 85vh;
  border-radius: 8px;
  display: flex;
  gap: 0;
  overflow: hidden;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry-panel.open {
  transform: scaleX(1);
}

.entry-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.entry-half:first-child {
    flex: 75;
}

.entry-half:last-child {
    flex: 25;
}

.entry-half::-webkit-scrollbar {
  width: 4px;
}

.entry-half::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

.entry-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 1.5rem 0;
}

.entry-heading {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0;
  text-shadow:
    1px 1px   0  rgb(97, 4, 4),
    -1px 1px  0  rgb(97, 4, 4),
    1px -1px  0  rgb(97, 4, 4),
    -1px -1px 0  rgb(97, 4, 4);
}

.entry-line {
  color: rgb(255, 227, 227);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  text-shadow:
    1px 1px   0  rgb(97, 4, 4),
    -1px 1px  0  rgb(97, 4, 4),
    1px -1px  0  rgb(97, 4, 4),
    -1px -1px 0  rgb(97, 4, 4);
}

.entry-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Markdown element styling */
.entry-content h1,
.entry-content h2,
.entry-content h3 {
  color: rgb(255, 227, 227);
  text-shadow:
    1px 1px   0  rgb(97, 4, 4),
    -1px 1px  0  rgb(97, 4, 4),
    1px -1px  0  rgb(97, 4, 4),
    -1px -1px 0  rgb(97, 4, 4);
  margin: 1rem 0 0.4rem 0;
}

.entry-content p {
  margin: 0.3rem 0;
}

.entry-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 1rem 0;
}

.entry-content ul {
  padding-left: 1.2rem;
  margin: 0.3rem 0;
}

.entry-content strong {
  color: white;
}

/* Back button */
.back-button {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  visibility: hidden;
  text-decoration: none;
}

.back-button.animate__bounceInUp {
  visibility: visible;
}

.creatureImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Car log specific */
.image-half {
  flex: 65;
}

.log-half {
  flex: 35;
}

.car-image-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.car-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  transform: translateY(8px);
}

.car-image-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.car-img.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.car-img:hover {
  transform: scale(1.02);
  opacity: 0.85;
}

/* Viewer */
.car-viewer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}

.car-viewer.open {
  opacity: 1;
  pointer-events: all;
}

.car-viewer-img {
  max-width: 85%;
  max-height: 85%;
  border-radius: 8px;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  object-fit: contain;
}

.car-viewer.open .car-viewer-img {
  transform: scale(1);
}

.car-viewer-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.car-viewer-close:hover {
  opacity: 1;
}