/* Bộ sưu tập sticker đổi bằng sao. */

/* Thanh trên màn hình chính */
.rw-bar {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-height: 56px;
  padding: 10px 18px;
  text-align: left;
  background: linear-gradient(135deg, #E3F2FF, #F1E6FF);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 800;
}
.rw-bar:active { transform: translateY(3px); }
.rw-bar-day {
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.rw-bar-day.done { background: #DFFFE9; }

/* Album */
.rw-head {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 24px;
  margin: 8px 0 18px;
  text-align: center;
}
.rw-head-count { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.rw-head-next { font-size: 20px; color: var(--muted); font-weight: 700; }
.rw-progress { height: 22px; margin-bottom: 10px; }
.rw-progress > div { background: linear-gradient(90deg, #FFD43B, #FF9F43); }

.rw-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.rw-tab {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 4px solid transparent;
  min-height: 92px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.rw-tab.active { border-color: var(--accent); }
.rw-tab:active { transform: translateY(3px); }
.rw-tab-icon { font-size: 36px; line-height: 1.1; }
.rw-tab-label { font-size: 18px; font-weight: 800; }
.rw-tab-count { font-size: 15px; color: var(--muted); font-weight: 700; }

.rw-spot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #FFF3C4;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 24px;
  margin-bottom: 18px;
  animation: rw-in .3s;
}
.rw-spot.hidden { display: none; }
.rw-spot-emoji { font-size: 72px; line-height: 1; }
.rw-spot-text { display: flex; flex-direction: column; }
.rw-spot-name { font-size: 44px; font-weight: 800; }
.rw-spot-vi { font-size: 22px; color: var(--muted); }

.rw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}
.rw-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 190px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
.rw-card:active { transform: scale(.96); }
.rw-card-emoji { font-size: 92px; line-height: 1.1; }
.rw-card-name { font-size: 24px; font-weight: 800; }
.rw-card-vi { font-size: 16px; color: var(--muted); }
.rw-card.rw-tap .rw-card-emoji { animation: rw-wiggle .6s; }
.rw-card.locked {
  background: #ECEEF1;
  box-shadow: inset 0 0 0 3px #DFE3E8;
}
.rw-card.locked .rw-card-emoji { font-size: 56px; opacity: .45; filter: grayscale(1); }

/* Lớp phủ chúc mừng */
.rw-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 53, 66, .55);
  overflow: hidden;
  animation: rw-fade .25s;
  touch-action: none;
}
.rw-overlay.rw-out { opacity: 0; transition: opacity .25s; }
.rw-pop {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: 40px;
  box-shadow: var(--shadow);
  padding: 28px 48px 24px;
  text-align: center;
  max-width: calc(100vw - 32px);
  animation: rw-pop .6s cubic-bezier(.2, 1.6, .4, 1);
}
.rw-pop-title { font-size: 30px; font-weight: 800; color: var(--accent); }
.rw-pop-emoji {
  font-size: 180px;
  line-height: 1.15;
  animation: rw-wiggle 1s .6s 2;
}
.rw-pop-name { font-size: 52px; font-weight: 800; }
.rw-pop-vi { font-size: 24px; color: var(--muted); }
.rw-pop-count { font-size: 18px; color: var(--muted); margin-top: 6px; font-weight: 700; }

.rw-confetti { position: absolute; inset: 0; pointer-events: none; }
.rw-bit {
  position: absolute;
  top: -24px;
  width: 14px;
  height: 22px;
  border-radius: 3px;
  animation-name: rw-fall;
  animation-timing-function: linear;
  animation-iteration-count: 2;
}

@keyframes rw-fade { from { opacity: 0; } }
@keyframes rw-in { from { opacity: 0; transform: scale(.9); } }
@keyframes rw-pop {
  0% { transform: scale(.2) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes rw-wiggle {
  25% { transform: rotate(-10deg) scale(1.1); }
  50% { transform: rotate(8deg) scale(1.15); }
  75% { transform: rotate(-4deg) scale(1.05); }
}
@keyframes rw-fall {
  to { transform: translate(var(--rw-x, 0), 110vh) rotate(var(--rw-r, 360deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .rw-bit { display: none; }
  .rw-pop, .rw-pop-emoji { animation: none; }
}

@media (max-width: 600px) {
  .rw-bar { font-size: 16px; }
  .rw-tabs { grid-template-columns: repeat(2, 1fr); }
  .rw-grid { gap: 12px; }
  .rw-card { min-height: 140px; }
  .rw-card-emoji { font-size: 60px; }
  .rw-card-name { font-size: 18px; }
  .rw-pop-emoji { font-size: 120px; }
  .rw-pop-name { font-size: 38px; }
}
