/* classroomGames/stickerreward.css */

.sticker-game {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: "Fredoka", Arial, sans-serif;
  color: #000;
  overflow: hidden;
}

.sticker-toolbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #ffe9ff;
  border: 7px solid #000;
  border-radius: 22px;
  padding: 14px 18px;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.22);
}

.sticker-toolbar h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
}

.sticker-toolbar p {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 900;
}

.sticker-score-pill {
  min-width: 130px;
  background: #d3ff00;
  border: 6px solid #000;
  border-radius: 18px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.22);
}

.sticker-score-pill strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.sticker-score-pill span {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.sticker-main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px;
  overflow: hidden;
}

.sticker-picker-panel,
.sticker-students-panel {
  min-height: 0;
  overflow: auto;
  background: #bff1ea;
  border: 7px solid #000;
  border-radius: 24px;
  padding: 16px;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.22);
}

.sticker-students-panel {
  background: #e8cdef;
  box-shadow: inset -6px -6px 0 rgba(0,0,0,0.15);
}

.sticker-picker-panel h3 {
  margin: 0 0 14px;
  font-size: 26px;
}

.sticker-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sticker-pick-btn {
  width: 100%;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 5px solid #000;
  border-radius: 16px;
  font-size: 32px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
}

.sticker-pick-btn.active {
  background: #d3ff00;
  transform: translateY(-3px) scale(1.04);
}

.sticker-selected-box {
  margin-top: 16px;
  background: #fff0a8;
  border: 6px solid #000;
  border-radius: 18px;
  padding: 12px;
  text-align: center;
}

.sticker-selected-box span {
  display: block;
  font-size: 60px;
}

.sticker-selected-box strong {
  display: block;
  font-size: 20px;
}

.sticker-reset-btn,
.sticker-back-btn {
  width: 100%;
  margin-top: 14px;
  font-family: "Fredoka", Arial, sans-serif;
  font-weight: 900;
}

.sticker-reset-btn {
  background: #ff9b42;
}

.sticker-back-btn {
  background: #23d8ff;
}

.sticker-students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.sticker-student-card {
  min-height: 215px;
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: start;
  background: #fff;
  border: 6px solid #000;
  border-radius: 22px;
  padding: 14px;
  text-align: left;
  box-shadow: 7px 9px 0 rgba(0,0,0,0.25);
  font-family: "Fredoka", Arial, sans-serif;
  font-weight: 900;
}

.sticker-student-card:hover {
  background: #f7d3ff;
  transform: translateY(-4px) scale(1.02);
}

.sticker-student-info h3 {
  margin: 0;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.sticker-student-info p {
  margin: 5px 0 0;
  font-size: 15px;
}

.sticker-count-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #d3ff00;
  border: 5px solid #000;
  border-radius: 14px;
  font-size: 20px;
}

.sticker-trail {
  grid-column: 1 / -1;
  min-height: 72px;
  background: #fff0a8;
  border: 5px solid #000;
  border-radius: 16px;
  padding: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}

.sticker-trail span {
  font-size: 24px;
  line-height: 1;
}

.sticker-trail em {
  font-style: normal;
  font-size: 15px;
  opacity: 0.65;
}

@media (max-width: 900px) {
  .sticker-main {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .sticker-picker-panel,
  .sticker-students-panel {
    overflow: visible;
  }
}

@media (max-width: 600px) {
  .sticker-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sticker-students-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   STICKER REMOVE CONTROLS
========================================================= */

.sticker-student-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  cursor: default !important;
}

.sticker-give-main {
  width: 100% !important;
  min-height: 84px !important;
  display: grid !important;
  grid-template-columns: 74px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

.sticker-give-main:hover {
  transform: none !important;
}

.sticker-remove-last-btn {
  width: 100% !important;
  background: #ff6767 !important;
  font-family: "Fredoka", Arial, sans-serif !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  padding: 9px 10px !important;
  margin-top: auto !important;
}

.sticker-remove-last-btn:disabled {
  background: #aaa !important;
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

.sticker-trail {
  min-height: 74px !important;
}

.sticker-mini-remove {
  width: auto !important;
  min-width: 42px !important;
  height: 38px !important;
  padding: 3px 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: #fff !important;
  border: 4px solid #000 !important;
  border-radius: 12px !important;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.22) !important;
}

.sticker-mini-remove span {
  font-size: 22px !important;
  line-height: 1 !important;
}

.sticker-mini-remove em {
  font-style: normal !important;
  font-family: "Fredoka", Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #ff3030 !important;
}

.sticker-mini-remove:hover,
.sticker-remove-last-btn:hover {
  transform: translateY(-2px) !important;
}


/* =========================================================
   BIG STUDENT PHOTOS + CELEBRATION MILESTONES
========================================================= */

.sticker-students-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important;
  gap: 18px !important;
}

.sticker-student-card {
  min-height: 390px !important;
  padding: 16px !important;
  align-items: stretch !important;
}

.sticker-give-main {
  min-height: 230px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 10px !important;
  background: #fff7ff !important;
  border: 5px solid #000 !important;
  border-radius: 20px !important;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.22) !important;
}

