html,
body {
  padding: 0;
  margin: 0;
  overflow: hidden;
  height: 100%;
}

body {
  background: #111721;
  color: white;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  position: relative;
}

#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

main {
  height: 100vh;
  display: grid;
  grid-template-rows: auto min-content;
  width: 100vw;
  align-items: center;
  justify-content: center;
}

main .container {
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Header Styles */
header {
  max-width: 480px;
}

header img {
  display: block;
  max-width: 480px;
  height: auto;
}

header p {
  margin-top: 24px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.75;
  margin-bottom: 24px;
}

/* Footer Styles */
footer {
  position: relative;
  width: 100vw;
  padding: 0 24px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 24px;
}

footer .logo {
  height: 32px;
  width: auto;
}

footer .logo {
  height: 32px;
  width: auto;
}

footer > div {
  display: flex;
  gap: 8px;
}

footer > div a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  background-color: transparent;
  border: none;
  text-decoration: none;
}

footer > div a img {
  width: 36px;
  height: 36px;
  transition: filter 0.3s ease;
}

footer > div a:hover {
  background-color: white;
}

footer > div a:hover img {
  filter: invert(1);
}

/* Countdown Clock Styles */
.countdown-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}

.flip-clock {
  display: flex;
  flex-direction: column;
  border: 2px solid white;
  border-radius: 12px;
  overflow: hidden;
}

.clock-row {
  display: flex;
}

.clock-cell {
  width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 2px solid white;
  padding: 12px;
}

.clock-cell:last-child {
  border-right: none;
}

.clock-row:last-child .clock-cell {
  border-bottom: none;
}

.numbers-row .clock-cell {
  min-height: 64px;
  position: relative;
  padding-top: 4px;
  padding-bottom: 4px;
}

.numbers-row .clock-cell::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: white;
}

/* Flip Card Styles */
.flip-card-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.flip-card {
  position: relative;
  width: 32px;
  height: 64px;
  background: transparent;
  overflow: hidden;
}

.flip-card-top-current {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  top: 0;
  left: 0;
  z-index: 2;
}

.flip-card-top-current-front,
.flip-card-top-current-back {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  top: 0;
  left: 0;
}

.flip-card-top-current-front {
  transform: translateY(0);
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card-top-current-back {
  transform: translateY(-200%);
  z-index: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.1s;
  opacity: 0;
  pointer-events: none;
  display: none;
}

.flip-card.rolling .flip-card-top-current-front {
  transform: translateY(100%);
}

.flip-card.rolling .flip-card-top-current-back {
  transform: translateY(0);
  transition-delay: 0.3s;
  opacity: 1;
  display: flex;
  z-index: 3;
}

/* Label Styles */
.time-label {
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
}

/* Responsive Styles */
@media (max-width: 600px) {
  header img {
    max-width: 320px;
  }

  header p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 12px;
  }

  .flip-clock {
    border-width: 2px;
    border-radius: 12px;
    margin-top: 12px;
  }

  .flip-card-container {
    gap: 0;
  }

  .flip-card {
    width: 24px;
    height: 50px;
    margin: 0 -3px;
  }

  .flip-card-top-current-front,
  .flip-card-top-current-back {
    font-size: 1.4rem;
  }

  .clock-cell {
    width: 50px;
    padding: 12px;
    border-right-width: 2px;
  }

  .numbers-row .clock-cell {
    min-height: 50px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .numbers-row .clock-cell::after {
    left: 6px;
    right: 6px;
    height: 2px;
  }

  .time-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
  }
}
