 /* ---- click button animation ----- */
 .confirmbtn {
   transition: transform .1s ease-in-out;
 }
 
 .confirmbtn:active {
   transform: scale(0.8);
 }
 
 .confirmbtn::after{
   transform: scale(1);
 }
 /* -------------------------------- */

 .wthTxtBorder2px {
  text-shadow: 
        -1.5px -1.5px 0px var(--edgeColor),
        -1px -1.5px 0px var(--edgeColor),
        0px -1.5px 0px var(--edgeColor),
        1px -1.5px 0px var(--edgeColor),
        1.5px -1.5px 0px var(--edgeColor),
        1.5px -1px 0px var(--edgeColor),
        1.5px  0px 0px var(--edgeColor),
        1.5px  1px 0px var(--edgeColor),
        1.5px  1.5px 0px var(--edgeColor),
        1px  1.5px 0px var(--edgeColor),
        0px  1.5px 0px var(--edgeColor),
        -1px  1.5px 0px var(--edgeColor),
        -1.5px  1.5px 0px var(--edgeColor),
        -1.5px  1px 0px var(--edgeColor),
        -1.5px  0px 0px var(--edgeColor),
        -1.5px -1px 0px var(--edgeColor)!important;
}

.wthTxtBorder1px {
  text-shadow: 
        -1px -1px 0px var(--edgeColor),
         0px -1px 0px var(--edgeColor),
         1px -1px 0px var(--edgeColor),
         1px  0px 0px var(--edgeColor),
         1px  1px 0px var(--edgeColor),
         0px  1px 0px var(--edgeColor),
        -1px  1px 0px var(--edgeColor),
        -1px  0px 0px var(--edgeColor)!important;
}

 body {
  margin: 0;
 }

img, .redbag .cap {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

 /* --------------------------- */

#newyearEvent {
  position: absolute;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-size: 100% 100%;
  background-position: initial;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#newyearEvent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../images/desktop/character.png);
  background-size: 100%;
  background-position: bottom;
  background-repeat: no-repeat;
  z-index: 1;
}

#newyearEvent::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  width: 26%;
  height: 100%;
  background-image: url(../images/angpau-flow.png);
  background-size: 22%;
  background-position: left center;
  background-repeat: no-repeat;
  z-index: 2;
  animation: bobbing 2s infinite ease-in-out;
}


@keyframes bobbing {
  0% {
    transform: translate(-50%, -45%);
  }
  50% {
    transform: translate(-50%, -50%);
  }
  100% {
    transform: translate(-50%, -45%);
  }
}

/* --------------------------- */

.lanternCon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.lanternCon img {
  position: absolute;
  pointer-events: auto;
  height: auto;
  width: 10%;
  top: 0%;
}

.lanternCon img:nth-child(2), .lanternCon img:nth-child(3){ top: -14%; }

.lanternCon img:nth-child(1){ 
  left: 6%;
  transform: rotate(-2deg);
  animation: lantern1 3000ms infinite cubic-bezier(0.42, 0, 0.58, 1);
}

@keyframes lantern1 {
  50% { left: 3%; transform: rotate(2deg); }
}

.lanternCon img:nth-child(2){ 
  left: 25%;
  transform: rotate(-2deg);
  animation: lantern2 3000ms infinite cubic-bezier(0.42, 0, 0.58, 1);
  animation-delay: 0.2s;
}

@keyframes lantern2 {
  50% { left: 22%; transform: rotate(2deg); }
}

.lanternCon img:nth-child(3){ 
  right: 22%;
  transform: rotate(-2deg);
  animation: lantern3 3000ms infinite cubic-bezier(0.42, 0, 0.58, 1);
  animation-delay: .2s;
}

@keyframes lantern3 {
  50% { right: 25%; transform: rotate(2deg); }
}

.lanternCon img:nth-child(4){ 
  right: 3%;
  transform: rotate(-2deg);
  animation: lantern4 3000ms infinite cubic-bezier(0.42, 0, 0.58, 1);
}

@keyframes lantern4 {
  50% { right: 6%; transform: rotate(2deg); }
}

/* --------------------------- */

