/* Modal Styles */
.modal {
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.modal__container {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  padding: 32px 20px;
  max-width: 478px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 3px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  font-family: Work Sans;
  font-weight: 400;
}

.modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.modal__close svg {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: rotate(90deg);
}

.modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #333;
}

/* Share Image Placeholder */
.share-image-placeholder {
  width: 120px;
  height: 120px;
  background: url(../images/share.png) no-repeat;
  background-size: 100%;
  margin-bottom: 8px;
}

/* Modal Title */
.modal__title {
  font-family: 'DIN-Bold', 'Arial Black', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #111;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

/* Share Steps */
[data-stage=award_announcement] .share-step.share-step-1-0 {
  display: none;
}

[data-stage=award_announcement] .share-step.share-step-1-1 {
  display: flex;
}

.share-step.share-step-1-1 {
  display: none;
}

.share-step {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.share-step-number {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.share-step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-step-text {
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  margin: 0;
}

/* Twitter Button */
.btn-twitter {
  margin: 0 auto;
  width: 100%;
  max-width: 240px;
  height: 48px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-twitter:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-twitter:active {
  transform: translateY(0);
}

.btn-twitter svg {
  width: 20px;
  height: 20px;
}

/* Share Input Group */
.share-input-group {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(245, 245, 245, 1);
  overflow: hidden;
}

.share-input {
  width: 100%;
  min-width: 0;
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border: none;
  font-size: 14px;
  color: #333;
  background: transparent;
  outline: none;
  font-family: Work Sans;
}

.share-input::placeholder {
  color: #666;
}

.btn-submit {
  flex-shrink: 0;
  width: 118px;
  height: 40px;
  color: #000;
  border: none;
  font-family: Work Sans;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 4px;
  border: 1px solid #111;
  border-radius: 20px;
  background: #ffc9a0;
  text-transform: uppercase;
}

.btn-submit:hover {
  background: #ffdbb3;
}

/* Animation */
@keyframes mmfadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mmslideIn {
  from { 
    opacity: 0;
    transform: translateY(-30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mmfadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes mmslideOut {
  from { 
    opacity: 1;
    transform: translateY(0);
  }
  to { 
    opacity: 0;
    transform: translateY(-30px);
  }
}

/* MicroModal Animation States */
.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

/* Opening animation */
.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

/* Closing animation */
.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 768px) {
  .modal__container {
    padding: 30px 20px;
    width: 95%;
  }
  
  .modal__title {
    font-size: 28px;
  }
  
  .share-image-placeholder {
    max-width: 100%;
  }
  
  .share-step {
    gap: 12px;
  }
  
  .share-step-number {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .share-step-text {
    font-size: 13px;
  }
  
  .btn-twitter {
    max-width: 100%;
    height: 44px;
    font-size: 14px;
  }
}

/* Success Modal Styles */
.modal__container--success {
  max-width: 420px;
  padding: 40px 30px;
  text-align: center;
}

.success-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  animation: successIconPulse 0.6s ease-out;
}

@keyframes successIconPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon svg circle {
  animation: successCircle 0.6s ease-out;
}

.success-icon svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: successCheck 0.4s ease-out 0.3s forwards;
}

@keyframes successCircle {
  0% {
    stroke-dasharray: 0 240;
  }
  100% {
    stroke-dasharray: 240 240;
  }
}

@keyframes successCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.modal__title--success {
  color: #4CAF50;
  font-size: 24px;
  margin: 0;
}

.modal__message {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

.success-rewards {
  width: 100%;
}

.success-rewards-label {
  font-size: 14px;
  color: #666;
  margin: 0 0 24px 0;
  font-weight: 500;
}

.success-rewards-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.success-reward-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.success-reward-item .skin-image {
  margin: 4px auto 0;
  width: 210px;
  height: 210px;
  border-radius: 12px;
  object-fit: cover;
}

.success-reward-icon {
  width: 40px;
  height: 40px;
  background-size: 100%;
  background-repeat: no-repeat;
}

.success-reward-icon.free_ticket {
  background-image: url(../images/icon_hearts_2x.png);
}

.success-reward-icon.diamond {
  background-image: url(../images/icon_diamonds.png);
}

.success-reward-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.modal__content--success .btn-close {
  width: 180px;
  margin-top: 24px;
  padding: 12px 24px;
  font-size: 16px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .modal__container--success {
    padding: 30px 20px;
  }
  
  .success-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .modal__title--success {
    font-size: 20px;
  }
  
  .modal__message {
    font-size: 14px;
  }
  
  .success-reward-item {
    font-size: 14px;
    padding: 6px 12px;
  }
}

/* Error Modal Styles */
.modal__container--error {
  max-width: 420px;
  padding: 40px 30px;
  text-align: center;
}

.error-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  animation: errorIconShake 0.6s ease-out;
}

@keyframes errorIconShake {
  0%, 100% {
    transform: translateX(0);
    opacity: 1;
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.error-icon svg circle {
  animation: errorCircle 0.6s ease-out;
}

.error-icon svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: errorCross 0.4s ease-out 0.3s forwards;
}

@keyframes errorCircle {
  0% {
    stroke-dasharray: 0 240;
  }
  100% {
    stroke-dasharray: 240 240;
  }
}

@keyframes errorCross {
  to {
    stroke-dashoffset: 0;
  }
}

.modal__title--error {
  color: #f44336;
  font-size: 24px;
  margin: 0;
}

.modal__content--error .btn-close {
  width: 180px;
  margin-top: 24px;
  padding: 12px 24px;
  font-size: 16px;
  background: #f44336;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal__content--error .btn-close:hover {
  background: #d32f2f;
}

@media (max-width: 768px) {
  .modal__container--error {
    padding: 30px 20px;
  }
  
  .error-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .modal__title--error {
    font-size: 20px;
  }
}

/* Guide Modal Styles */
.guide-image-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.guide-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#modal-guide .modal__message {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  text-align: center;
  margin: 0;
}

#modal-guide .btn-close {
  width: 180px;
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#modal-guide .btn-close:hover {
  background: #333;
}

@media (max-width: 768px) {
  .guide-image-container {
    max-width: 100%;
    margin: 15px 0;
  }
  
  #modal-guide .modal__message {
    font-size: 14px;
  }
  
  #modal-guide .btn-close {
    width: 150px;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/**details share modal**/

.details-share-modal .modal__container {
  padding: 0 !important;
}

.details-share-modal .modal__content {
  padding: 20px 30px 20px !important;
}

.details-share-modal .detail-share-info {
  width: 100%;
  padding-top: 30px;
  height: auto;
  overflow: hidden;
  position: relative;
  left: 0;
  top: 0;
  /* background: -webkit-linear-gradient(#FFC9A0 42px, #000000 42px);
  background: linear-gradient(to bottom, #FFC9A0 42px, #000000 42px); */
}

.details-share-modal .modal__close {
  width: 30px;
  height: 30px;
  position: absolute;
  right: 0;
  top: 0;
  color: #fff;
  z-index: 1;
}

.details-share-modal .detail-share-info .loading-spinner {
  width: 30px;
  height: 30px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -15px;
  margin-top: 0;
}

.details-share-modal .detail-share-info .share-info-poster {
  display: block;
  width: 100%;
  min-height: 300px;
  position: relative;
  left: 0;
  top: 0;
  z-index: 1;
  background-color: transparent;
}

.details-share-modal .modal__close:hover {
  transform: rotate(0) !important;
}

.details-share-modal img[src=""],
.details-share-modal img:not([src]) {
  opacity: 0;
}


.details-share-modal .detail-share-tips {
  width: 100%;
  text-align: center;
  margin: 15px auto 0;
  font-size: 16px;
  color: #FFC9A0;
  font-family: Work Sans;
}

.details-share-modal .detail-share-btn {
  display: flex;
  margin: 15px auto 0;
}

.detail-share-btn img {
  display: flex;
  width: 16px;
  margin-right: 6px;

  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.detail-share-btn .detail-share-iamge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 48px;
  border-radius: 48px;
  text-align: center;
  border: 1px solid #FFC9A0;
  color: #FFC9A0;
  margin: 0 4px;
  cursor: pointer;
  font-size: 14px;
}

.detail-share-btn .detail-share-x {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 48px;
  border-radius: 48px;
  background: linear-gradient(165.81deg, rgba(255, 173, 92, 1),rgba(255, 239, 192, 1) 100%);
  text-align: center;
  color: #111111;
  margin: 0 4px;
  cursor: pointer;
  font-size: 14px;
}

.detail-share-btn .detail-share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 48px;
  border-radius: 48px;
  text-align: center;
  border: 1px solid #FFC9A0;
  color: #FFC9A0;
  margin: 0 4px;
  cursor: pointer;
  font-size: 14px;
}

@media (min-width: 900px) and (max-height: 900px) and (hover: hover) {
  .details-share-modal .modal__container {
    width: 90%;
    max-width: 300px;
  }
  .detail-share-btn img {
    width: 12px !important;
    margin-right: 4px !important;
  }
  .detail-share-btn .detail-share-iamge,
  .detail-share-btn .detail-share-x,
  .detail-share-btn .detail-share-link {
    height: 40px !important;
    border-radius: 40px !important;
    font-size: 12px !important;
  }
}

/**details share modal end**/

/* Check-in Confirmation Modal Styles */
.modal__container--confirm {
  max-width: 420px;
  padding: 40px 30px;
  text-align: center;
}

.confirm-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  animation: confirmIconBounce 0.6s ease-out;
}

@keyframes confirmIconBounce {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-icon svg circle {
  animation: confirmCircle 0.6s ease-out;
}

.confirm-icon svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: confirmPath 0.4s ease-out 0.3s forwards;
}

@keyframes confirmCircle {
  0% {
    stroke-dasharray: 0 240;
  }
  100% {
    stroke-dasharray: 240 240;
  }
}

@keyframes confirmPath {
  to {
    stroke-dashoffset: 0;
  }
}

.modal__title--confirm {
  color: #FFA500;
  font-size: 24px;
  margin: 0;
}

.modal__content--confirm .btn-close {
  width: 180px;
  margin-top: 24px;
  padding: 12px 24px;
  font-size: 16px;
  background: #FFA500;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal__content--confirm .btn-close:hover {
  background: #FF8C00;
}

@media (max-width: 768px) {
  .modal__container--confirm {
    padding: 30px 20px;
  }
  
  .confirm-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .modal__title--confirm {
    font-size: 20px;
  }
}

/* Image Only Modal Styles */
.modal__container--image {
  background: transparent;
  padding: 0;
  max-width: 90%;
  width: auto;
  box-shadow: none;
  overflow: visible;
}

.modal__container--image .modal__close {
  position: absolute;
  top: -50px;
  right: -10px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 32px;
  z-index: 10;
}

.modal__container--image .modal__close:hover {
  background: rgba(255, 255, 255, 1);
  transform: rotate(90deg);
}

.modal__content--image {
  padding: 0;
  gap: 0;
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

@media (max-width: 768px) {
  .modal__container--image {
    max-width: 95%;
  }
  
  .modal__container--image .modal__close {
    top: -45px;
    right: -5px;
    width: 36px;
    height: 36px;
    font-size: 28px;
  }
  
  .modal-image {
    max-height: 80vh;
    border-radius: 4px;
  }
}
