.checkin-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background: #000;
  color: #271e4b;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.checkin-page-overlay.is-open {
  display: flex;
  pointer-events: auto;
}

.checkin-stage {
  position: relative;
  width: 750px;
  height: 1650px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0) 460px),
    linear-gradient(180deg, #ece9ff 0%, #dedaf6 100%);
  transform: scale(var(--checkin-scale, 1));
  transform-origin: top center;
}

.checkin-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(45deg, transparent 0 58px, rgba(120, 103, 199, 0.13) 58px 74px, transparent 74px 122px),
    linear-gradient(135deg, transparent 0 70px, rgba(120, 103, 199, 0.1) 70px 86px, transparent 86px 132px);
  background-size: 160px 160px;
}

.checkin-modal {
  position: absolute;
  left: 26px;
  top: 190px;
  width: 698px;
  height: 1195px;
  box-sizing: border-box;
  border: 14px solid #7a4ee8;
  border-radius: 48px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f5ff 100%);
  box-shadow:
    0 16px 0 #5831c7,
    0 24px 32px rgba(58, 33, 138, 0.34),
    inset 0 0 0 9px #ffffff,
    inset 0 0 0 15px #c7b5ff;
}

.checkin-title-wrap {
  position: absolute;
  left: -28px;
  top: -116px;
  width: 754px;
  height: 260px;
  pointer-events: none;
}

.checkin-title-ribbon {
  position: absolute;
  left: 58px;
  width: 638px;
  border-radius: 42px 42px 28px 28px;
  transform: perspective(400px) rotateX(5deg);
}

.checkin-title-ribbon.back {
  top: 48px;
  height: 154px;
  background: linear-gradient(180deg, #8b63fb 0%, #6138d6 100%);
  border: 8px solid #ffffff;
  box-shadow: 0 12px 0 rgba(79, 46, 181, 0.7);
}

.checkin-title-ribbon.front {
  top: 76px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffed35 0%, #ffc01f 61%, #ff981b 100%);
  border: 7px solid #f5ac12;
  box-shadow:
    inset 0 8px 0 rgba(255, 255, 255, 0.38),
    0 8px 0 #7d49da;
}

.checkin-title-ribbon.front span {
  position: relative;
  z-index: 2;
  width: 560px;
  font-size: 52px;
  line-height: 1;
  font-weight: 900;
  color: #fff7f4;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    4px 0 0 #6a3ace,
    -4px 0 0 #6a3ace,
    0 4px 0 #6a3ace,
    0 -4px 0 #6a3ace,
    7px 7px 0 #442489,
    0 9px 0 rgba(96, 49, 174, 0.3);
}

.checkin-title-ribbon.front span::first-letter {
  color: #ffe22a;
}

.checkin-title-tab {
  position: absolute;
  top: 134px;
  width: 110px;
  height: 70px;
  background: linear-gradient(180deg, #ffcf24 0%, #ff9c18 100%);
  border: 6px solid #e49410;
  box-shadow: 0 7px 0 #7744d7;
}

.checkin-title-tab.left {
  left: 54px;
  transform: skewX(-12deg);
  border-radius: 7px 0 12px 12px;
}

.checkin-title-tab.right {
  right: 54px;
  transform: skewX(12deg);
  border-radius: 0 7px 12px 12px;
}

.checkin-title-arrow,
.checkin-title-tab,
.checkin-title-bolt,
.checkin-shine {
  display: none !important;
}

.checkin-title-arrow {
  position: absolute;
  left: 329px;
  top: 0;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff04d 0%, #ffb51f 100%);
  border: 8px solid #ffffff;
  box-shadow: 0 7px 0 #5d32ce;
}

.checkin-title-arrow::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 19px;
  width: 32px;
  height: 50px;
  border-radius: 8px;
  background: #7a4ee8;
}

.checkin-title-arrow::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 11px;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  border-top: 13px solid #7a4ee8;
  border-right: 13px solid #7a4ee8;
  transform: rotate(45deg);
}

