body {
  background: linear-gradient(180deg, #1e2126, #2e3440);
  color: #eee;
  font-family: "Indie Flower", cursive;
  text-align: center;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container {
  width: 90%;
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

h1 {
  font-family: "Lobster", cursive;
  font-size: 6rem;
  color: #4ecca3;
  text-shadow: 3px 3px #222;
  margin-bottom: 2.6rem;
}

.dice-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.dice p {
  font-size: 3rem;
  color: #4ecca3;
  margin-bottom: 0.7rem;
}

.dice img {
  width: 140px;
  max-width: 40vw;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  box-shadow: 0 0 20px rgba(78, 204, 163, 0.3);
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .dice img:hover {
    transform: scale(1.05);
  }
}

.roll-btn {
  background: linear-gradient(135deg, #4ecca3, #24b4e2);
  color: #1e2126;
  font-family: "Lobster", cursive;
  font-size: 2.5rem;
  padding: 16px 60px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(78, 204, 163, 0.4);
  transition: all 0.15s ease-in-out;
  display: inline-block;
}

.roll-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(78, 204, 163, 0.6);
}

.roll-btn.pressed {
  transform: scale(0.94);
  box-shadow: 0 3px 10px rgba(78, 204, 163, 0.3);
  filter: brightness(0.9);
}

footer {
  margin-top: 50px;
  color: #888;
  font-size: 1.3rem;
}

@keyframes smoothShake {
  0% { transform: rotate(0deg) translate(0, 0); }
  25% { transform: rotate(8deg) translate(4px, -3px); }
  50% { transform: rotate(-8deg) translate(-4px, 3px); }
  75% { transform: rotate(6deg) translate(3px, -2px); }
  100% { transform: rotate(0deg) translate(0, 0); }
}

.shake {
  animation: smoothShake 0.6s ease-in-out;
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  .dice-area {
    gap: 20px;
  }
  .dice img {
    width: 120px;
  }
  .roll-btn {
    font-size: 1.4rem;
    padding: 12px 40px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.4rem;
  }
  .dice img {
    width: 100px;
  }
  .roll-btn {
    font-size: 1.2rem;
    padding: 10px 30px;
  }
}
