* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.container {
  text-align: center;
  padding: 40px 30px;
  max-width: 500px;
  width: 90%;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 30px;
}

.balls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 70px;
  margin-bottom: 30px;
}

.ball {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  animation: pop 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ball.c1 { background: #fbc400; color: #333; }
.ball.c2 { background: #69c8f2; }
.ball.c3 { background: #ff7272; }
.ball.c4 { background: #aaa; color: #333; }
.ball.c5 { background: #b0d840; color: #333; }

@keyframes pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

button {
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  border: none;
  padding: 16px 50px;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(233, 69, 96, 0.6);
}

button:active {
  transform: scale(0.97);
}

.history {
  margin-top: 40px;
  text-align: left;
  display: none;
}

.history.show {
  display: block;
}

.history h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #ccc;
}

.history ul {
  list-style: none;
}

.history li {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history li .nums {
  font-weight: bold;
  letter-spacing: 1px;
}

.history li .time {
  font-size: 0.8rem;
  color: #888;
}
