/* Ensuring html and body take full height */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;  /* Ensures body takes up the full height */
}

/* Body Styles */
body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: url("https://images.unsplash.com/photo-1499002238440-d264edd596ec?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80") no-repeat center center fixed;  /* Add no-repeat and fixed for background behavior */
  background-size: cover;  /* Ensures the background image always covers the viewport */
  overflow: hidden;
  z-index: -2;
  color: white;
  text-align: center;
}

/* Heading Styles */
h2 {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 14px;
  text-align: center;
  color: white;
}

/* Clock Styles */
.clock {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.clock div {
  margin: 5px;
  position: relative;
  z-index: 2;
}

.clock span {
  width: 100px;
  height: 80px;
  background: orangered;
  opacity: 0.8;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 50px;
  border-radius: 6px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.clock .text {
  height: 30px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: green;
  opacity: 0.8;
}

.clock #ampm {
  bottom: 0;
  position: absolute;
  width: 60px;
  height: 30px;
  font-size: 20px;
  background: green;
}

/* Watermark Styles */
.watermark {
  font-family: 'Times New Roman', Times, serif;
  font-weight: bold;
  position: fixed;
  bottom: 0;
  right: 0;
  font-size: 260px;
  padding: 10px;
  color: rgba(254, 250, 250, 0.5);
  pointer-events: none;
  transform: rotate(-20deg);
  margin-bottom: 200px;
  margin-right: 260px;
  margin-left: 170px;
  z-index: 1;
}

/* Footer Styles */
.footer {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
    Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  font-weight: bold;
  position: fixed;
  bottom: 0;
  right: 0;
  padding: 10px;
  color: orangered;
  text-align: right;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  /* Body adjustments for medium screens */
  body {
    padding: 20px;
  }

  /* Adjust clock span size */
  .clock span {
    width: 90px;
    height: 70px;
    font-size: 45px;
  }

  /* Watermark adjustments */
  .watermark {
    font-size: 220px;
    margin-right: 220px;
    margin-bottom: 180px;
  }

  /* Footer adjustments */
  .footer {
    font-size: 14px;
    padding: 8px;
  }
}

@media (max-width: 768px) {
  /* Body adjustments for smaller screens */
  body {
    padding: 10px;
  }

  /* Adjust clock span size */
  .clock span {
    width: 80px;
    height: 60px;
    font-size: 40px;
  }

  /* Watermark adjustments */
  .watermark {
    font-size: 200px;
    margin-right: 200px;
    margin-bottom: 150px;
  }

  /* Footer adjustments */
  .footer {
    font-size: 14px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  /* Body adjustments for even smaller screens */
  body {
    padding: 5px;
  }

  /* Adjust clock span size */
  .clock span {
    width: 70px;
    height: 50px;
    font-size: 35px;
  }

  /* Watermark adjustments */
  .watermark {
    font-size: 150px;
    margin-right: 150px;
    margin-bottom: 100px;
  }

  /* Footer adjustments */
  .footer {
    font-size: 12px;
    padding: 6px;
  }
}
