/* General body styling */
body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100vh;
  background-color: black;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
  overflow: hidden;
}

/* Full-screen particle animation background */
#app {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Title styling */
#title {
  position: absolute;
  top: 5%; /* Adjust to the desired vertical position above the white border */
  left: 50%; /* Center-align based on the container */
  transform: translateX(-50%); /* Precisely center it horizontally */
  font-size: 24px;
  font-weight: bold;
  color: white;
  z-index: 2;
  margin: 0;
}

/* Header styling */
#header-title {
  position: fixed; /* Fix it to the viewport */
  top: 10px; /* Adjust to desired vertical position */
  left: 38.8%; /* Center-align horizontally */
  transform: translateX(-50%); /* Precisely center */
  font-size: 24px; /* Adjust size */
  font-weight: bold;
  color: white;
  z-index: 100; /* Ensure visibility above other elements */
  text-align: center;
}




/* Main container with white border */
#image-container {
  position: relative;
  width: 565px;
  height: 800px;
  border: 1px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  margin: 0 auto;
  background-color: transparent;
}

/* Image inside the container */
#random-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Short description (bold title) */
#short-description {
  position: absolute;
  top: 55px; /* Adjust based on desired alignment */
  right: 340px; /* Bring it within visible bounds */
  width: 300px;
  font-weight: bold;
  text-align: left;
  color: white;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Long description below the short description */
#image-description {
  position: absolute;
  top: 120px;
  right: 340px;
  width: 300px;
  text-align: left;
  color: white;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Button for navigation */
#next-button {
  position: fixed;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background-color: #000;
  border: 1px solid white;
  color: white;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
}

#next-button:hover {
  background-color: #009;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: auto;
    overflow: visible; /* Prevent elements from overflowing */
    text-align: center;
  }

  /* HEADER TITLE */
#header-title {
  position: fixed; /* Fix it to the viewport */
  top: 10px; /* Adjust to desired vertical position */
  left: 50%; /* Center-align horizontally */
  transform: translateX(-50%); /* Precisely center */
  font-size: 24px; /* Adjust size */
  font-weight: bold;
  color: white;
  z-index: 100; /* Ensure visibility above other elements */
  text-align: center;
}



  /* IMAGE CONTAINER */
  #image-container {
    width: 90%;
    max-width: 565px;
    height: auto;
    aspect-ratio: 565 / 800;
    margin: 20px auto;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content from poking out */
    margin-top: 50px;
    border: 1px solid white;
  }

  /* IMAGE INSIDE THE CONTAINER */
  #random-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  /* SHORT DESCRIPTION */
#short-description, #image-description {
  position: absolute; /* Align with parent container */
  left: 20px; /* Align with the left edge of the parent */
  top: calc(100% + 10px); /* Keep its vertical position untouched */
  display: block; /* Ensure block-level behavior */
  text-align: left; /* Align text to the left */
  margin: 0; /* Remove margins */
  padding: 0; /* Remove padding */
  width: 90%; /* Adjust for a slight margin within the parent */
  box-sizing: border-box; /* Include padding in width */
  line-height: 1.5; /* Ensure consistent line spacing */
  word-wrap: break-word; /* Prevent overflow from long words */
  overflow: visible; /* Ensure visibility */
  color: white; /* Keep text visible */
  z-index: 1; /* Place above other elements */
}



  /* LONG DESCRIPTION */
#image-description {
  position: absolute; /* Keep descriptions positioned within the container */
  left: 20px; /* Align with the padding of #image-container (adjust if needed) */
  top: calc(100% + 80px);
  width: calc(100% - 40px); /* Account for container's padding (20px on each side) */
  box-sizing: border-box; /* Ensure padding is included in the width */
  text-align: left; /* Align text content to the left */
  line-height: 1.5; /* Ensure consistent line spacing */
  word-wrap: break-word; /* Prevent text overflow */
  color: white; /* Maintain text visibility */
  z-index: 2; /* Ensure descriptions appear above the container background */
}

  /* NEXT BUTTON */
  #next-button {
    position: relative; /* Allows positioning within the flow of the page */
    margin: 20px auto; /* Centers horizontally if width is defined */
    left: 50%; /* Shift to the middle of the screen */
    transform: translateX(-50%); /* Correct centering offset */
    padding: 10px 20px; /* Button padding */
    background-color: #000; /* Button background */
    border: 1px solid white; /* Button border */
    color: white; /* Button text color */
    font-size: 14px; /* Text size */
    cursor: pointer; /* Pointer on hover */
    display: inline-block; /* Ensures proper alignment */
  }
}
