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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f6;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

h1 {
  color: #333;
  margin-bottom: 30px;
}

#lotto-numbers {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  min-height: 60px;
}

.numbers-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.game-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 10px;
}

.placeholder {
  color: #777;
  font-size: 1.1rem;
  line-height: 60px;
}

.ball {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  transform: scale(0.5);
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 로또 번호 색상 */
.color-yellow { background-color: #fbc400; }
.color-blue { background-color: #69c8f2; }
.color-red { background-color: #ff7272; }
.color-grey { background-color: #aaa; }
.color-green { background-color: #b0d840; }

.plus-sign {
  font-size: 2rem;
  font-weight: bold;
  color: #555;
  display: flex;
  align-items: center;
  margin: 0 10px;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  transform: scale(0.5);
}

.options {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 1.1rem;
  color: #555;
}

.options div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.options label {
  cursor: pointer;
}

button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
}

button:hover:not(:disabled) {
  background-color: #45a049;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* 다크 모드 스타일 */
body {
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #121212;
}

body.dark-mode .container {
  background-color: #1e1e1e;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

body.dark-mode h1 {
  color: #fff;
}

body.dark-mode .placeholder {
  color: #bbb;
}

body.dark-mode .options {
  color: #ddd;
}

body.dark-mode .plus-sign {
  color: #ddd;
}

body.dark-mode .game-row {
  background-color: #2c2c2c;
}

.theme-toggle-btn {
  background-color: transparent;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: normal;
  border-radius: 20px;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 15px;
  transition: all 0.3s;
}

body.dark-mode .theme-toggle-btn {
  color: #fff;
  border-color: #555;
}

.theme-toggle-btn:hover:not(:disabled) {
  background-color: #f0f0f0;
}

body.dark-mode .theme-toggle-btn:hover:not(:disabled) {
  background-color: #333;
}

/* 반응형 모바일 설정 */
@media (max-width: 600px) {
  .container {
    padding: 30px 15px;
    width: 95%;
  }

  h1 {
    font-size: 1.5rem;
    margin-top: 30px; /* 다크모드 버튼과 겹치지 않게 여백 추가 */
    margin-bottom: 20px;
  }

  .ball {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .game-row {
    gap: 6px;
    padding: 8px 5px;
  }

  .plus-sign {
    font-size: 1.5rem;
    margin: 0 2px;
  }

  .options {
    font-size: 0.95rem;
    gap: 12px;
    flex-direction: column;
    align-items: center;
  }

  button#generate-btn {
    padding: 12px 20px;
    font-size: 1.1rem;
    width: 100%;
  }

  .theme-toggle-btn {
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}