body {
  background-color: gold;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Changed from max-height to min-height to allow for smaller devices */
  overflow-y: auto; /* Changed from hidden to auto to allow scrolling */
  margin: 0;
  box-sizing: border-box;
  font-size: clamp(1rem, 2vw, 1.2rem); /* Responsive font size */
  padding-top: 70px;
}
.main-content {
  padding-top: 20px; /* Same height as the header to offset the fixed position */
  overflow-y: auto; /* Enables scrolling within this div */
  height: calc(100vh - 150px); /* Full height minus header height */
}
header {
  position: fixed;
  top: 0; /* Align the top edge of the header with the viewport */
  left: 0; /* Align the left edge of the header with the viewport */
  width: 100%; /* Ensure the header spans the full width */
  z-index: 10;
  background: transparent; /* Or set a background color */
  text-align: center; /* This centers the title container */
  height: 170px;
}

#logo {
  position: absolute; /* Positioning it absolutely within the header, but it's still "relative" to header */
  top: 0;
  left: 0; /* Logo will be on the left */
  width: 7vw; /* Adjust width as needed */
  height: 7vh; /* Adjust height as needed */
  margin: 1rem; /* Adjust the margin to control the distance from the corners */
}
/* Title container styles */
.title-container {
  text-align: center; /* Center the title text */
  position: relative; /* Establish a positioning context */
  
}
.title {
  font-size: 1.5rem;
  display: inline-block; /* This makes the title center along with text-align on the container */
  position: relative; /* For z-index to work */
  z-index: 1;
  margin-bottom: 1rem;
}

.title-underline {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%); /* Centers the underline */
  width: 20%; /* The width of the underline */
  height: 0.25rem; /* The height of the underline */
  background: black; /* The color of the underline */
  border-radius: 2rem;
}
.container {
  position: relative;
  margin-top: 0px;
  padding-left: 10px;
  padding-right: 10px;
  position: relative;
  border: 10px solid black;
  background-color: olive;
  font-size: 1.5rem;
  line-height: 1.5rem;
  width: 40vw;
  max-width: 80vw;
  overflow: hidden;
  height: 61vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.container-name {
  color: white;
  margin-top: 3rem;
  line-height: 1.5rem;
  font-weight: bold;
}
.container-date {
  color: white;
  margin-top: 1rem;
  line-height: 1.5rem;
  font-weight: bold;
}
.container-name button,
.container-date button {
  padding-left: 10px; /* Aligns the text inside the containers */
  padding-right: 10px;
}
.container-name button,
.container-date button {
  border: 3px solid black;
  border-radius: 10%;
  background: gold;
  width: 50px;
  height: 35px;
  line-height: 1.3;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
}
.container-refresh button {
  margin-top: 2rem;
  border: 3px solid black;
  border-radius: 10%;
  background: gold;
  width: 180px;
  height: 70px;
  line-height: 1.3;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
}
.container-today {
  color: black;
}
/* Add this to your CSS to reserve space for the results */
#result,
#dateResult {
  height: 2rem; /* Adjust this height to fit your design */
  overflow: auto; /* Makes the content scrollable if it overflows */
  display: flex; /* To align content vertically */
  align-items: center; /* Centers content vertically */
  justify-content: center; /* Centers content horizontally if needed */
  margin-top: 2rem;
  line-height: 1.5rem;
}
#dateResult {
  text-align: center; /* Align text to the left */
  line-height: 3rem;
  display: block; /* Ensure it's a block-level element */
  word-wrap: break-word; /* Break long words that would overflow */
  overflow: hidden; /* Hide overflow or use 'auto' to allow scrolling */
  height: 8rem;
}
input[type="text"],
button {
  max-width: 90%;
  box-sizing: border-box;
}
.footer {
  text-align: center;
  clear: both; /* If needed */
  margin-top: 10px;
}
.footer p {
  font-size: 2rem;
}
.footer p a {
  text-decoration: none;
}

@media (max-width: 1320px) {
  .container {
    width: 50vw; /* Adjust container width for better spacing */
  }
  header #logo {
    width: 10vw; /* Adjust logo size */
  }
}

@media (max-width: 1100px) {
  .container {
    width: 60vw; /* Increase width for narrower screens */
    
    font-size: 1.4rem;
    width: 50vw;
    height: 55vh;
  }

  .title {
    font-size: 1.3rem; /* Scale down title font size */
  }
  .title .title-underline {
    width: 60%; /
  }

  header #logo {
    width: 12vw; /* Increase logo size slightly */
  }
  .container-name,
  .container-date,
  .container-refresh,
  .container-today {
    margin-top: 2rem; /* Consistent spacing */
  }
}

