body {
  background: #fafafa;
  text-align: center;
  font-family: sans-serif;
  padding: 50px;
}

#gacha-button {
  padding: 15px 30px;
  font-size: 18px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#gacha-button:hover {
  background-color: #0056b3;
}

#gacha-image {
  margin-top: 20px;
  width: 200px;
  height: auto;
}

#rarity-text {
  font-size: 20px;
  margin-top: 10px;
  font-weight: bold;
}

#history {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.history-item {
  text-align: center;
}

.history-item img {
  width: 80px;
  height: auto;
  border: 1px solid #ccc;
}

#clear-history {
  margin-top: 10px;
  padding: 5px 15px;
  font-size: 14px;
}

#result {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#gacha-image {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: none;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  border-radius: 10px;
}

#gacha-image.show {
  animation: pop 0.5s ease-out;
}

@keyframes pop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#ssr-effect {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  margin-left: -150px;
  margin-top: -150px;
  background: radial-gradient(circle, rgba(255,223,0,0.7), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: shine 1.5s ease-out;
  opacity: 0;
}

@keyframes shine {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.hidden {
  display: none;
}

#fullscreen-gacha-image {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  border-radius: 15px;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.6);
}

#fullscreen-gacha-image.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.hidden {
  display: none;
}
