@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

* {
  font-family: Pretendard;
  box-sizing: border-box;
}

body {
  background: #f7f8fc;
  margin: 0;
  min-height: 100vh;
}

/* 좌/우 배치 */
.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  padding: 32px 16px;
}

/* 왼쪽(룰렛) */
.left {
  position: relative;
}

/* 💎 포인터 (보석 느낌) */
.left::before {
  content: "";
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ffd6e8, #ff4d8d);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 20;
}

/* ⭐ 결과 나올 때 포인터 튀는 효과 */
@keyframes pointerPop {
  0% {
    transform: translateX(-50%) rotate(45deg) scale(1);
  }
  50% {
    transform: translateX(-50%) rotate(45deg) scale(1.25);
  }
  100% {
    transform: translateX(-50%) rotate(45deg) scale(1);
  }
}

.left.result::before {
  animation: pointerPop 0.3s ease;
}

canvas {
  transition: 2s;
}

/* 오른쪽 컨트롤 */
.right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 320px;
}

.btnCol {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 버튼 */
button {
  background: #ea4444;
  padding: 0.85rem 1.4rem;
  border: none;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 900;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

button:active {
  background: #444;
  color: #fff;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 입력 영역 */
#addDiv {
  display: flex;
  gap: 10px;
  align-items: center;
}

#menuAdd {
  flex: 1;
  height: 44px;
  padding: 0 12px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
  background: #fff;
}

/* 모달 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.hidden {
  display: none;
}

.modal-box {
  background: #fff;
  padding: 24px 28px;
  border-radius: 16px;
  text-align: center;
  animation: pop 0.25s ease;
  min-width: 260px;
}

.modal-box p {
  font-size: 22px;
  font-weight: 900;
}

@keyframes pop {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 모바일 */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    gap: 24px;
  }
  .right {
    min-width: min(520px, 92vw);
  }
  .btnCol {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
