/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: white;
}

/* Clock Container */
.clock {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  flex-direction: column;
}

/* Flip Card Styles */
.flip-card {
  position: relative;
  width: 40vw;
  height: 310px;
  background-color: #151718;
  color: #ffffff;
  font-size: 18rem;
  text-align: center;
  border-radius: 12px;
  perspective: 1000px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);  /* Adds depth */
  overflow: hidden;
}

.flip-card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  background-color: #000000;
  border-radius: 12px;
  transform-origin: top; /* Set the pivot point for the flip animation */
  transform: rotateX(0deg);
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Smooth, realistic animation */
  backface-visibility: hidden; /* Hides back face to focus only on front */
}

.flip-card.flip .flip-card-front {
  transform: rotateX(-180deg); /* Flip the front face */
}

/* Responsive Design */
@media (max-width: 768px) {
  .flip-card {
    width: 100px;
    height: 140px;
    font-size: 60px;
  }
}

@media (max-width: 480px) {
  .flip-card {
    display: flex;
    width: 180px;
    height: 300px;
    font-size: 18rem;
    flex-direction: row;
  }
}

.minute, .hour {
    display: flex;
    gap: 12px;
    border-radius: 12px;
    background-color: #10141626;
    box-shadow: 0 0px 16px rgb(137 255 222 / 85%);
}

#ampm {
    position: relative;
    width: 165px;
    height: 80px;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 0px 16px #dd91bfe0;
}

#ampm .flip-card-front {
    font-size: 2rem; /* Smaller font size for AM/PM */
}