.maincontainer {
  position: relative;
  z-index: 4;
  height: 100%;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.maincontainer .top {
  position: relative;
  padding-top: 57px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top img.title {
  width: 80%;
  height: auto;
}

.time-info {
  width: 80%;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  font-size: 28px;
  color: #463737;
  font-style: italic;
  font-weight: 700;
  margin-top: 5px;
}

.drawCountsCon {
  width: max-content;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  font-size: 25px;
  color: #111111;
  font-weight: 700;
  margin-top: 5px;
  padding: 1px 30px;
}

.drawCountsCon span {
 color: #ff0000;
}

/* --volume---------- */
.menuBtn {
  display: flex;
  width: max-content;
  position: absolute;
  bottom: 5%;
  right: -11%;
}

.menuBtn p {
  cursor: pointer;
  position: relative;
}

.menuBtn p img.menuIco {
  padding: 0px;
  height: 55px;
  width: 55px;
  border: 3px solid #ffffff;
  border-radius: 13px;
}

.menuBtn p #homeBtn {
  background: linear-gradient(180deg, #FF0000 -24.12%, #39064C 100%);
}

.menuBtn p #musicBtn {
  background: linear-gradient(180deg, #FF0000 -24.12%, #4C0606 100%);
}

.menuBtn p span {
  font-size: 23px;
  font-weight: 700;
  color: #600505;
  position: relative;
  top: 5px;
}

p#backgroundMusic.musicMuted::after {
  position: absolute;
  content: '';
  top: 33%;
  left: 50%;
  width: 2px;
  height: 50%;
  color: #ffffff;
  transform: translate(-50%, -50%) rotate(45deg) scale(1.2);
  pointer-events: none;
  background-color: #ffffff;
  border-radius: 5px;
}

.menuBtn div:first-child{
  margin-right: 15px;
}

.menuBtn div:nth-child(2){
  position: relative;
}

/* --------------------------- */
.maincontainer .bottom {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 57px;
}

.btns img{
  width: 100%;
  cursor: pointer;
}

.btns:nth-child(1), .btns:nth-child(3) { height: 75px; }
.btns:nth-child(2){ 
  height: 90px; 
  margin: 0px 15px;
}

/* --- activity rules pop up --- */
.activityRulesPopUp {
  position: fixed;
  background: rgb(0 0 0 / 65%);
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.activityRulesPopCon {
  position: relative;
  height: 69%;
  width: 50%;
  background: rgb(82 21 21 / 75%);
  padding: 50px 10px 33px 10px;
  border: 5px solid #ffffff;
  border-radius: 30px;
}

img.activityRulesLabel {
  position: absolute;
  top: -13%;
  left: 50%;
  transform: translate(-50%, 0%);
  width: 35%;
}

span.closePopUp {
  position: absolute;
  top: -55px;
  right: -55px;
  height: 45px;
  width: 45px;
  border: 3px solid #d1cfcf;
  border-radius: 100%;
  overflow: hidden;
  cursor: pointer;
  transform: scale(1.2);
}

span.closePopUp::after,
span.closePopUp::before {
  position: absolute;
  content: '';
  top: 50%;
  left: 50%;
  height: 50%;
  width: 2px;
  background: #d1cfcf;
}

span.closePopUp::after {
  transform: translate(-50%, -50%) rotate(45deg);
}

span.closePopUp::before {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.activityRulesPopCon .content {
  color: #ffffff;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  font-size: 18px;
  font-weight: 600;
  height: 99%;
  overflow: auto;
  direction: rtl;
  padding: 0px 70px 0px 35px;
}

.activityRulesPopCon .content::-webkit-scrollbar {
  width: 7px;
}
 
.activityRulesPopCon .content::-webkit-scrollbar-thumb {
  background: #c4c2c596; 
  border-radius: 10px;
}

.activityRulesPopCon .content p{
  direction: ltr;
}

/* --------------------------------------------------------- */
#recordConPopUp {
  background: hsl(0deg 0% 0% / 80%);
  z-index: 999;
  display: none;
}

#recordConPopUp,
.recordContainer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#recordConPopUp,
.recordContainer-overlay {
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.recordContainer-Overlay {
  display: flex;
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #B62923 100%);
  width: 25%;
  height: 50%;
  border-radius: 35px;
  padding: 5px;
}

.recordContainer-Overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 35px;
  border: solid 2px #ffc000;
  transform: scale(1.07);
  z-index: -1;
}

#recordContainer-Inner {
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  padding: 25px 30px 30px 30px;
  background: #ffffff;
}

img.recordPop {
  width: 55%;
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translate(-50%, 0%);
}

#recordConPopUp span.closePopUp {
  top: -55px;
  right: -55px;
}

#recordConPopUp thead, #recordConPopUp tbody, 
#recordConPopUp th, #recordConPopUp td { 
  display: block; 
}

#recordConPopUp tr{ 
  display: flex; 
}

table#recordInfo{
  width: 100%;
  height: 100%;
}

.recordInfo-head th{
  background: #a61e18;
  color: #ffd800;
  text-align: center;
  padding: 5px 15px;
}

