* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#sinList2 {
    position: absolute;
    z-index: 999;
    left: max(-300px, calc(-90vw + 50px));
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    top: 0;
    bottom: 0;
    max-width: 300px;
    width: calc(90vw - 50px);
    box-sizing: border-box;
    padding-top: 16px;
    color: #e73648;
    height: 100vh;
    transition: left 0.4s ease-in-out;
}
#sinList2 > h2 {
  margin:0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e73648;
}
#sinList2.active {
  left: 0;
}

#sinList2 .logo_icon {
  padding-left: 16px;
  display: flex;
  padding-top: 16px;
  align-items: center;
}
#sinList2 .logo_icon .logo_mask {
  background-color: #e73648;
  mask-image: url(../images/svg/bbq.svg);
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  width: 33.3333%;
  height: calc(30vw - (50px / 3));
  max-height: 100px;
}
#sinList2 .logo_icon h2 {
  font-size: 32px;
  padding-left: 16px;
}
#sinList2 .tab_menu {
  display: flex;
  width: 100%;
  padding: 16px;
  margin-bottom: 4px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
#sinList2 .tab_menu li {
  width: calc(33% - 8px);
  padding: 10px 8px 6px;
  border-radius: 4px;
  border: 1px solid #e73648;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  font-weight: 700;
}
#sinList2 .tab_menu li.coupon_box {
  width: calc(100%);
  padding: 8px;
}
#sinList2 .tab_menu li:hover,
#sinList2 .tab_menu li.active {
  background-color: #e73648;
  color: #fff;
}
#sinList2 ul.floor {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  text-align: left;
  width: calc(100% + 4px);
  max-height: 70%;
  overflow-y: auto;
  gap: 4px;
  padding: 0 16px 16px;
  margin-right: -4px;
}

#sinList2 ul.floor::-webkit-scrollbar {
  display: none;
}
#sinList2 ul.floor.active {
  display: flex;
}
#sinList2 ul.floor li {
    padding: 12px;
    width: calc(50% - 4px);
    max-height: calc(150px - 16px);
    height: calc(45vw - 25px);
    border-radius: 4px;
    font-size: 1rem;
    color: #e73648;
    border: 1px solid #e73648;
    background-color: rgba(255, 255, 255, 0.7);  /* 투명한 흰색 배경 */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    font-weight: 700;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all 0.3s ease-in-out;
}
#sinList2 ul.floor li:hover {
    background-color: rgba(231, 54, 72, 0.9);  /* 투명한 빨간색 배경 */
    color: #fff;
}
#sinList2 ul.floor li:hover .svg_mask {
    background-color: rgba(255, 255, 255, 0.9);
}
#sinList2 ul.floor li .svg_mask {
    position: absolute;
    transition: all 0.3s ease-in-out;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: rgba(231, 54, 72, 0.9);  /* 배경을 투명하게 */
    mask-size: 35%;
    mask-repeat: no-repeat;
    mask-position: left 20% bottom 20%;
}

#sinList2 ul.floor li::before {
    display: none;
}

#sinList2 ul.floor li:hover::before {
    background-color: rgba(231, 54, 72, 0.9);
}

@keyframes blinkText {
    0% { 
        opacity: 1;
        color: #e73648;  /* BBQ 레드 컬러 */
    }
    50% { 
        opacity: 0.7;
        color: #FFA07A;  /* 연한 살몬 핑크 */
    }
    100% { 
        opacity: 1;
        color: #e73648;  /* BBQ 레드 컬러 */
    }
}

#sinList2 ul.floor li.can_coupon {
    position: relative;
}

#sinList2 ul.floor li.can_coupon::before {
    display: block;
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: #e73648;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#sinList2 ul.floor li.has_coupon::after {
    content: '획득 완료';
    font-size: 12px;
    opacity: 0.5;
    display: block;  /* 블록 레벨로 변경하여 줄바꿈 */
    text-align: left;  /* 텍스트 좌측 정렬 */
}

#sinList2 ul.floor li.can_coupon::after {
    content: '쿠폰 조각 획득 가능';
    font-size: 12px;
    display: block;
    text-align: left;  /* 텍스트 좌측 정렬 */
    animation: blinkText 1.5s infinite;
}
#sinList2 .sin_list_close {
    position: absolute;
    left: 100%;
    background-color: #fa5566;
    padding: 8px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    text-transform: uppercase;
    height: 240px; /* 높이 증가 */
    width: 50px;
    border-radius: 0 12px 12px 0;
    box-sizing: border-box;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-size: 20px;
    letter-spacing: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sinList2 .sin_list_close .button-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px; /* 텍스트와 화살표 사이 간격 */
}

