:root {
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --container-bg: #ffffff;
  --ball-bg: #e9ecef;
  --primary-btn: #007bff;
  --primary-btn-hover: #0056b3;
  --header-border: #dee2e6;
  --footer-color: #6c757d;
}

[data-theme='dark'] {
  --bg-color: #121212;
  --text-color: #f8f9fa;
  --container-bg: #1e1e1e;
  --ball-bg: #333333;
  --primary-btn: #375a7f;
  --primary-btn-hover: #2b4764;
  --header-border: #444444;
  --footer-color: #adb5bd;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 90%;
  max-width: 600px;
  background-color: var(--container-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--header-border);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0;
}

.btn-theme {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--header-border);
  background-color: var(--ball-bg);
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.875rem;
}

.lotto-balls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.ball {
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 50%;
  text-align: center;
  font-weight: bold;
  font-size: 1.25rem;
  color: white;
  transition: transform 0.3s ease-in-out;
}

.ball.placeholder {
  background-color: var(--ball-bg);
  color: var(--footer-color);
}

/* Lotto ball colors by number ranges */
.ball-yellow { background-color: #fbc02d; }
.ball-blue { background-color: #1976d2; }
.ball-red { background-color: #d32f2f; }
.ball-gray { background-color: #757575; }
.ball-green { background-color: #388e3c; }

.controls {
  margin-bottom: 2rem;
}

.btn-primary {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--primary-btn);
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-btn-hover);
}

footer {
  font-size: 0.875rem;
  color: var(--footer-color);
}
