:root {
  --bg-color: #f0f2f5;
  --container-bg: white;
  --text-color: #333;
  --placeholder-color: #999;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --btn-bg: #4a90e2;
  --btn-hover: #357abd;
  --btn-shadow: rgba(74, 144, 226, 0.3);
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --container-bg: #2d2d2d;
  --text-color: #e0e0e0;
  --placeholder-color: #777;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --btn-bg: #357abd;
  --btn-hover: #4a90e2;
  --btn-shadow: rgba(0, 0, 0, 0.3);
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 40px 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

.contact-section, .comment-section {
  margin-top: 2rem;
  text-align: left;
}

.contact-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--shadow-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--btn-bg);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-btn {
  padding: 14px;
  font-size: 1.1rem;
  font-weight: bold;
  background-color: var(--btn-bg);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px var(--btn-shadow);
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-2px);
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
}

#theme-btn {
  background: var(--container-bg);
  border: 1px solid var(--shadow-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: all 0.3s;
}

.container {
  text-align: center;
  background: var(--container-bg);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 25px var(--shadow-color);
  width: 90%;
  max-width: 500px;
  transition: background-color 0.3s, box-shadow 0.3s;
}

h1 {
  color: var(--text-color);
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.numbers-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  min-height: 60px;
  align-items: center;
}

.placeholder {
  color: var(--placeholder-color);
  font-size: 1.1rem;
}

.ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  animation: bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounce {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.yellow { background-color: #fbc400; color: #333; }
.blue { background-color: #69c8f2; }
.red { background-color: #ff7272; }
.gray { background-color: #aaaaaa; }
.green { background-color: #b0d840; }

#generate-btn {
  padding: 14px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  background-color: var(--btn-bg);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px var(--btn-shadow);
}

#generate-btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-2px);
}

#generate-btn:active {
  transform: translateY(0);
}

#generate-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