.checkin-title-bolt {
  position: absolute;
  right: 55px;
  top: 126px;
  width: 64px;
  height: 84px;
  background: url("checkin-assets/checkin-bolt.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 0 #5c33c7);
  transform: rotate(12deg);
}

.checkin-close {
  position: absolute;
  right: -34px;
  top: -34px;
  width: 86px;
  height: 86px;
  border: 8px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(180deg, #8d65fb 0%, #6541dc 100%);
  color: #ffffff;
  font-size: 67px;
  line-height: 62px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 4px 0 #42248c;
  box-shadow: 0 7px 0 #5535bd, 0 10px 18px rgba(61, 38, 128, 0.32);
  cursor: pointer;
  padding: 0 0 8px;
}

.checkin-subtitle {
  position: absolute;
  left: 38px;
  top: 160px;
  width: 622px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 39px;
  font-weight: 900;
  color: #7550d9;
  text-shadow: 0 3px 0 #ffffff;
}

.checkin-subtitle span {
  width: 35px;
  height: 35px;
  background: #ffd923;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 3px 0 #724bd4);
}

.checkin-grid {
  position: absolute;
  left: 40px;
  top: 258px;
  width: 618px;
  display: grid;
  grid-template-columns: repeat(4, 138px);
  grid-auto-rows: 380px;
  gap: 22px 22px;
}

.checkin-card {
  position: relative;
  min-width: 0;
  height: 380px;
  border-radius: 26px;
  border: 7px solid #d8cff9;
  background: linear-gradient(180deg, #7b50eb 0 63px, #ffffff 64px 100%);
  box-shadow:
    0 8px 0 rgba(101, 76, 185, 0.25),
    inset 0 0 0 5px #ffffff;
  overflow: hidden;
}

.checkin-card.today {
  border-color: #ffdb31;
  background: linear-gradient(180deg, #ffc923 0 63px, #ffffff 64px 100%);
  box-shadow:
    0 0 23px rgba(255, 206, 28, 0.84),
    0 8px 0 rgba(207, 136, 8, 0.34),
    inset 0 0 0 5px #ffffff;
}

.checkin-card.wide {
  grid-column: span 2;
}

.checkin-card-title {
  position: relative;
  z-index: 2;
  height: 67px;
  line-height: 62px;
  text-align: center;
  font-size: 33px;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    3px 0 0 #5731c8,
    -3px 0 0 #5731c8,
    0 3px 0 #5731c8,
    0 -3px 0 #5731c8,
    0 5px 0 rgba(56, 28, 129, 0.35);
}

.checkin-card.today .checkin-card-title {
  color: #fff8e1;
  text-shadow:
    3px 0 0 #f06b12,
    -3px 0 0 #f06b12,
    0 3px 0 #f06b12,
    0 -3px 0 #f06b12,
    0 5px 0 rgba(163, 79, 7, 0.34);
}

.checkin-card-body {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 302px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7f5ff 100%);
}

.checkin-card.today .checkin-card-body {
  background: linear-gradient(180deg, #fff6bd 0%, #fffdf2 100%);
}

.checkin-card-rays {
  display: none;
}

.checkin-card.today .checkin-card-rays,
.checkin-card.wide .checkin-card-rays {
  display: block;
  position: absolute;
  inset: -40px;
  opacity: 0.42;
  background: repeating-conic-gradient(from -8deg, #fff7a1 0 11deg, rgba(255, 255, 255, 0) 11deg 23deg);
}

.checkin-reward-icon {
  position: absolute;
  left: 50%;
  top: 42px;
  width: 91px;
  height: 118px;
  transform: translateX(-50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 6px 0 rgba(116, 78, 41, 0.35));
}

.checkin-reward-icon.image-icon {
  object-fit: contain;
  background: none;
}

.checkin-reward-icon.bolt {
  background-image: url("checkin-assets/checkin-bolt.png");
}

.checkin-reward-icon.coins {
  top: 45px;
  width: 118px;
  height: 102px;
  background-image: url("checkin-assets/checkin-coins.png");
}

.checkin-reward-icon.chest {
  top: 45px;
  width: 236px;
  height: 164px;
  background-image: url("checkin-assets/checkin-chest.png");
}

.checkin-card.wide .checkin-reward-icon.chest {
  top: 30px;
  width: 228px;
  height: 158px;
}

.checkin-card.wide .checkin-amount {
  top: 188px;
}

.checkin-card.wide .checkin-card-badge {
  bottom: 12px;
}

.checkin-amount {
  position: absolute;
  left: 0;
  right: 0;
  top: 168px;
  text-align: center;
  font-size: 38px;
  line-height: 45px;
  font-weight: 900;
  color: #2f2d3c;
  text-shadow: 0 3px 0 #ffffff;
}

.checkin-card-badge {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 18px;
  height: 56px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}

.checkin-card-badge.done {
  background: linear-gradient(180deg, #8fea1d 0%, #31bc09 100%);
  border: 5px solid #68d211;
  color: #ffffff;
  text-shadow:
    2px 0 0 #27860d,
    -2px 0 0 #27860d,
    0 2px 0 #27860d,
    0 -2px 0 #27860d,
    0 4px 0 rgba(28, 106, 7, 0.4);
}

.checkin-card-badge.done span {
  width: 26px;
  height: 26px;
  margin-right: 4px;
  border-radius: 50%;
  background: #ffffff;
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 3px 0 rgba(31, 125, 8, 0.3);
}

.checkin-card-badge.done span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 12px;
  height: 8px;
  border-left: 5px solid #42c013;
  border-bottom: 5px solid #42c013;
  transform: rotate(-45deg);
}

.checkin-card-badge.today {
  background: linear-gradient(180deg, #ffb930 0%, #ff7b11 100%);
  border: 5px solid #fff4a8;
  color: #ffffff;
  text-shadow:
    2px 0 0 #d85d08,
    -2px 0 0 #d85d08,
    0 2px 0 #d85d08,
    0 -2px 0 #d85d08,
    0 4px 0 rgba(144, 58, 4, 0.36);
}

.checkin-card.today.claimed .checkin-card-badge {
  background: linear-gradient(180deg, #8fea1d 0%, #31bc09 100%);
  border-color: #68d211;
  text-shadow:
    2px 0 0 #27860d,
    -2px 0 0 #27860d,
    0 2px 0 #27860d,
    0 -2px 0 #27860d;
}

.checkin-card-badge.locked {
  background: linear-gradient(180deg, #b18bff 0%, #8b60ef 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.24);
  color: #ffffff;
  text-shadow:
    2px 0 0 #6540bd,
    -2px 0 0 #6540bd,
    0 2px 0 #6540bd,
    0 -2px 0 #6540bd,
    0 4px 0 rgba(74, 43, 159, 0.36);
}

.checkin-claim {
  position: absolute;
  left: 152px;
  bottom: -65px;
  width: 394px;
  height: 112px;
  border: 9px solid #f8f6ff;
  border-radius: 56px;
  background: linear-gradient(180deg, #85ec22 0%, #44c50e 58%, #2ca807 100%);
  box-shadow:
    0 10px 0 #198105,
    0 16px 24px rgba(54, 32, 127, 0.34),
    inset 0 7px 0 rgba(255, 255, 255, 0.32);
  color: #ffffff;
  cursor: pointer;
  padding: 0;
}

.checkin-claim.claimed {
  filter: saturate(0.85);
  cursor: default;
}

.checkin-play {
  position: absolute;
  left: 60px;
  top: 27px;
  width: 0;
  height: 0;
  border-top: 28px solid transparent;
  border-bottom: 28px solid transparent;
  border-left: 43px solid #ffffff;
  filter: drop-shadow(0 4px 0 rgba(21, 118, 5, 0.44));
}

.checkin-claim-text {
  position: absolute;
  left: 118px;
  top: 20px;
  width: 236px;
  text-align: center;
  font-size: 48px;
  line-height: 64px;
  font-weight: 900;
  text-shadow:
    3px 0 0 #2b8f09,
    -3px 0 0 #2b8f09,
    0 3px 0 #2b8f09,
    0 -3px 0 #2b8f09,
    0 5px 0 rgba(21, 111, 3, 0.42);
}

.checkin-shine {
  position: absolute;
  right: 45px;
  top: 26px;
  width: 30px;
  height: 30px;
  background:
    linear-gradient(45deg, transparent 0 42%, #ffffff 43% 57%, transparent 58%),
    linear-gradient(135deg, transparent 0 42%, #ffffff 43% 57%, transparent 58%);
  filter: drop-shadow(0 3px 0 rgba(31, 125, 8, 0.3));
}