@media (max-width: 900px) {
  .title-container,
  .container-name,
  .container-date {
    margin: 0 auto; /* Center these containers */
    padding: 0 5%; /* Add padding for text */
  }

  header #logo {
    width: 50px; /* Adjust logo size */
    margin-left: 20px; /* Adjust logo position */
  }
  .container {
    margin-top: 0rem;
    margin-bottom: 1rem;
    font-size: 1.3rem; /* Even smaller font size for readability */
    width: 60vw; /* Increased width for narrower screens */
    height: 60vh; /* Adjust height if needed */
  }

  .container-name,
  .container-date,
  .container-refresh,
  .container-today {
    margin-top: 1.3rem; /* Slightly reduced spacing */
  }
}

@media (max-width: 768px) {
  body {
    min-height: auto;
  }
  header {
    height: 120px;
  }

  #logo {
    width: 60px; /* Adjusted from a viewport width to a fixed size for consistency */
    height: 60px; /* Maintains aspect ratio with width */
    margin: 0.5rem;
  }

 .title {
    font-size: 1.1rem; /* Even smaller font size on small screens */
  }
  .title .title-underline {
    width: 70%; /* Even wider underline on small screens */
  }

  .container {
    /* Adjusts the container's size and spacing for better layout on small screens */
    width: 80vw; /* Increased width for smaller screens to use more space */
    max-width: none; /* Removes the max-width restriction for flexibility */
    height: auto; /* Adjusts height to fit content rather than a fixed value */
    margin-top: 45px; /* Provides adequate space below the fixed header */
    padding-left: 20px;
    padding-right: 40px; /* Increases padding for better spacing around the content */
    margin-bottom: 0;
  }

  .container-name,
  .container-date,
  .container-refresh,
  .container-today {
    /* Adjusts font size and spacing for elements within containers for better readability */
    font-size: 1rem; /* Smaller font size for content within containers */
    margin-top: 1rem; /* Adjusts spacing between container elements */
  }

  .container-name,
  .container-date {
    width: 80vw; /* Set a specific width for smaller screens */
    max-width: 80vw; /* Make sure max-width is the same as width */
    margin-left: auto; /* Center the container */
    margin-right: auto;
    padding-right: 10px;
  }

  .container-name button,
  .container-date button {
    /* Increases button size for easier interaction on touch devices */
    width: 60px; /* Larger width for easier tapping */
    height: 40px; /* Larger height for easier tapping */
  }

  .container-name {
    margin-top: 10px; /* This should be the space below your header */
  }

  .container-refresh button {
    width: 16s0px;
    height: 80px;
    margin-bottom: 20px;
  }

  input[type="text"],
  button {
    /* Ensures form elements fill their container width for consistency */
    max-width: 100%; /* Allows input and buttons to expand to the full container width */
  }

  .footer {
    /* Adjusts footer spacing and font size for better layout on small screens */
    font-size: 0.3rem; /* Reduces font size for consistency with the rest of the adjustments */
    line-height: 40px;
    margin-top: 0;
  }
  .footer p {
  font-size: 1.1rem;
}
.footer p a {
  text-decoration: none;
} 
}
/* Styles for screens between 278px and 450px */
@media (min-width: 278px) and (max-width: 450px) {
  body {
    min-height: auto;
  }
  header {
    height: 120px;
  }
  #logo {
    width: 60px;
    height: 60px;
    margin: 0.5rem;
  }
  .title {
    font-size: 0.9rem;
    margin-left: 10px;
  }
  .title .title-underline {
    width: 70%;
  }
  .container {
    width: 80vw;
    max-width: none;
    height: auto;
    margin-top: 45px;
    padding-left: 20px;
    padding-right: 40px;
    margin-bottom: 0;
  }
  .container-name,
  .container-date,
  .container-refresh,
  .container-today {
    font-size: 1rem;
    margin-top: 1rem;
  }
  .container-name,
  .container-date {
    width: 80vw;
    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
    padding-right: 10px;
  }
  .container-name button,
  .container-date button {
    width: 60px;
    height: 40px;
    margin-top: 10px;
  }
  .container-name {
    margin-top: 10px;
  }
  .container-refresh button {
    width: 160px;
    height: 80px;
    margin-bottom: 20px;
  }
  input[type="text"],
  button {
    max-width: 100%;
  }
  .footer {
    font-size: 0.3rem;
    line-height: 40px;
    margin-top: 0;
  }
  .footer p {
    font-size: 1.1rem;
  }
  .footer p a {
    text-decoration: none;
  }
}