#sinList2 .sin_list_close .text {
    text-align: center;
}

#sinList2 .sin_list_close .arrow-container {
    width: 15px;
    height: 15px;
    display: flex;
    justify-content: center;
	margin-top:20px;
}

#sinList2 .sin_list_close .blink-arrow {
    width: 100%;
    height: 100%;
    animation: blink 1.5s infinite;
    opacity: 0.7;
	transition: transform 0.3s ease;
}

#sinList2 .sin_list_close.closed .blink-arrow {
    transform: scaleX(-1);
}

@keyframes blink {
    0% { opacity: 0.7; }
    50% { opacity: 0.2; }
    100% { opacity: 0.7; }
}

#coupon_area {
    position: absolute;
    z-index: 100;
    right: 10px;
    top: 10px;
    color: #e73648;
    background-color: #fff;
    border-radius: 9999px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 5px; /* 이미지와 텍스트 사이 간격 */
}

@keyframes playfulBounce {
    0%, 85%, 100% { 
        transform: rotate(0deg) scale(1); 
    }
    88% { 
        transform: rotate(-10deg) scale(1.15); 
    }
    90% { 
        transform: rotate(10deg) scale(1.15); 
    }
    92% { 
        transform: rotate(-8deg) scale(1.1); 
    }
    94% { 
        transform: rotate(8deg) scale(1.1); 
    }
    96% { 
        transform: rotate(-5deg) scale(1.05); 
    }
    98% { 
        transform: rotate(5deg) scale(1.05); 
    }
}


#coupon_area .coupon_icon {
    width: 35px;
    height: 35px;
    animation: playfulBounce 5s ease-in-out infinite;
    transform-origin: center bottom;  
}

#coupon_area .coupon_icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#coupon_area .cop_value {
    font-weight: 600;
    font-size: 14px;
}

.bubble_mask {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 99;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  display: none;
}
.bubble_bar {
  position: absolute;
  bottom: 50px;
  border-radius: 12px;
  display: none;
  background-color: #ffffffbb;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: 1007px;
  width: 90%;
}
.bubble_bar .bubble_inner {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 16px;
}
.bubble_bar.typing {
  display: block;
}
.bubble {
  flex: 1;
  white-space: pre-wrap;
  text-align: center;
  font-size: 20px;
  word-break: keep-all;
  padding-left: 24px;
}

.bubble_bar img {
  width: 130px;
}
.bubble_bar .img_slide_wrap {
  position: relative;
  width: 100%;
}

.bubble_bar .img_slide_wrap .page_btn {
  width: 48px;
  height: 48px;
  background-color: rgba(0, 0, 0, 0.4);
  position: absolute;
  top: calc(50% - 24px);
}
.bubble_bar .img_slide_wrap .page_btn::after {
  content: '';
  width: 24px;
  height: 24px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  position: absolute;
  top: calc(50% - 12px);
  left: calc(50% - 24px);
}
.bubble_bar .img_slide_wrap {
  width: 100%;
  padding: 16px;
  display: none;
}
.bubble_bar .img_slide_wrap .img_slide {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}
.bubble_bar .img_slide_wrap .img_slide li {
  position: absolute;
  box-sizing: border-box;
  width: 100%;
}
.bubble_bar .img_slide_wrap .img_slide li img {
  width: 100%;
}

.bubble_bar .img_slide_wrap .page_btn.btn_next {
  right: 0;
  display: none;
}
.bubble_bar .img_slide_wrap .page_btn.btn_prev {
  left: 0;
  display: none;
}
.bubble_bar .img_slide_wrap .page_btn.btn_next::after {
  transform: rotate(45deg);
}
.bubble_bar .img_slide_wrap .page_btn.btn_prev::after {
  transform: rotate(-135deg);
  left: calc(50% - 4px);
}
#coupon_popup {
  position: absolute;
  justify-content: center;
  align-items: center;
  z-index: 100;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 90vh;
  background-color: #ffffffee;
  display: none;
  max-width: 480px;
  flex-direction: column;
  padding: 0.5rem 1rem 2rem;
  justify-content: space-between;
  border-radius: 8px;
}

