body {
    font-family: sans-serif;
    background-color:black;
}

main, header, footer {
    padding: 20px;
    display:flex;
    justify-content: center;
    flex-direction:column;
    align-items: center;
}

/* Keep your main header clean */
#site-header {
    min-height: 150px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative; /* This is crucial for positioning the lace */
    text-align: center;
    padding-bottom: 25px; /* Adds space at the bottom so text doesn't touch the lace */
    margin: 0; 
    padding: 0;
}

#site-footer {
    min-height: 150px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative; /* This is crucial for positioning the lace */
    text-align: center;
    padding-top: 25px; /* Adds space at the bottom so text doesn't touch the lace */
    margin: 0; 
    padding: 0;
}

.lace-border-header {
    /* 1. Force it to stretch to the absolute edges of the parent header */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;

    /* 2. Center your h1 text inside this absolute container */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 3. Your perfectly sliced lace border rules */
    border-bottom: 25px solid transparent; 
    border-image-source: url('/img/blacklacelarge.png');
    border-image-outset: 25px 0 25px 0;
    border-image-slice: 34;
    border-image-width: 25px 0 25px 0; 
    border-image-repeat: round;
    
    /* 4. Ensure mouse clicks (like selecting text) pass right through the border layer */
    pointer-events: none; 
}

.lace-border-footer {
    /* 1. Force it to stretch to the absolute edges of the parent header */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;

    /* 2. Center your h1 text inside this absolute container */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 3. Your perfectly sliced lace border rules */
    border-top: 25px solid transparent; 
    border-image-source: url('/img/blacklacelarge.png');
    border-image-outset: 25px 0 0 0;
    border-image-slice: 34;
    border-image-width: 25px 0 0 0; 
    border-image-repeat: round;
    
    /* 4. Ensure mouse clicks (like selecting text) pass right through the border layer */
    pointer-events: none; 
}

/* Ensure the h1 can still be clicked/interacted with if needed */
.lace-border h1 {
    pointer-events: auto;
}

footer {
    border-top: 2px solid black;
}

main {
    background-image: url("/img/ae.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    min-height: 100vh;
}

.display {
    display:flex;
    flex-direction:column;
    align-items: center;
}

.stamp img {
    max-height:50px;
}

.card {
    border:none;
}

.character {
  position: relative;
  width: min(407px, 90vw);
  aspect-ratio: 407 / 935;
  cursor: pointer;
}

.character-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
  animation: none !important;
}

.character-normal {
  z-index: 2;
}

.character-reacting {
  z-index: 3;
  display: none;
}

/* Only this rule controls which complete character PNG is shown. */
.character.show-reaction .character-normal {
  display: none;
}

.character.show-reaction .character-reacting {
  display: block;
}

.pupil {
  position: absolute;
  z-index: 1;
  pointer-events: none;
 width: 10%;
  height: auto;
  max-width: none;
}

.character.is-bouncing {
  animation: character-bounce 650ms ease-out;
}

@keyframes character-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1, 1);
  }

  20% {
    transform: translateY(0) scale(1.08, 0.92);
  }

  45% {
    transform: translateY(-15px) scale(0.94, 1.06);
  }

  65% {
    transform: translateY(0) scale(1.04, 0.96);
  }

  82% {
    transform: translateY(-10px) scale(0.98, 1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .character.is-bouncing {
    animation: none;
  }
}

.eye-whites {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.character-overlay {
  position: fixed;
  right: 24px;
  bottom: 18px;

  width: clamp(120px, 18vw, 260px);
  aspect-ratio: 407 / 935;

  z-index: 1000;
}

.character-layer,
.eye-whites,
.pupil {
  pointer-events: none;
}

#header {
    -webkit-text-stroke: 1px #1a1a1a;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

#iconCarousel {
  max-width: 460px;
  margin-inline: auto;
}

#iconCarousel .carousel-item {
  min-height: 280px;
  padding: 28px 68px 48px;
}

.icon-card {
  min-height: 200px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  border-radius: 18px;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.icon-card:hover,
.icon-card:focus-visible {
  transform: translateY(-4px);
  color: inherit;
}

.icon-card img {
  width: min(200px, 45vw);
  height: 200px;
  object-fit: contain;
  border-radius:50%
}

.icon-card span {
  font-size: 1.2rem;
  font-weight: 700;
}

#iconCarousel .carousel-indicators {
  bottom: -8px;
}

#iconCarousel .carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  margin-inline: 6px;
  border: 0;
  border-radius: 50%;
  background-color: white;
  opacity: 0.35;
}

#iconCarousel .carousel-indicators .active {
  opacity: 1;
}

#iconCarousel .carousel-control-prev,
#iconCarousel .carousel-control-next {
  width: 52px;
  opacity: 1;
}

#iconCarousel .carousel-control-prev-icon,
#iconCarousel .carousel-control-next-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #222;
  background-size: 55%;
}

@keyframes pulse {
  from {
    text-shadow: 
      0 0 5px #1a1a1a, 
      0 0 10px #1a1a1a, 
      0 0 20px #1a1a1a;
  }
  to {
    text-shadow: 
      0 0 10px #1a1a1a, 
      0 0 20px #1a1a1a, 
      0 0 40px #1a1a1a, 
      0 0 60px #1a1a1a;
  }
}
