body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Georgia", serif;
  background: linear-gradient(to bottom right, #ffe4f3, #e6d6ff);
  overflow: hidden;
  transition: background 0.5s;
}

body.dark {
  background: linear-gradient(to bottom right, #1a1a2e, #2a1f3d);
}

.card {
  position: relative;
  background: linear-gradient(to bottom, #ffffff, #fff5fb);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  text-align: center;
  width: 90%;
  max-width: 420px;
  border: 2px solid #f7c6e0;
  z-index: 2;
}

body.dark .card {
  background: linear-gradient(to bottom, #2c2340, #1f1a2e);
  border: 2px solid #7a5aa6;
  color: #eee;
}

h2 {
  margin-top: 0;
  color: #c96aa6;
}

body.dark h2 {
  color: #d6b3ff;
}

button {
  margin: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #fdf0f7;
  color: #3a2f52;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  font-weight: bold;
}  

button:hover {
  transform: scale(1.08);
  background: #ffd6ec;

  text-shadow:
    0 0 5px #ff9adf,
    0 0 10px #caa6ff,
    0 0 15px #a0e7e5;
}

body.dark button {
  background: #3a2f52;
  color: white;
}

.generate {
  margin-top: 10px;
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(to right, #ff8fcf, #caa6ff);
  color: white;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(255,143,207,0.5);
}

.box {
  background: linear-gradient(to bottom, #fff, #ffeaf5);
  padding: 15px;
  border-radius: 15px;
  margin: 15px 0;
  border: 1px solid #f3b6d6;
}

body.dark .box {
  background: #2a213b;
  border: 1px solid #7a5aa6;
}

.theme {
  font-size: 20px;
  font-weight: bold;
  white-space: pre-line;

  background: linear-gradient(
    270deg,
    #ff9adf,
    #caa6ff,
    #a0e7e5,
    #ffc6ff,
    #ffd6ec
  );
  background-size: 800% 800%;

  -webkit-background-clip: text;
   background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: pastelFlow 6s ease infinite;

  text-shadow: 0 0 10px rgba(255, 182, 255, 0.5);
}

.theme {
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

.box {
  backdrop-filter: blur(6px);
}

@keyframes pastelFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.toggle-dark {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 18px;
}

.sakura {
  position: fixed;
  width: 20px;
  pointer-events: none;
  animation: fall linear infinite;
  z-index: 1;
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

.credit {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 0 5px #ff9adf, 0 0 10px #ff9adf;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (max-width: 500px) {
  button {
    font-size: 11px;
    padding: 6px;
  }

  .theme {
    font-size: 16px;
  }
}

.sakura.far {
  filter: blur(1px);
  opacity: 0.4;
}

.sakura.mid {
  opacity: 0.7;
}

.sakura.near {
  filter: drop-shadow(0 0 6px pink);
  opacity: 1;
}

@keyframes pop {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(2) rotate(180deg); opacity: 0; }
}

.pop {
  animation: pop 0.5s forwards !important;
}

body {
  color: #5a2d4f;
}

body.dark {
  color: #eee;
}

.small {
  color: #b88aa6;
}

body.dark .small {
  color: #cbb6ff;
}

h2 {
  text-shadow: 0 0 10px #ffb3ec;
}

body.dark h2 {
  text-shadow: 0 0 10px #caa6ff;
}

#modeText {
  font-weight: bold;

  background: linear-gradient(
    90deg,
    #ff9adf,
    #caa6ff,
    #a0e7e5
  );

  -webkit-background-clip: text;
   background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow: 0 0 8px rgba(255, 170, 230, 0.6);
}

button.active {
  box-shadow: 0 0 10px #ff9adf, 0 0 20px #caa6ff;
  transform: scale(1.1);
}

body {
  transition: background 0.5s ease, color 0.5s ease;
}
.card {
  transition: all 0.4s ease;
}

@media (max-width: 500px) {
  .card {
    width: 90%;
    padding: 20px;
  }

  button {
    font-size: 12px;
    padding: 6px;
  }

  .theme {
    font-size: 16px;
  }
}

button:active {
  transform: scale(0.95);
}