.sticker-give-main:hover {
  transform: translateY(-3px) scale(1.015) !important;
  background: #f7d3ff !important;
}

.sticker-give-main .classroom-reward-photo {
  width: min(180px, 82%) !important;
  height: 170px !important;
  border-width: 6px !important;
  border-radius: 24px !important;
  background: #d3ff00 !important;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.22) !important;
}

.sticker-give-main .classroom-reward-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.sticker-give-main .classroom-reward-photo span {
  font-size: 90px !important;
  line-height: 1 !important;
}

.sticker-student-info {
  width: 100% !important;
  text-align: center !important;
}

.sticker-student-info h3 {
  font-size: 26px !important;
  line-height: 1.05 !important;
}

.sticker-student-info p {
  font-size: 14px !important;
}

.sticker-count-badge {
  right: 14px !important;
  top: 14px !important;
  min-width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  font-size: 26px !important;
  z-index: 3 !important;
}

.sticker-trail {
  min-height: 82px !important;
}

.sticker-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255,255,255,0.28), rgba(255,255,255,0));
}

.sticker-celebration-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.sticker-celebration-message {
  position: relative;
  z-index: 2;
  min-width: min(560px, 86vw);
  padding: 30px 38px;
  text-align: center;
  background: #fff0a8;
  border: 9px solid #000;
  border-radius: 34px;
  box-shadow: 14px 14px 0 rgba(0,0,0,0.32);
  animation: stickerCelebrationPop 0.6s cubic-bezier(.2, 1.6, .3, 1) both;
}

.sticker-celebration-overlay.big .sticker-celebration-message {
  transform: scale(1.12);
  background: linear-gradient(135deg, #fff0a8, #ffb3df, #d3ff00);
}

.sticker-celebration-overlay.mega .sticker-celebration-message {
  transform: scale(1.22);
  background: linear-gradient(135deg, #d3ff00, #23d8ff, #ff7fcb, #fff0a8);
}

.sticker-celebration-count {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: #d3ff00;
  border: 8px solid #000;
  border-radius: 50%;
  font-size: 56px;
  font-weight: 900;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.25);
}

.sticker-celebration-message h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 74px);
  font-weight: 900;
}

.sticker-celebration-message p {
  margin: 10px 0 0;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 900;
}

.sticker-celebration-piece {
  position: absolute;
  left: var(--left);
  top: -70px;
  font-size: calc(34px * var(--scale));
  animation: stickerCelebrationFall var(--duration) ease-in var(--delay) forwards;
  filter: drop-shadow(4px 4px 0 rgba(0,0,0,0.28));
}

.sticker-celebration-overlay.big .sticker-celebration-piece {
  font-size: calc(44px * var(--scale));
}

.sticker-celebration-overlay.mega .sticker-celebration-piece {
  font-size: calc(54px * var(--scale));
}

@keyframes stickerCelebrationPop {
  0% { opacity: 0; transform: scale(0.45) rotate(-5deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes stickerCelebrationFall {
  0% {
    transform: translateY(-80px) rotate(0deg) scale(var(--scale));
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translateY(115vh) rotate(var(--rotate)) scale(var(--scale));
    opacity: 0.95;
  }
}

@media (max-width: 700px) {
  .sticker-students-grid {
    grid-template-columns: 1fr !important;
  }

  .sticker-give-main .classroom-reward-photo {
    width: 150px !important;
    height: 145px !important;
  }
}