.recordInfo-head th:first-child, .recordInfo-body  td:first-child{ width: 60%!important; }
.recordInfo-head th:last-child, .recordInfo-body  td:last-child{ width: 40%!important; }

.recordInfo-head th:first-child, .recordInfo-body  td:first-child,
.recordInfo-head th:last-child, .recordInfo-body  td:last-child{ 
  word-break: break-all; 
}

.recordInfo-body {
  height: calc(100% - 35px);
  overflow: auto;
  margin-top: 5px;
}

.recordInfo-body::-webkit-scrollbar {
  width: 3px;
}
 
.recordInfo-body::-webkit-scrollbar-thumb {
  background: #c4c2c5; 
}

.recordInfo-body::-webkit-scrollbar-track {
  padding: 5px;
}

.recordInfo-body td {
  padding: 3px 15px;
  color: #601d22;
  text-align: center;
  word-wrap: break-word;
}

.recordInfo-body tr:nth-child(even) {
  background-color: #f0b6ba;
}

h4.noRecordSpan {
  text-align: center;
  font-weight: 600;
}
/* ------------------------------------------- */

#winningPopUp {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 999;
  display: none;
}

main#newyearEvent.startGameOpened .lanternCon,
main#newyearEvent.startGameOpened .top img.title,
main#newyearEvent.startGameOpened .time-info,
main#newyearEvent.startGameOpened .drawCountsCon,
main#newyearEvent.startGameOpened .menuBtn div:first-child,
main#newyearEvent.startGameOpened .maincontainer .bottom,
main#newyearEvent.startGameOpened::after {
  opacity: 0;
  pointer-events: none;
}

main#newyearEvent.startGameOpened::before {
  background-image: url(../images/desktop/bg-pop.png);
  background-size: 100%;
  background-position: bottom;
  background-repeat: no-repeat;
}

main#newyearEvent.startGameOpened .menuBtn {
  top: 13%;
  right: 5%;
}

.redbag {
  position: absolute;
  bottom: -4%;
  left: 51%;
  transform: translate(-50%, 0%);
  width: 15%;
  height: 35%;
  background-image: url(../images/bag.png);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  /* animation: bagAnimation 0.5s ease-in-out 3; */
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4%;
}

.redbag .cap {
  background: rgb(0 0 0 / 55%);
  padding: 5px 21px;
  text-align: center;
  color: #fff;
  font-size: 18px;
  border-radius: 40px;
  width: max-content;
  pointer-events: none;
}

@keyframes bagAnimation {
  0% { width: 15%; height: 35%; }
  50% { width: 18%; height: 31%; }
  100% { width: 15%; height: 35%; }
}

.redbag {
  transition: all .1s ease-in-out;
}

.redbag:active {
  width: 18%;
  height: 31%;
}

.redbag::after{
  width: 15%;
  height: 35%;
}

#flyAngpau {
  position: absolute;
  height: 25%;
  width: 10%;
  bottom: -16%;
  left: 51%;
  transform: translate(-50%, 0%);
}

#flyAngpau img {
  position: absolute;
  width: 40%;
  height: auto;
}

#flyAngpau img:nth-child(1) {
  top: 0;
  left: 0;
}

#flyAngpau img:nth-child(2) {
  top: -42%;
  right: 29%;
}

#flyAngpau img:nth-child(3) {
  top: 0;
  right: 0;
}

#flyAngpau.fly {
  animation: flyAngpau 0.5s linear
}

@keyframes flyAngpau {
  0% { bottom: -16%; }
  100% { bottom: 100%; }
}
 /* -------------------------------- */

