/* 2025 Gachapon Event CSS */

/* ------------通用類別------------ */
.z-1 {
  z-index: 1;
}
.z-100 {
  z-index: 100;
}

.relative {
  position: relative;
}
.absolute {
  position: absolute;
}

.purple-bg {
  background-color: #b351a1;
}

.purple-text {
  color: #b351a1;
}

/* ------------扭蛋活動專屬------------*/
.gachapon-event {
  background-color: #b351a1;
  background-image: url(../images/2025gachapon/bg-1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.gachapon-top-bg::before {
  content: "";
  display: block;
  background-image: url(../images/2025gachapon/radiation.png);
  background-repeat: no-repeat;
  width: 100%;
  height: 300px;
  background-size: cover;
  position: absolute;
  margin: 0 -15px;
  z-index: 0;
}

.bunny-girl-twin {
  bottom: 0;
  z-index: -1;
  margin: 0 -15px;
}

.event-nav {
  border: 3px solid #dba228;
  color: #dba228;
  border-radius: 50px;
  font-size: 1rem;
  background-color: #640d54cd;
  padding: 1rem;
  align-items: center;
}

.event-nav > li {
  padding: 0 15px;
  transition: all 0.3s;
  text-align: center;
  line-height: 18px;
}

.event-nav > li:hover {
  cursor: pointer;
  transform: translate(0, -3px);
  color: #ffc850;
}

.event-content {
  display: flex;
  padding-top: 3rem;
}

.gashapon {
  width: 20%;
}

.gashapon-width {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 320 / 627;
}

.rwd-positon {
  width: 100%;
  height: auto;
  display: block;
}

.machine-switch {
  position: absolute;
  top: 62.5%;
  left: 16%;
  width: 30%;
  height: auto;
  z-index: 110;
}

.egg-cover {
  position: absolute;
  top: 55%;
  left: 48%;
  width: 45%;
  height: auto;
  z-index: 110;
}

.golden-egg {
  position: absolute;
  top: 57%;
  left: 56%;
  width: 27%;
  height: auto;
  z-index: 109;
}

.egg-inner {
  display: block;
  width: 100%;
  transition: transform 0.5s;
}

@keyframes shake {
  0% {
    transform: translate(0, 0);
  }

  20% {
    transform: translate(0px, 1.5px);
  }

  40% {
    transform: translate(0, -0.5px);
  }

  80% {
    transform: translate(0px, 1.5px);
  }

  100% {
    transform: translateX(0, 0);
  }
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes dropdown {
  0% {
    transform: translateY(0%) rotate(-30deg) scale(1);
  }

  100% {
    transform: translateY(140%) rotate(330deg) scale(1.2);
  }
}

.shake {
  animation: shake 1s;
}

.egg-rotation {
  animation: rotation 1.5s ease;
}

.egg-dropdown {
  animation: dropdown 1.5s 0.5s ease forwards;
}

@keyframes bounce-loop {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3%);
  }
  50% {
    transform: translatex(3%);
  }
  75% {
    transform: translatex(-2%);
  }
  100% {
    transform: translateX(0);
  }
}

.egg-bounce-loop {
  animation: bounce-loop 0.4s ease-in-out 2;
}

/* ------------扭蛋區域------------ */
.egg-container {
  position: absolute;
  bottom: 47%;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 1;
  pointer-events: none;
}

.egg {
  position: absolute;
  width: 28%;
  height: auto;
  animation: none;
  transition: transform 1.5s;
  pointer-events: none;
}

.egg-1 {
  top: 65%;
  left: 65%;
  z-index: 21;
}
.egg-2 {
  top: 68%;
  left: 5%;
  z-index: 22;
}
.egg-3 {
  top: 67%;
  left: 36%;
  z-index: 23;
}
.egg-4 {
  top: 58%;
  left: 20%;
  z-index: 19;
}
.egg-5 {
  top: 30%;
  left: 10%;
  z-index: 11;
}
.egg-6 {
  top: 43%;
  left: 69%;
  z-index: 12;
}
.egg-7 {
  top: 12%;
  left: 20%;
  z-index: 10;
}
.egg-8 {
  top: 35%;
  left: 43%;
  z-index: 9;
}
.egg-9 {
  top: 5%;
  left: 55%;
  z-index: 8;
}

.egg-10 {
  top: 22%;
  left: 65%;
  z-index: 1;
}

.egg-11 {
  top: 67%;
  left: 45%;
  z-index: 1;
}

.egg-12 {
  top: 37%;
  left: 3%;
  z-index: 1;
}

.event-content-wrap {
  width: 35%;
}

.event-title {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 375 / 223;
}

.tilte-egg {
  position: absolute;
  top: 76%;
  left: 54%;
  width: 10%;
}

@keyframes tada {
  from {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }

  10%,
  20% {
    -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
    transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
  }

  30%,
  50%,
  70%,
  90% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
  }

  40%,
  60%,
  80% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
  }

  to {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}
