* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e8e8e8;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.game-container {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #dc2626;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin: 0 0 0.5rem;
}

.pick-area {
  margin-bottom: 1.25rem;
}

.pick-area.powerball-area {
  margin-bottom: 0.5rem;
}

.picked-numbers,
.picked-powerball {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  min-height: 2rem;
  margin-bottom: 0.75rem;
}

.picked-numbers .placeholder,
.picked-powerball .placeholder {
  opacity: 0.5;
  font-size: 1rem;
}

.picked-ball {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 50%;
  color: #1a1a2e;
}

.picked-ball.white {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
}

.picked-ball.powerball {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.95rem;
  background: #dc2626;
  border: 2px solid #b91c1c;
  color: #fff;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.3rem;
  margin-bottom: 0.25rem;
}

.powerball-grid {
  grid-template-columns: repeat(13, 1fr);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.num-btn {
  aspect-ratio: 1;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8e8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.num-btn:hover:not(:disabled) {
  background: rgba(248, 250, 252, 0.3);
  border-color: rgba(248, 250, 252, 0.5);
  color: #1a1a2e;
}

.powerball-grid .num-btn:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.3);
  border-color: rgba(220, 38, 38, 0.6);
  color: #fff;
}

.num-btn:disabled {
  cursor: default;
}

.num-btn.selected {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1a1a2e;
}

.powerball-grid .num-btn.selected {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}

.hint {
  font-size: 0.75rem;
  opacity: 0.65;
  text-align: center;
  margin: 0 0 1.25rem;
}

.draw-area {
  margin-bottom: 1.5rem;
}

.daily-label {
  font-size: 0.8rem;
  opacity: 0.85;
  text-align: center;
  margin: 0 0 0.5rem;
}

.draw-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.draw-white {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.draw-ball {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50%;
}

.draw-ball.white {
  background: rgba(248, 250, 252, 0.2);
  border: 2px solid rgba(248, 250, 252, 0.4);
  color: #e8e8e8;
}

.draw-ball.white.revealed {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1a1a2e;
  animation: pop 0.3s ease;
}

.draw-ball.white.match {
  background: #22c55e;
  border-color: #16a34a;
  color: #fff;
}

.draw-ball.powerball {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
  background: rgba(220, 38, 38, 0.3);
  border: 2px solid rgba(220, 38, 38, 0.6);
  color: #e8e8e8;
}

.draw-ball.powerball.revealed {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
  animation: pop 0.3s ease;
}

.draw-ball.powerball.match {
  background: #22c55e;
  border-color: #16a34a;
  color: #fff;
}

@keyframes pop {
  0% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-play {
  background: #dc2626;
  color: #fff;
}

.btn-play:hover:not(:disabled) {
  background: #ef4444;
  transform: translateY(-1px);
}

.btn-play:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-reset {
  background: rgba(255, 255, 255, 0.15);
  color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.25);
}

.result-area {
  min-height: 2.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.result-area.win {
  color: #4ade80;
}

.result-area.lose {
  color: #94a3b8;
}
