body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  row-gap: 1em;
  background-image: radial-gradient(circle, #e9d6ff 60%, #e1cccc);
  font-family: sans-serif;
}

.scratch-card {
  display: flex;
  justify-content: center;
  position: relative;
  border-radius: 8px;
  max-width: 100%;
  max-height: 100%;
  width: 520px;
  height: 520px;
  background-color: #fff;
}

.scratch-card-cover-container {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  border-radius: 4px;
  width: 100%;
  height: 100%;
  filter: url('#remove-black');
  transition: opacity .4s;

  &.clear {
    opacity: 0;
  }
  
  &.hidden {
    display: none;
  }
}

.scratch-card-canvas {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  
  &.hidden {
    opacity: 0;
  }
  
  &:active {
    cursor: grabbing;
  }
}

.scratch-card-canvas-render {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  transition: background-color .2s;
  
  &.hidden {
    display: none;
  }
}

.scratch-card-cover {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #cfced6;
  background-image: radial-gradient(#b2a7ff, #a871bf);
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, transparent 40%, rgb(255 255 255 / .8) 50%, transparent 60%);
    background-position: bottom right;
    background-size: 300% 300%;
    background-repeat: no-repeat;
    
    @at-root .scratch-card-cover.shine::before {
      animation: 
        shine 8s infinite,
      ;
    }
  }
  
  @keyframes shine {
    50% {
      background-position: 0% 0%;
    }
    100% {
      background-position: -50% -50%;
    }
  }
  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: .1;
    filter: url('#noise');
  }
}

.scratch-card-cover-background {
  width: 100%;
  height: 100%;
  fill: #4A148C;
  opacity: .1;
}

.scratch-card-image {
  text-align: center;
  border-radius: 4px;
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgb(0 0 0 / .16));
  user-select: none;
  will-change: transform;
  background-color: #cfced6;
  background-image: radial-gradient(#e9d6ff , #e9d6ff);
  
  &.animate {
    animation: pop-out-in cubic-bezier(.65, 1.35, .5, 1) 1s;
  }
}

.scratch-card-image {
  max-width: 600px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  text-align: center;
}

.scratch-card-image h1.date {
  font-size: 2.5rem;
  color: #8b5e3c;
  margin: 0.5rem 0;
}

.scratch-card-image p {
  margin: 1rem 0;
  font-size: 1.2rem;
  line-height: 1.8;
}

.scratch-card-image .intro {
  font-weight: bold;
  color: #5a3726;
}

.scratch-card-image .content {
  color: #4a3624;
}

.scratch-card-image .closing {
  font-style: italic;
  color: #8b5e3c;
}

/* Add subtle animation */
.scratch-card-image:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Add media query for responsiveness */
@media (max-width: 768px) {
  .scratch-card-image {
    padding: 1.5rem;
  }

  .scratch-card-image h1.date {
    font-size: 2rem;
  }

  .scratch-card-image p {
    font-size: 1rem;
  }
}

@keyframes pop-out-in {
  36% {
    transform: scale(1.125);
  }
  100% {
    transform: scale(1);
  }
}