:root {
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --card-bg: #ffffff;
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --bg-color: #1a1a1a;
  --text-color: #f8f9fa;
  --card-bg: #2d2d2d;
  --primary-color: #375a7f;
  --primary-hover: #2b4764;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

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

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

#dark-mode-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--text-color);
  background: var(--card-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
}

.container {
  text-align: center;
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 90%;
}

#result-container {
  margin: 2rem 0;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
}

body.dark-mode #result-container {
  background: rgba(255, 255, 255, 0.05);
}

#professor-name {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

#pick-btn {
  padding: 12px 24px;
  font-size: 1.1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

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

#pick-btn:active {
  transform: scale(0.95);
}

/* Animations */
.lucky {
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700, 0 0 20px #ffcc00;
  animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffcc00;
    transform: scale(1);
  }
  to {
    text-shadow: 0 0 20px #ffd700, 0 0 30px #ffaa00, 0 0 40px #ffaa00;
    transform: scale(1.1);
  }
}

.unlucky {
  color: #888;
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.unlucky-msg {
  display: block;
  font-size: 0.8rem;
  color: #ff4d4d;
  margin-top: 5px;
}
