html {
  background-color: #00130b;
  height: 100%;
}

body {
  font-family: "Jetbrains Mono", monospace;
  height: 95vh;
  background-size: 17px 17px;
  background-image: radial-gradient(
    circle,
    #a6883a15 1px,
    rgba(0, 0, 0, 0) 1px
  );
}

.container {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.message {
  text-align: center;
}

.logo {
  margin: 0;
}

/* Hidden photo: revealed by pressing and holding the card.
   The resting transition below plays on hide: the photo fades and shrinks
   away first, then the space closes behind it. */
.photo {
  display: block;
  margin: 0 auto;
  width: 150px;
  height: 0;
  object-fit: cover;
  border-radius: 50%;
  border: 0 solid #7f5dd5;
  opacity: 0;
  transform: scale(0.6);
  filter: blur(6px);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition:
    opacity 0.25s ease-in,
    transform 0.3s ease-in,
    filter 0.25s ease-in,
    height 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
    border-width 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
    margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

/* This transition plays on reveal: the space opens while the photo
   springs in from a soft blur. */
.photo.revealed {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  height: 150px;
  border-width: 3px;
  margin-bottom: 16px;
  transition:
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    margin-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease 0.1s,
    filter 0.45s ease 0.1s,
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
}
.title-container {
  color: white;
  border-radius: 5px;
  font-weight: lighter;
  padding: 15px;
  margin: 5px;
  background: linear-gradient(305deg, #1e9a5a 0%, #4f36c0 100%);
  box-shadow: 0 0 0 0 rgba(127, 93, 213, 0);
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.title-container:hover,
.title-container:focus {
  font-size: 105%;
  border-radius: 10px;
  padding-left: 20px;
  padding-right: 20px;
  box-shadow: 0 0 0 3px #7f5dd5;
}

.title {
  margin: 0;
  color: #00130b;
  font-weight: bold;
  font-size: x-large;
}

.subtitle-container {
  font-family: "Reem Kufi", sans-serif;
  font-size: x-large;
  color: #7f5dd5;
}

.links {
  font-family: "Fira Sans", sans-serif;
  color: #c3c3c3;
}

/* Anniversary-day banner above the counter */
.celebration {
  margin: 0 0 10px;
  font-size: large;
  font-weight: bold;
  background: linear-gradient(90deg, #63d297, #b39dfc, #63d297);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-text 4s linear infinite;
}

@keyframes shimmer-text {
  to {
    background-position: 200% center;
  }
}

/* Animated gradient on the counter card during the anniversary day */
.celebrating {
  background-size: 200% 200%;
  animation: shimmer-bg 5s ease-in-out infinite;
}

@keyframes shimmer-bg {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Daily 16:16 glow */
.wink {
  box-shadow:
    0 0 24px #7f5dd5aa,
    0 0 56px #1e9a5a66;
}

.title-container.wink:hover,
.title-container.wink:focus {
  box-shadow:
    0 0 0 3px #7f5dd5,
    0 0 24px #7f5dd5aa,
    0 0 56px #1e9a5a66;
}

/* Year/month/day rows: numbers and labels hug a shared centre column */
.rows {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 0.6ch;
  row-gap: 0.15em;
}

.row-num {
  text-align: right;
}

.row-label {
  text-align: left;
}

/* Odometer clock: each digit is a window over a rolling strip of numbers */
.clock {
  --cell: 1.3em;
  display: flex;
  justify-content: center;
  margin-top: 0.8em;
}

.digit {
  display: block;
  height: var(--cell);
  overflow: hidden;
}

.digit-strip {
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.digit-strip.no-anim {
  transition: none;
}

.digit-cell,
.digit-sep {
  display: block;
  height: var(--cell);
  line-height: var(--cell);
}

/* Info section under the subtitle */
.details {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #8fa89b;
}

.details p {
  margin: 0;
  line-height: 1.6;
}

.since .hijri {
  display: block;
  font-family: "Reem Kufi", sans-serif;
  color: #7f5dd5;
}

.fun-fact {
  color: #63d297;
  cursor: pointer;
  user-select: none;
  animation: fade-in 0.6s ease;
  transition: color 0.2s;
}

.fun-fact:hover {
  color: #b39dfc;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.progress-track {
  width: min(300px, 78vw);
  height: 6px;
  border-radius: 3px;
  background: #ffffff14;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  background: linear-gradient(90deg, #1e9a5a, #7f5dd5);
  transition: width 1s linear;
}

.progress-label {
  font-size: 0.72rem;
  color: #6d8578;
}

.next-milestone {
  color: #8fa89b;
}

@media (prefers-reduced-motion: reduce) {
  .celebration,
  .celebrating,
  .fun-fact {
    animation: none;
  }

  .progress-fill,
  .digit-strip,
  .photo,
  .photo.revealed {
    transition: none;
  }
}
