@charset "UTF-8";

/*====================
  제목 스타일
====================*/
h2 {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  color: #2c3e50;
  margin-bottom: 40px;
}

.center.draw-title {
  margin-bottom: 10px;
}

/*====================
  전체 게임 영역
====================*/
.draw-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draw-box.flex {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}

.canvas {
  width: 90px;
  height: 90px;
}

/*====================
  드래그 가능한 글자 박스
====================*/
.draw-basic.draw-word {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(../img/background.png) center center no-repeat;
  background-size: 93%;
  touch-action: none;
  position: relative;
}

.draw-basic.draw-word::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  border: 1px solid #ccc;
  pointer-events: none;
  box-sizing: border-box;
  z-index: -1;
}

/*====================
  자모 입력 안내 문구
====================*/
.letters {
  padding-bottom: 20px;
}

.letters strong {
  display: block;
  font-size: 20px;
  text-align: center;
  font-weight: normal;
  margin-bottom: 20px;
}

/*====================
  자모 영역 레이아웃 (자음 + 모음)
====================*/
.letter-wrap .draw-box-wrap .draw-box.flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/*====================
  드래그 상태 스타일
====================*/
.draggable {
  cursor: grab;
}

.draggable:active {
  cursor: grabbing;
}

.draggable-source {
  touch-action: none;
}

/*====================
  리셋 버튼 & nav 영역
====================*/
.navbtnwrap {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;

}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.nav a {
  font-size: 12px;
  color: #fff;
}

.nav span {
  background: #fff;
  padding: 5px 10px;
  border-radius: 50px;
}

.btnWrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resetText,
.check-btn {
  padding: 5px 10px;
  font-size: 16px;
  font-weight: bold;
  background-color: #fff;
  color: #232323;
  border: none;
  border-radius: 50px;
  width: fit-content;
}

.resetBtn {
  cursor: pointer;
}

/* 게임 disabled 칸 */
.drop-zone.disabled {
  background-color: #ddd;
  border: 2px solid #ccc;
  pointer-events: none;
}

#quiz-word {
  margin-bottom: 10px;
}

/* 모달 배경 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease-in-out;
}

/* 모달 내용 */
.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 30px;
  border-radius: 16px;
  width: 80%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  animation: slideUp 0.3s ease-in-out;
}

/* 닫기 버튼 */
.modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  color: #aaa;
  cursor: pointer;
}

.modal-close:hover {
  color: #000;
}

/* 정답/오답 색상 */
.modal.correct .modal-content {
  border: 3px solid #48c78e;
}

.modal.incorrect .modal-content {
  border: 3px solid #f14668;
}

/* 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
  }

  to {
    transform: translateY(0);
  }
}