* {
  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: 480px;
  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.1em;
  color: #f59e0b;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin: 0 0 0.75rem;
}

.pick-area,
.draw-area,
.actions,
.result-area {
  margin-bottom: 1.5rem;
}

.picked-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  min-height: 2rem;
  margin-bottom: 1rem;
}

.picked-numbers .placeholder {
  opacity: 0.5;
  font-size: 1.1rem;
}

.picked-ball {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.4);
  border: 2px solid #f59e0b;
  border-radius: 50%;
  color: #fff;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.num-btn {
  aspect-ratio: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8e8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.num-btn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
}

.num-btn:disabled {
  cursor: default;
}

.num-btn.selected {
  background: rgba(245, 158, 11, 0.5);
  border-color: #f59e0b;
  color: #fff;
}

.num-btn.selected:hover {
  background: rgba(245, 158, 11, 0.35);
}

.hint {
  font-size: 0.75rem;
  opacity: 0.65;
  text-align: center;
  margin: 0;
}

.draw-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.draw-ball {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #e8e8e8;
}

.draw-ball.revealed {
  background: rgba(245, 158, 11, 0.35);
  border-color: #f59e0b;
  color: #fff;
  animation: pop 0.3s ease;
}

.draw-ball.match {
  background: rgba(34, 197, 94, 0.5);
  border-color: #22c55e;
}

@keyframes pop {
  0% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.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: #f59e0b;
  color: #1a1a2e;
}

.btn-play:hover:not(:disabled) {
  background: #fbbf24;
  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: #f87171;
}