.explodeFireworks {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.explodeFireworks img {
  width: 33%;
  position: relative;
  top: -42%;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.explodeFireworks.explode img {
  animation: explode 0.7s ease-out;
}

@keyframes explode {
  0% { 
    transform: scale(0); 
    opacity: 0;
  }
  50% { 
    transform: scale(1); 
    opacity: 1;
  }
  75% { 
    transform: scale(1); 
    opacity: 0;
  }
  100% { 
    transform: scale(0); 
    opacity: 0;
  }
}

#fallingElements {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 51;
  pointer-events: none;
}

.falling-element {
  position: absolute;
  top: -100%;
  width: 100px;
  animation: fall linear;
  z-index: 51;
}

@keyframes fall {
  0% { top: -100%; }
  100% { top: 100%; }
}

 /* -------------------------------- */

 .mainPopUpWin {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 70%);
  z-index: 51;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pop-prize {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prize {
  position: relative;
}

.prize::after {
  content: '';
  position: absolute;
  top: 2%;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../images/circle.png);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: -1;
  transform: scale(1.2) rotate(0deg);
  animation: spin 6s linear infinite;
}

@keyframes spin {
  from {
    transform: scale(1.2) rotate(0deg);
  }
  to {
    transform: scale(1.2) rotate(360deg);
  }
}

.pop-prize img {
  width: 100%;
}

.pop-prize .prize p {
  color: #f2c57a;
  text-align: center;
  position: absolute;
  bottom: 0%;
  width: 100%;
  font-size: 61px;
  font-weight: 700;
}

.confirmbtn {
  width: 44%;
  margin-top: 20px;
  cursor: pointer;
}

img.sakuraleft {
  position: absolute;
  height: auto;
  width: 50px;
  bottom: 22%;
  left: 13%;
  animation: spin 6s linear infinite;
}

img.sakuraright {
  position: absolute;
  height: auto;
  width: 55px;
  top: 38%;
  right: 14%;
  animation: spin 6s linear infinite;
}

.mainPopUpWin span.closePopUp {
  top: -45px;
  right: 0;
}

 /* ---------pop animation----------------------- */

.mainPopUpWin {
  display: none;
}

.pop-prize {
  transform: scale(0);
}

.pop-prize.pop {
  animation: pop 0.2s linear forwards;
}

@keyframes pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* --------------------------------------------------------- */
#notLoginPopUp, #noDrawsPopUp {
  background: hsl(0deg 0% 0% / 80%);
  z-index: 999;
  display: none;
}

#notLoginPopUp, #noDrawsPopUp,
.notLogin-overlay, .noDraws-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#notLoginPopUp, #noDrawsPopUp,
.notLogin-overlay, .noDraws-overlay {
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.notLogin-overlay, .noDraws-overlay {
  display: flex;
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #B62923 100%);
  width: 25%;
  height: 30%;
  border-radius: 35px;
  padding: 5px;
}

.notLogin-overlay::before, .noDraws-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 35px;
  border: solid 2px #ffc000;
  transform: scale(1.07);
  z-index: -1;
}

#notLogin-Inner, #noDraws-Inner {
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  padding: 25px 30px 30px 30px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

#noDrawsPopUp span.closePopUp,
#notLoginPopUp span.closePopUp {
  top: -55px;
  right: -55px;
}

h4.noRecordSpan {
  text-align: center;
  font-weight: 600;
}

/* ------------------------------------------- */

/* ---------------------------------------------------------------- */
@media screen and (min-width: 1779px) and (max-width: 1980px){
  .pop-prize .prize p {
    font-size: 76px;
  }

  .activityRulesPopCon {
    padding: 72px 10px 33px 10px;
  }

  #recordContainer-Inner {
    padding: 30px 30px 30px 30px;
  }

}

@media screen and (min-width: 1779px) and (max-width: 1980px){
  .pop-prize .prize p {
    font-size: 76px;
  }

  .activityRulesPopCon {
    padding: 72px 10px 33px 10px;
  }

  #recordContainer-Inner {
    padding: 30px 30px 30px 30px;
  }

}

@media screen and (max-width: 1300px){
  .redbag .cap {
    font-size: 17px;
  }
  .maincontainer .bottom {
    padding-bottom: 13px;
  }
}

@media screen and (max-width: 1366px){
  .pop-prize .prize p {
    font-size: 51px;
  }

}

@media screen and (max-width: 1280px){
  #newyearEvent::after {
    transform: translate(-50%, -36%);
  } 

  @keyframes bobbing {
    0% {transform: translate(-50%, -36%); }
    50% { transform: translate(-50%, -40%); }
    100% { transform: translate(-50%, -36%); }
  }

  .redbag {
    width: 18%;
    height: 26%;
  }

  .redbag:active {
    width: 21%;
    height: 25%;
  }
  
  .redbag::after{
    width: 18%;
    height: 26%;
  }

  .pop-prize {
    width: 32%;
  }

  .recordContainer-Overlay,
  .notLogin-overlay, .noDraws-overlay {
    width: 34%;
  }

}


@media screen and (max-width: 1120px) {
  .pop-prize {
    width: 35%;
  }
}

@media screen and (max-width: 1024px) {
  .maincontainer {
    width: 60%;
  }

  .redbag .cap {
    font-size: 16px;
  }

  main#newyearEvent.startGameOpened .menuBtn {
    right: -21%;
  }

  .pop-prize {
    width: 38%;
  }
}

@media screen and (max-width: 1024px) and (max-height: 633px) {

}
@media only screen and (min-width: 2500px) and (max-width: 2620px) {
  /* 針對接近 2560x1440 的解析度套用的樣式 */
  img.recordPop {
      top: -67px;
  }
  img.activityRulesLabel {
    top: -17%;
  }
}