/* ==============================
  關卡三彈出視窗樣式
============================== */

/* SweetAlert2 彈窗基礎樣式 */

.swal2-container {
  font-family: "Noto Sans TC", "黑體-繁", "Apple LiGothic Medium", "PingFang", "微軟正黑體", "Microsoft JhengHei", "WenQuanYi Zen Hei", "helvetica", "Arial", "sans-serif";
  font-weight: 400;
}

.swal2-shown {
  overflow: hidden;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
  background: rgba(0, 0, 0, 0.85);
}

.swal2-popup {
  border-radius: 24px;
  padding: 0;
  background: transparent;
  outline: 8px solid rgba(255, 255, 255, 0.4) !important;
}

/* 自定義關閉按鈕 */
.custom-close-button {
  position: fixed !important;
  right: 32px !important;
  top: 32px !important;
  left: auto !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 99999 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  outline: none !important;
}

.custom-close-button:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}
@media (max-width: 767px) {
  .custom-close-button {
    right: 12px !important;
    top: 12px !important;
  }
}
@media (max-width: 375px) {
  .custom-close-button {
    right: 8px !important;
    top: 8px !important;
  }
}
.custom-close-button img {
  width: 24px !important;
  height: 24px !important;
  display: block;
  outline: none !important;
  border: none !important;
}

.custom-close-button img:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* 卡片彈窗樣式 */
.swal2-card-popup,
.html-alert-popup,
.card-alert-popup {
  position: relative;
  display: flex !important;
  flex-direction: column;
  max-width: 360px;
  width: 90vw;
  min-height: auto;
  max-height: 90vh;
  padding: 16px;
  border-radius: 24px;
  background: #e1dad2;
  overflow: hidden;
}

.swal2-card-popup:before,
.html-alert-popup:before,
.card-alert-popup:before {
  content: '';
  position: absolute;
  top: 2%;
  left: 0;
  width: 141px;
  aspect-ratio: 141/409;
  background-image: url("https://event.udn.com/bd_500bowls_2025/img/alert-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
}

.swal2-card-popup .swal2-html-container,
.html-alert-popup .swal2-html-container,
.card-alert-popup .swal2-html-container {
  padding: 0;
  max-height: calc(90vh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.swal2-card-popup .swal2-html-container::-webkit-scrollbar,
.html-alert-popup .swal2-html-container::-webkit-scrollbar,
.card-alert-popup .swal2-html-container::-webkit-scrollbar {
  width: 6px;
}

.swal2-card-popup .swal2-html-container::-webkit-scrollbar-track,
.html-alert-popup .swal2-html-container::-webkit-scrollbar-track,
.card-alert-popup .swal2-html-container::-webkit-scrollbar-track {
  background: transparent;
}

.swal2-card-popup .swal2-html-container::-webkit-scrollbar-thumb,
.html-alert-popup .swal2-html-container::-webkit-scrollbar-thumb,
.card-alert-popup .swal2-html-container::-webkit-scrollbar-thumb {
  background-color: #999;
  border-radius: 3px;
}

/* 關卡三內容樣式 */
.card-alert-popup .card-popup-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-alert-popup .card-popup-content .tasks {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
  background-image: none;
}

.card-alert-popup .card-popup-content .tasks img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  outline: none !important;
  border: none !important;
}

.card-alert-popup .card-popup-content .tasks img:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.card-alert-popup .card-popup-content .tasks span {
  color: #000;
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  line-height: 150%;
  letter-spacing: 1px;
}

.card-alert-popup .card-popup-content .tasks a img {
  display: block;
  width: 160px;
  height: 160px;
  outline: none !important;
  border: none !important;
}

.card-alert-popup .card-popup-content .tasks a img:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.card-alert-popup .card-popup-content .tasks a {
  outline: none !important;
  border: none !important;
}

.card-alert-popup .card-popup-content .tasks a:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.card-alert-popup .card-popup-content .tasks p {
  color: #000;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: 1px;
  margin: 0;
}

.card-alert-popup .card-popup-content .tasks .button-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  gap: 16px;
}

.card-alert-popup .card-popup-content .tasks .button-group .button {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  display: flex;
  flex: 1;
  padding: 8px;
  justify-content: center;
  align-items: center;
  color: #f5dc3c;
  text-align: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 2px;
  border-radius: 8.6%/33%;
  background: #000;
  outline: none !important;
  border: none !important;
}

.card-alert-popup .card-popup-content .tasks .button-group .button:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* 響應式設計 */
@media (max-width: 767px) {
  .swal2-card-popup {
    width: 95vw;
    margin: 10px auto;
  }
  
  .card-popup-content .tasks span {
    font-size: 20px;
  }
  
  .card-popup-content .tasks a img {
    width: 140px;
    height: 140px;
  }
  
  .card-popup-content .tasks p {
    font-size: 14px;
  }
  
  .card-popup-content .tasks .button-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .card-popup-content .tasks .button-group .button {
    min-width: auto;
    max-width: none;
    font-size: 16px;
    padding: 10px 14px;
  }
}

/* 觸發按鈕樣式 */
.level3-trigger-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 12px 20px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: none;
  border-radius: 25px;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
  transition: all 0.3s ease;
}

.level3-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 165, 0, 0.4);
}

@media (max-width: 767px) {
  .level3-trigger-btn {
    bottom: 15px;
    right: 15px;
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* 動畫效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swal2-card-popup {
  animation: fadeInUp 0.5s ease-out;
}

/* 滾動條樣式 */
.swal2-card-popup .swal2-html-container::-webkit-scrollbar {
  width: 6px;
}

.swal2-card-popup .swal2-html-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.swal2-card-popup .swal2-html-container::-webkit-scrollbar-thumb {
  background: rgba(255, 165, 0, 0.6);
  border-radius: 3px;
}

.swal2-card-popup .swal2-html-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 165, 0, 0.8);
}

/* ==============================
  通用焦點框移除樣式
  適用於所有彈窗內的元素
============================== */

.swal2-popup img,
.card-alert-popup img,
.html-alert-popup img {
  outline: none !important;
  border: none !important;
}

.swal2-popup img:focus,
.card-alert-popup img:focus,
.html-alert-popup img:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.swal2-popup button,
.swal2-popup a,
.card-alert-popup button,
.card-alert-popup a,
.html-alert-popup button,
.html-alert-popup a {
  outline: none !important;
}

.swal2-popup button:focus,
.swal2-popup a:focus,
.card-alert-popup button:focus,
.card-alert-popup a:focus,
.html-alert-popup button:focus,
.html-alert-popup a:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
} 