.mf_view {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mf_view_inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 2rem 2.8rem 2.8rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--border-radius-l);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.mf_view_inner.blood_gh {
  background: linear-gradient(135deg, #fff0f3 0%, #ffe4ec 50%, #ffd6e0 100%);
  border: 1px solid rgba(255, 182, 193, 0.4);
}
.mf_view_title_box_nonbg {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mf_view_title_box {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(135deg, #f7b733 0%, #fc4a1a 100%);
  border-radius: var(--border-radius-s);
}
.mf_view_title_box.center {
  align-items: center;
}

.mf_view_title {
  font-size: 3rem;
  font-weight: 700;
  color: white;
}
.mf_view_title.orange {
  text-align: center;
  color: #ff6b2a;
}
.mf_view_title.pink {
  text-align: center;
  color: #e75480;
}
.mf_view_sub_title {
  font-size: var(--size-base);
  font-weight: var(--weight-regular);
  color: var(--color-white);
}
.mf_view_direction_text {
  text-align: center;
  font-weight: 500;
  font-size: var(--size-xs);
  color: var(--color-gray2);
  white-space: pre-line;
}
.mf_view_direction_text.lottery {
  width: 80%;
  padding: 16px;
  font-size: var(--size-sm);
  background-color: #7e7e7e;
  border-radius: var(--border-radius-xs);
  white-space: wrap;
  color: var(--color-white);
}
.mf_view_button_box {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
}

.mf_view_button {
  font-size: var(--size-lg);
  font-weight: 600;
  color: var(--color-white);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 30px;
  border-radius: 100px;
  width: 60%;
  background: linear-gradient(135deg, #f7b733 0%, #fc4a1a 100%);
  white-space: nowrap;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.mf_view_button.pink {
  background: linear-gradient(135deg, #ff6b95 0%, #e75480 100%);
  width: 60%;
}
.mf_view_button.blue {
  background: linear-gradient(135deg, #6aaaf8 0%, #3b82f6 100%);
  width: 60%;
}
.mf_view_button.w40 {
  width: 40%;
}

.roulette-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#rouletteCanvas {
  width: 100%;
  height: 100%;
  transition: transform 5s cubic-bezier(0.15, 0, 0.15, 1);
}

/* 룰렛 상단 바늘 */
.roulette-pin {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid #ff5e00;
  z-index: 10;
}

/* 중앙 버튼 스타일 */
.spin-main-button {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fdb03b;
  color: #fff;
  border: 4px solid #cda957;
  font-weight: bold;
  cursor: pointer;
  z-index: 11;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
  font-size: var(--size-base);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.spin-main-button:hover {
  transform: scale(1.05);
}
.spin-main-button:disabled {
  background: #999;
  border-color: #ccc;
  cursor: default;
}
.white_bg_box {
  flex: 1;
  width: 100%;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--color-white);
  border-radius: var(--border-radius-s);
}
.white_bg_box.center {
  align-items: center;
}
.white_bg_box.orange_border {
  border: 2px solid #d97706;
  gap: 10px;
}
.white_bg_box_title {
  font-size: var(--size-base);
  font-weight: var(--weight-medium);
  color: #d97706;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-gray);
}
.white_bg_box_title.white {
  color: white;
}
.white_bg_box_title.blue {
  color: #4a90d9;
}
.white_bg_box_title.pink {
  color: #e75480;
}
.white_bg_box_title.nbb {
  padding: 0;
  border: none;
}
.white_bg_box_text {
  font-size: var(--size-base);
  font-weight: var(--weight-regular);
  color: var(--color-black2);
}
.white_bg_box_text p {
  white-space: pre-line;
}
.white_bg_box_text span {
  white-space: pre-line;
}
.white_bg_box_text.text_center {
  text-align: center;
  font-size: var(--size-sm);
  color: var(--color-gray);
}
.view_ddi_icon_img {
  width: 40px;
  aspect-ratio: 1/1;
}

#today_ddi_text {
  text-align: center;
}
#lotto_number {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.lotto-num {
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.2), 2px 2px 5px rgba(0, 0, 0, 0.1);
}
.ball-yellow {
  background-color: #fbc400;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}
.ball-blue {
  background-color: #69c8f2;
}
.ball-gray {
  background-color: #aaaaaa;
}
.ball-pink {
  background-color: #ee84af;
}
.ball-green {
  background-color: #b0d840;
}
.blood_type_select_box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blood_type_button_box {
  width: 100%;
  display: flex;
  gap: 10px;
}
.blood_type_button {
  flex: 1;
  padding: 16px 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--border-radius-s);
  border: 1px solid var(--color-border-gray);
  font-size: var(--size-sm);
  font-weight: var(--weight-medium);

  /* 탭 하이라이트 제거 (반짝임 방지) */
  -webkit-tap-highlight-color: transparent;

  /* 터치 시 시스템 메뉴 방지 (선택 사항) */
  touch-action: manipulation;

  /* 텍스트 선택 방지 (더 버튼 같은 느낌을 줌) */
  user-select: none;
  -webkit-user-select: none;
}
.selected_blood_type {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.selected_male_blood_type {
  font-size: var(--size-lg);
  font-weight: var(--weight-large);
  color: #4a90d9;
}
.selected_female_blood_type {
  font-size: var(--size-lg);
  font-weight: var(--weight-large);
  color: #e75480;
}
/* 남성 버튼 선택 시 */
.blood_type_select_box:nth-child(1) .blood_type_button.active {
  background-color: #4a90d9; /* 주신 남성 텍스트 컬러와 맞춤 */
  color: #ffffff;
  border-color: #4a90d9;
}

/* 여성 버튼 선택 시 */
.blood_type_select_box:nth-child(2) .blood_type_button.active {
  background-color: #e75480; /* 주신 여성 텍스트 컬러와 맞춤 */
  color: #ffffff;
  border-color: #e75480;
}
.select_ddi_box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
.select_ddi_item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background-color: var(--color-white);
  border-radius: var(--border-radius-s);
  padding: 16px;
  border: 1px solid #f59e0b33;
}
.select_ddi_item img {
  width: 30px;
  height: 30px;
}
.select_ddi_item span {
  font-size: var(--size-sm);
  font-weight: var(--weight-large);
  color: #d97706;
  text-align: center;
}
.select_ddi_item:hover {
  border-color: #f59e0b;
  background-color: #fffbeb;
  transform: translateY(-2px);
}
.select_ddi_item.active {
  background-color: #f59e0b;
  border-color: #d97706;
}
.number_input_container {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  position: relative;
}

#job_number_input {
  width: 100%;
  padding: 10px 0;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 0;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 15px;
  background-color: #f8f9fa;
  color: #6c757d;
  caret-color: #6c757d;
}
#lucky_number_input {
  width: 100%;
  padding: 10px 0;
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 15px;
  background-color: #f8f9fa;
  color: #6c757d;
  caret-color: #6c757d;
}

#job_number_input,
#lucky_number_input:focus {
  outline: none;
  border-color: #e6a33e;
  background-color: #fff;
}
.oheang_text {
  font-size: var(--size-3xl);
  font-weight: var(--weight-medium);
  color: #089722;
  text-align: center;
}
.intro_img_box {
  margin: 0 auto;
  width: 180px;
  aspect-ratio: 1/1;
  border-radius: 100%;
  overflow: hidden;
  border: 4px solid #f7b733;
}
.intro_img {
  width: 100%;
  aspect-ratio: 1/1;
}
.spin_coin_img {
  width: 80px;
}
.selected_gender_img {
  width: 140px;
  aspect-ratio: 1/1;
}
.birth_info_text {
  font-size: var(--size-sm);
  font-weight: var(--weight-medium);
  color: #d97706;
  text-align: center;
}
.birth_info_text.pink {
  color: #e75480;
}
@media screen and (max-width: 500px) {
  .roulette-wrapper {
    width: 280px;
    height: 280px;
    margin: 15px auto;
  }
  .mf_view_title {
    font-size: 2.8rem;
  }
}
@media screen and (max-width: 420px) {
  .roulette-wrapper {
    width: 220px;
    height: 220px;
    margin: 15px auto;
  }
  .spin-main-button {
    width: 50px;
    height: 50px;
    font-size: 10px;
  }
}

@media screen and (max-width: 360px) {
  .roulette-wrapper {
    width: 200px;
    height: 200px;
    margin: 15px auto;
  }
  .spin-main-button {
    width: 50px;
    height: 50px;
    font-size: 10px;
  }
  .roulette-pin {
    top: -10px;
    border-top-width: 25px;
    border-left-width: 12px;
    border-right-width: 12px;
  }
  .mf_view_title {
    font-size: 2.2rem;
  }
  .mf_view_sub_title {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  .select_ddi_box {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .select_ddi_item {
    padding: 10px 2px;
  }
  .select_ddi_item img {
    width: 36px;
    height: 36px;
  }
  #job_number_input {
    font-size: 20px;
  }
  #lucky_number_input {
    font-size: 18px;
  }
  .mf_view_button {
    font-size: var(--size-sm);
  }
  .intro_img {
    width: 180px;
    height: auto;
  }
}

@media screen and (max-width: 320px) {
  .roulette-wrapper {
    width: 180px;
    height: 180px;
    margin: 15px auto;
  }
  .spin-main-button {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }
}
