body {
    font-family: Arial, sans-serif;
    background: repeating-linear-gradient(
        #f0a7a7 0 80px, 
        #f5d19b 80px 160px,
        #f5f09c 160px 240px, 
        #9cf49b 240px 320px, 
        #b6d9fc 320px 400px,
        #f691e9 400px 480px 
    );
    background-size: 200% 200%;
    animation: moveStripes 60s linear infinite;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

@keyframes moveStripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 200% 200%;
    }
}

h1 {
  font-family: 'Shizuru', cursive;
  font-size: clamp(18px, 6vw, 36px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 10px;
  margin: 10px 0 0 0;
  text-align: center;
  color: #000000;
}

main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}

#loading {
    font-size: 1.2em;
    font-family: "Shizuru", system-ui, sans-serif;
    font-weight: 800;
    text-align: center;
    margin: 1em 0;
}

#card-container {
    position: relative;
    width: 80%;
    max-width: 400px;
    aspect-ratio: 3 / 4;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, opacity 0.3s;
}

#summary {
    display: none;
    text-align: center;
    font-family: 'Shizuru', cursive;
}

.liked-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin: 5px;
    border-radius: 8px;
}

#restart {
    display: none;
    margin: 20px;
    padding: 10px 20px;
    background-color: #ffcccb;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.card .swipe-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

@keyframes swipe-nudge {
  0% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-20px) rotate(-5deg); }
  50% { transform: translateX(0) rotate(0); }
  75% { transform: translateX(20px) rotate(5deg); }
  100% { transform: translateX(0) rotate(0); }
}

.card.show-hints {
  animation: swipe-nudge 3s ease-in-out infinite;
}

.card .swipe-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.card .like-hint {
  left: 5%;
}

.card .dislike-hint {
  right: 5%;
}

.sparkle {
  position: fixed;
  top: 50%;
  width: 60px;
  height: 60px;
  font-size: 3rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.5);
  transition: opacity 0.3s ease;
  z-index: 9999;
  user-select: none;
  will-change: transform, opacity;
  text-align: center;
  line-height: 60px;
}

#sparkle-left {
  left: 10px;
}

#sparkle-right {
  right: 10px;
}

@keyframes sparkleAnim {
  0% {
    opacity: 1;
    transform: translateY(-50%) scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(0.5) rotate(360deg);
  }
}