:root {
  --bg-color: #ffffff;
  --text-primary: #1a237e;
  --text-secondary: #3949ab;
  --accent-color: #2b5a9f;
  --gray-text: #666666;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* 모바일에서 꾹 눌렀을 때 텍스트 선택 방지 */
  user-select: none;
  -webkit-user-select: none;
  /* 버튼 클릭 시 하이라이트 박스 제거 */
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  font-family: "Pretendard", sans-serif;
  color: var(--text-primary);

  /* 모바일 브라우저 높이 이슈 해결 (주소창 제외한 실제 높이) */
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;

  /* 더블 탭 확대 방지 */
  touch-action: manipulation;
}

.main-container {
  text-align: center;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  /* 세로로 긴 화면에서도 중앙 정렬 유지 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* --- 헤더 디자인 --- */
header {
  margin-bottom: 20px;
}

.sub-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.main-title {
  /* 화면 크기에 따라 글자 크기 자동 조절 */
  font-size: clamp(1.5rem, 5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 15px;
  word-break: keep-all;
}

.divider {
  width: 30px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 0 auto 15px;
  border-radius: 2px;
}

.event-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.desc {
  font-size: 0.9rem;
  color: var(--gray-text);
  font-weight: 400;
}

/* --- 룰렛 컨테이너 (핵심 반응형) --- */
.wheel-container {
  position: relative;
  /* 화면 너비의 85%를 차지하되, 최대 360px은 넘지 않음 */
  width: 85vw;
  max-width: 360px;
  /* 정사각형 비율 유지 */
  aspect-ratio: 1 / 1;
  margin: 20px auto;
}

.marker {
  position: absolute;
  top: -5%; /* 비율로 조정 */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid var(--accent-color);
  z-index: 20;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.1));
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  transition: transform 4s cubic-bezier(0.25, 1, 0.5, 1);

  background-image: url("image_3.png");
  background-size: cover;
  background-position: center;

  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border: 4px solid #fff;
}

.center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 버튼 크기도 룰렛 크기에 비례하게 설정 */
  width: 25%;
  height: 25%;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  border: none;
  background-color: transparent;
  outline: none;
}

.center-btn:active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* --- 결과 텍스트 --- */
.result-display {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  min-height: 60px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  word-break: keep-all; /* 단어 단위 줄바꿈 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