.animate_tada {
  animation: tada 1.5s ease;
}

.start-btn-group {
  padding: 0 2.5rem;
}

.start-btn-group > .start-btn {
  margin-top: 1rem;
  border: 2px solid #ff4c1b;
  border-radius: 50px;
  padding: 5px 20px;
  text-align: center;
  width: 120px;
  background-color: #e56c02;
  color: #fff;
  box-shadow: 5px 2px 0px #3d0707;
  transition: all 0.3s;
  min-width: 30%;
}

.start-btn-group > .start-btn.free {
  border: 2px solid #333fef;
  background-color: #029de5;
}

.start-btn-group > .start-btn.disabled {
  width: auto;
  border: 2px solid #525258;
  background-color: #6f767a;
}

.start-btn-group > .start-btn:hover {
  transform: translate(0, -5px);
  box-shadow: 5px 5px 0px #3d0707;
  cursor: pointer;
}

.start-btn-group > .start-btn.disabled:hover {
  transform: translate(0, 0);
  box-shadow: 5px 2px 0px #3d0707;
  cursor: not-allowed;
}

.start-btn > .cost {
  font-size: 14px;
  background-color: #fff;
  color: #e56c02;
  font-weight: bold;
  border-radius: 15px;
  padding: 0;
}

.start-btn.free > .cost {
  color: #029de5;
}
.start-btn.disabled > .cost {
  color: #313131;
}
.start-btn + .start-btn {
  margin-left: 10px;
}
.event-stage {
  background: linear-gradient(180deg, #2c0304 0%, #50060600 100%), radial-gradient(circle, #66320d 0%, #350400 100%);
  height: 12vh;
  bottom: 0;
}
.rainbow-bg {
  background: linear-gradient(90deg, #1b8f51 0%, #4715b3 100%);
  width: 100%;
  height: 30px;
  bottom: 0;
  position: absolute;
}

/* ------------扭蛋彈窗------------ */
.close-btn {
  border-radius: 20px;
  border: 2px solid #000;
  background-color: #fff;
  width: 32px;
  height: 32px;
  font-size: 28px;
  text-align: center;
  line-height: 28px;
  z-index: 1;
  right: -20px;
  top: -20px;
}

.close-modal {
  background-color: #000;
  text-align: center;
  padding: 5px 15px;
  color: #fff;
  border-radius: 20px;
}

.modal-box {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.reward-modal {
  width: 70%;
  max-width: 480px;
  aspect-ratio: 498 / 601;
}

.reward-modal-content {
  text-align: center;
  animation: scale-reward 0.5s ease forwards;
}

.reward-item {
  min-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 -5rem;
}

.reward-item li {
  line-height: 15px;
}

.reward-item li + li {
  margin-top: 10px;
}

.reward-light {
  /* background-color: rgb(255, 238, 86); */
  opacity: 0.5;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: -1;
  /* box-shadow: 0 0 40px rgb(255, 238, 86); */
  animation: light 5.5s ease infinite;
}

@keyframes light {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  25% {
    transform: translate(-50%, -50%) scale(1.5);
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
  }
  75% {
    transform: translate(-50%, -50%) scale(1.5);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes scale-reward {
  0% {
    transform: scale(0.3);
  }
  100% {
    transform: scale(1);
  }
}

.reward-modal-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ------------紀錄彈窗------------ */
.record-modal {
  width: 80%;
  max-width: 1000px;
  aspect-ratio: 7/4;
  background: #e3e3e3;
  border: 4px solid #000;
  box-shadow: 10px 10px 0 #254d2b;
  text-align: center;
  padding: 20px 0;
}

.modal-content {
  padding: 1rem 5rem;
}

.modal-content > .record-table {
  height: 45vh;
  overflow-y: auto;
}

.record-table table {
  margin: 0 5px;
  border-collapse: collapse;
}

.record-table th {
  background-color: #9a70c4;
  color: white;
  padding: 6px;
  font-size: 1.1em;
}

.record-table td {
  padding: 8px 1.5em;
  font-size: 1em;
  color: #242029;
  text-align: left;
  letter-spacing: normal;
}

.record-table tr:nth-child(even) {
  background-color: #cacaca;
}

.record-table tr:nth-child(odd) {
  background-color: #e3e3e3;
}

.record-table td:first-child,
.record-table th:first-child {
  width: 30%;
  text-align: center;
  vertical-align: middle;
}

.record-table tr td,
.record-table tr th {
  vertical-align: middle;
}

.scroollbar::-webkit-scrollbar {
  width: 8px;
}

.scroollbar::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 10px;
}

.scroollbar::-webkit-scrollbar-thumb {
  background: #a4a4a4;
  border-radius: 10px;
}

.scroollbar::-webkit-scrollbar-thumb:hover {
  background: #959595;
}

/* 規則彈窗 */
.modal-content > div {
  min-height: 55vh;
}

.show_item.active-content {
  display: block !important;
}

.tab-item {
  padding: 8px 8px;
  cursor: pointer;
  position: relative;
  font-weight: 600;
  line-height: 16px;
}

.tab-item.active {
  color: #891089;
}

.tab-indicator {
  position: absolute;
  bottom: 0px;
  height: 3px;
  background: linear-gradient(45deg, #d08bd7, #9b59b6);
  transition: left 0.3s ease, width 0.3s ease;
  border-radius: 15px;
  z-index: -1;
}

.gacha-rules {
  max-height: 70vh;
  overflow-x: auto;
}

.rules-list {
  text-align: left;
  line-height: 2rem;
  position: relative;
}

.rules-list li {
  position: relative;
  padding-left: 30px;
  line-height: 20px;
}

.rules-list li + li {
  margin-top: 1.3rem;
}

.rules-list li::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 20px;
  background-image: url(../images/2025gachapon/gachapon-green.png);
  background-size: 20px 20px;
  background-repeat: no-repeat;
  position: absolute;
  top: 3px;
  left: 0;
}

/* 獎項卡片 */

.show_item {
  display: none;
}
.lv-card {
  background: #ebebeb;
  min-height: 310px;
  border-radius: 1rem;
  border: 1px solid #fff;
  margin: 8px;
  padding: 1rem;
  box-shadow: 0px 0px 10px #626262, inset 0px 0px 10px #ffffff;
}

.lv-card p {
  text-align: left;
  font-size: 2.5rem;
  font-weight: 900;
  font-style: italic;
  background: linear-gradient(0deg, #3a3a3a 0%, #a9a9a9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2em;
}

.lv-card li {
  border-radius: 8px;
  color: #fff;
  padding: 10px;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #a1a0a0 0%, #6e6e6e 100%);
}

.lv-card > ul li:last-child {
  margin-bottom: 0;
}

.lv-ssr {
  box-shadow: 0px 0px 10px #c96cdc, inset 0px 0px 10px #ffffff;
}

.lv-ssr p {
  background: linear-gradient(0deg, #d99cf8 0%, #929cf9 100%);
  -webkit-background-clip: text;
}

.lv-ssr li {
  background: linear-gradient(90deg, #d99cf8 0%, #929cf9 100%);
}

.lv-sr {
  box-shadow: 0px 0px 10px #ffb546, inset 0px 0px 10px #ffffff;
}

.lv-sr p {
  background: linear-gradient(0deg, #ffb546 0%, #ff874c 100%);
  -webkit-background-clip: text;
}

.lv-sr li {
  background: linear-gradient(90deg, #ffb546 0%, #ff874c 100%);
}

.lv-r {
  box-shadow: 0px 0px 10px #218136, inset 0px 0px 10px #ffffff;
}

.lv-r p {
  background: linear-gradient(0deg, #76cec2 0%, #7ecf83 100%);
  -webkit-background-clip: text;
}

.lv-r li {
  background: linear-gradient(90deg, #76cec2 0%, #7ecf83 100%);
}

/* ipad尺寸 */

@media screen and (max-width: 1200px) {
  .gachapon-event {
    background-image: url(../images/2025gachapon/bg-m.jpg);
    background-position: top;
  }
  .event-content {
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
  }
  .gashapon {
    width: 30%;
  }

  .event-content-wrap {
    width: 60%;
  }

  .start-btn-group {
    margin-bottom: 60px;
  }

  .bunny-girl-twin {
    bottom: 10%;
  }
  .m-main-title {
    width: 70%;
    padding-bottom: 12%;
  }

  .m-title-text {
    position: absolute;
    top: 50%;
  }

  /* 彈窗 */
  .modal-content {
    padding: 1rem 2rem;
  }
  .modal-content > div {
    min-height: 35vh;
  }
}

@media screen and (max-width: 820px) {
  .bunny-girl {
    width: 30%;
  }

  .gashapon {
    width: 35%;
  }
  .gachapon-top-bg::before {
    background-position: center;
  }

  .event-stage {
    height: 22vh;
  }
}

@media screen and (max-width: 768px) {
}
@media screen and (max-width: 540px) {
  .event-nav {
    padding: 0.6rem;
  }

  .event-content-wrap {
    width: 100%;
    margin-top: -7%;
  }

  .gashapon {
    width: 62%;
    margin-right: 35%;
  }

  .m-bonny {
    position: absolute;
    position: absolute;
    top: 00px;
    right: -65%;
    width: 70%;
  }

  .m-main-title {
    width: 90%;
    padding-bottom: 18%;
  }

  .start-btn-group {
    padding: 0;
    margin-right: -5%;
    margin-left: -5%;
  }

  .reward-modal {
    width: 90%;
  }

  .reward-modal-text {
    top: 54%;
  }

  /* 彈窗 */

  .record-modal {
    width: 90%;
  }
  .modal-content {
    padding: 1rem;
    font-size: 0.8rem;
  }
  .modal-content > div {
    min-height: 45vh;
  }
  .rules-list li {
    padding-left: 20px;
    line-height: 18px;
  }

  .rules-list li + li {
    margin-top: 0.8rem;
  }

  .rules-list li::before {
    width: 15px;
    height: 15px;
    background-size: 15px 15px;
    top: 3px;
  }

  .modal-content > div.card-level {
    font-size: 0.9rem;
  }

  .m-title-text > img {
    width: 80%;
  }
  .event-stage {
    height: 30vh;
  }
  .event-content {
    padding-top: 1rem;
  }

  .tab-item {
    font-size: 14px;
  }

  .reward-item li {
    font-size: 14px;
    letter-spacing: 0px;
  }
}

@media screen and (max-width: 390px) {
  .m-main-title {
    width: 100%;
  }

  .event-content-wrap {
    margin-top: -5%;
  }

  .start-btn-group > .start-btn {
    margin-top: 0;
    padding: 5px 10px;
    width: 100px;
  }

  .reward-modal-text h2 {
    font-size: 18px !important;
  }

  .win-text-color {
    color: #ff5d18;
  }

  .lv-card {
    font-size: 12px;
    font-weight: 800;
  }
}

/* 紙片效果 */
.confetti-mount {
  position: relative; /* 父層相對定位 */
  contain: layout; /* 防止動畫影響外層 layout */
}

.fetti {
  position: absolute;
  background-color: #f6e25c; /* 顏色會被 JS 覆蓋 */
  will-change: transform, opacity;
  pointer-events: none;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
}