#coupon_popup h3 {
  margin-top: 3rem;
  font-size: 1.5rem;
}
#coupon_popup .coupon_img_area {
  min-height: 300px;
  width: 100%;
  position: relative;
}
#coupon_popup .coupon_img_area.used::after {
  content: '사용된 쿠폰입니다.';
  font-weight: 700;
  color: #fff;
  font-size: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  -webkit-text-stroke: 1px black;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
  position: absolute;
  top: 0;
  left: 0;
  backdrop-filter: blur(5px) brightness(80%);
}

#coupon_popup #use_coupon {
  width: 80%;
  display: block;
  border: none;
  border-radius: 8px;
  padding: 8px;
  background-color: #e73648;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
#coupon_popup.active {
  display: flex;
}
#coupon_mask {
  display: none;
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99;
}
#coupon_mask.active {
  display: block;
}

.intro_text {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 99;
  padding: 1rem;

  & .intro_cont {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
  }
}
.intro_text.aniStart {
  height: 0;
  display: none;
  animation: introAnimation 1s alternate ease-in-out;
}
@keyframes introAnimation {
  0% {
    height: 100vh;
    display: block;
  }
  99% {
    height: 0;
    display: block;
  }
  100% {
    height: 0;
    display: none;
  }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* 사이드바 자체 등장 */
#sinList2.active {
    left: 0;
}





/* active나 closing 상태일 때는 opacity: 1 유지 */
#sinList2.active > h2,
#sinList2.active .logo_icon,
#sinList2.active .logo_icon .logo_mask,
#sinList2.active .logo_icon h2,
#sinList2.active .tab_menu li,
#sinList2.active .floor li {
    opacity: 1;  /* visibility: visible 제거 */
    animation: fadeInUp 0.3s ease-out forwards;
}

/* 헤더 타이틀 등장 */
#sinList2.active > h2 {
    animation: fadeInUp 0.3s ease-out both;
}

/* BBQ 로고와 텍스트 등장 */
#sinList2.active .logo_icon {
    animation: fadeInUp 0.3s ease-out 0.1s both;
}

#sinList2.active .logo_icon .logo_mask {
    animation: fadeInUp 0.3s ease-out 0.2s both;
}

#sinList2.active .logo_icon h2 {
    animation: fadeInUp 0.3s ease-out 0.25s both;
}



/* closing 시 요소들이 이미 보이는 상태여야 함 */
#sinList2.closing .floor.active li,
#sinList2.closing .tab_menu li {
    opacity: 1;  /* 초기상태 명시 */
    animation: fadeOutDown 0.15s ease-out forwards;
}

/* 초기 숨김 상태는 active 클래스가 없을 때만 적용 */
#sinList2:not(.active):not(.closing) .floor li,
#sinList2:not(.active):not(.closing) .tab_menu li {
    opacity: 0;
}

#sinList2.active .tab_menu li:nth-child(1) { animation-delay: 0.3s; }
#sinList2.active .tab_menu li:nth-child(2) { animation-delay: 0.4s; }
#sinList2.active .tab_menu li:nth-child(3) { animation-delay: 0.5s; }



/* 메뉴 항목들의 배경과 텍스트 함께 등장 */
#sinList2.active .floor.active li {

    animation: fadeInUp 0.3s ease-out forwards;
}

#sinList2.active .floor.active li:nth-child(1) { animation-delay: 0.45s; }
#sinList2.active .floor.active li:nth-child(2) { animation-delay: 0.5s; }
#sinList2.active .floor.active li:nth-child(3) { animation-delay: 0.55s; }
#sinList2.active .floor.active li:nth-child(4) { animation-delay: 0.6s; }
#sinList2.active .floor.active li:nth-child(5) { animation-delay: 0.65s; }
#sinList2.active .floor.active li:nth-child(6) { animation-delay: 0.7s; }
#sinList2.active .floor.active li:nth-child(7) { animation-delay: 0.75s; }
#sinList2.active .floor.active li:nth-child(8) { animation-delay: 0.8s; }
#sinList2.active .floor.active li:nth-child(9) { animation-delay: 0.85s; }
#sinList2.active .floor.active li:nth-child(10) { animation-delay: 0.9s; }
#sinList2.active .floor.active li:nth-child(11) { animation-delay: 0.95s; }
#sinList2.active .floor.active li:nth-child(12) { animation-delay: 1s; }

