:root {
  --primary-color: #4a90e2;
  --secondary-color: #f5f7fa;
  --accent-color: #ff4757;
  --text-color: #2f3542;
  --border-radius: 12px;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: #eef2f7;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  padding: 20px;
  margin: 0;
}

.container {
  width: 100%;
  max-width: 500px;
  background: white;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

h3 {
  text-align: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* 규칙 섹션 */
.rules {
  background: var(--secondary-color);
  padding: 15px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.rules div { margin-bottom: 5px; }

/* 입력 및 버튼 공통 */
input[type="text"], select {
  width: calc(100% - 24px);
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  background-color: var(--primary-color);
  color: white;
  width: 100%;
  margin-top: 5px;
}

button:hover { opacity: 0.9; transform: translateY(-1px); }
#clear { background-color: #ced4da; color: #444; margin-top: 5px; font-size: 1.1rem; }
#start { background-color: #2ed573; font-size: 1.1rem; }

/* 게임 정보 표시 칸 */
.game-info {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.info-box {
  flex: 1;
  background: #f1f3f5;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
}

.info-box span {
  display: block;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-top: 5px;
}

#timer {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
  margin: 15px 0;
}

/* 답변 리스트 */
.display-area {
  margin-top: 25px;
  border-top: 2px solid #eee;
  padding-top: 15px;
}

#display {
  margin-top: 10px;
}

.player-hint-item {
  background: #ffffff;
  border: 1px solid #edf2f7;
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 10px;
  display: flex;       /* 가로 배치 */
  align-items: center; /* 세로 중앙 정렬 */
  justify-content: flex-start; /* 왼쪽 정렬 */
  gap: 8px;            /* 이름과 힌트 사이 간격 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* 유틸리티 */
.none { display: none !important; }
.show { display: block }

/* 커스텀 알림창 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  width: 80%;
  max-width: 300px;
}

#state-info {
  font-size: 1rem;
  font-weight: 500;
  color: #636e72; /* 기본은 차분한 회색 */
  background-color: #f1f3f5;
  padding: 8px 15px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

/* 입력 중일 때 강조되는 스타일 */
.typing-active {
  color: var(--primary-color) !important;
  background-color: #e8f2ff !important;
  border: 1px solid #d0e3ff;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.dot-ani {
  display: inline-block;
  width: 1em;
}


/* GitHub Link Footer */
.game-footer {
  position: absolute;
  bottom : 0;
  width: 100%;
  padding: 30px 0 20px;
  margin-top: 40px;
  border-top: 1px solid #dee2e6;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.copyright {
  font-size: 0.75rem;
  color: #adb5bd;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #495057;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f1f3f5;
  transition: all 0.2s ease;
}

.github-link:hover {
  background: #e9ecef;
  color: var(--primary-color);
  transform: translateY(-2px);
}

.github-icon {
  fill: currentColor;
}