/* 플로어 변경 시 빠른 애니메이션을 위한 새로운 클래스 */
#sinList2.active .floor.active.quick-change li {
    opacity: 0;
    animation: fadeInUp 0.2s ease-out forwards;
}

#sinList2.active .floor.active.quick-change li:nth-child(1) { animation-delay: 0.05s; }
#sinList2.active .floor.active.quick-change li:nth-child(2) { animation-delay: 0.08s; }
#sinList2.active .floor.active.quick-change li:nth-child(3) { animation-delay: 0.11s; }
#sinList2.active .floor.active.quick-change li:nth-child(4) { animation-delay: 0.14s; }
#sinList2.active .floor.active.quick-change li:nth-child(5) { animation-delay: 0.17s; }
#sinList2.active .floor.active.quick-change li:nth-child(6) { animation-delay: 0.20s; }
#sinList2.active .floor.active.quick-change li:nth-child(7) { animation-delay: 0.23s; }
#sinList2.active .floor.active.quick-change li:nth-child(8) { animation-delay: 0.26s; }
#sinList2.active .floor.active.quick-change li:nth-child(9) { animation-delay: 0.29s; }
#sinList2.active .floor.active.quick-change li:nth-child(10) { animation-delay: 0.32s; }
#sinList2.active .floor.active.quick-change li:nth-child(11) { animation-delay: 0.35s; }
#sinList2.active .floor.active.quick-change li:nth-child(12) { animation-delay: 0.38s; }

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);  /* 이동 거리를 줄임 */
    }
}

/* sinList2가 closing 될 때는 left 트랜지션을 지연시킴 */
#sinList2.closing {
    transition: left 0.4s ease-in-out 0.2s;
}

/* 닫힐 때의 애니메이션 - 더 짧고 부드럽게 */
#sinList2.closing .floor.active li {
    animation: fadeOutDown 0.15s ease-out forwards;  /* 애니메이션 시간 단축 */
}

#sinList2.closing .floor.active li:nth-child(12) { animation-delay: 0s; }
#sinList2.closing .floor.active li:nth-child(11) { animation-delay: 0.02s; }
#sinList2.closing .floor.active li:nth-child(10) { animation-delay: 0.04s; }
#sinList2.closing .floor.active li:nth-child(9) { animation-delay: 0.06s; }
#sinList2.closing .floor.active li:nth-child(8) { animation-delay: 0.08s; }
#sinList2.closing .floor.active li:nth-child(7) { animation-delay: 0.10s; }
#sinList2.closing .floor.active li:nth-child(6) { animation-delay: 0.12s; }
#sinList2.closing .floor.active li:nth-child(5) { animation-delay: 0.14s; }
#sinList2.closing .floor.active li:nth-child(4) { animation-delay: 0.16s; }
#sinList2.closing .floor.active li:nth-child(3) { animation-delay: 0.18s; }
#sinList2.closing .floor.active li:nth-child(2) { animation-delay: 0.20s; }
#sinList2.closing .floor.active li:nth-child(1) { animation-delay: 0.22s; }

#sinList2.closing .tab_menu li {
    animation: fadeOutDown 0.15s ease-out forwards;
}

#sinList2.closing .tab_menu li:nth-child(3) { animation-delay: 0.24s; }
#sinList2.closing .tab_menu li:nth-child(2) { animation-delay: 0.26s; }
#sinList2.closing .tab_menu li:nth-child(1) { animation-delay: 0.28s; }

#sinList2.closing .logo_icon h2 { animation: fadeOutDown 0.15s ease-out 0.30s forwards; }
#sinList2.closing .logo_icon .logo_mask { animation: fadeOutDown 0.15s ease-out 0.32s forwards; }
#sinList2.closing .logo_icon { animation: fadeOutDown 0.15s ease-out 0.34s forwards; }
#sinList2.closing > h2 { animation: fadeOutDown 0.15s ease-out 0.36s forwards; }

@media screen and (max-width: 768px) {
  #sinList2 ul.floor li {
    font-size: 1rem;
  }
  .bubble_bar {
    border-radius: 16px;
    & .bubble_inner {
      align-items: start;
    }

    &.img_box {
    }
    & img {
      width: 65px;
    }
    & .bubble {
      font-size: 16px;
      padding-left: 16px;
    }
  }

  .intro_text h2 {
    font-size: 16px;
  }
}
