/* Hive celebration modal, confetti, badge preview */
.hive-celebrate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 18, 38, 0.55);
  backdrop-filter: blur(6px);
  animation: hive-celebrate-fade-in 0.25s ease;
}

.hive-celebrate-overlay.is-closing {
  animation: hive-celebrate-fade-out 0.2s ease forwards;
}

@keyframes hive-celebrate-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hive-celebrate-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.hive-celebrate-modal {
  position: relative;
  width: min(420px, 100%);
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e8ecf4);
  border-radius: 24px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(11, 18, 38, 0.22);
  animation: hive-celebrate-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes hive-celebrate-pop {
  from { opacity: 0; transform: scale(0.82) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.hive-celebrate-confetti {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: hive-celebrate-confetti-fall 2.6s ease-in forwards;
}

@keyframes hive-celebrate-confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(340px) rotate(720deg); }
}

.hive-celebrate-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 8px;
  animation: hive-celebrate-bounce 0.6s ease 0.15s both;
}

@keyframes hive-celebrate-bounce {
  0% { transform: scale(0.3); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.hive-celebrate-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber, #ffa500);
  margin-bottom: 6px;
}

.hive-celebrate-title {
  font-family: "Baloo 2", "DM Sans", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink, #11203f);
  margin: 0 0 8px;
  line-height: 1.2;
}

.hive-celebrate-subtitle {
  font-size: 15px;
  color: var(--muted, #6b7a99);
  margin: 0 0 20px;
  line-height: 1.45;
}

.hive-celebrate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hive-celebrate-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hive-celebrate-btn:hover {
  transform: translateY(-1px);
}

.hive-celebrate-btn--primary {
  background: var(--amber, #ffa500);
  color: #0f1a3a;
  box-shadow: 0 4px 14px rgba(255, 165, 0, 0.35);
}

.hive-celebrate-btn--secondary {
  background: transparent;
  color: var(--ink, #11203f);
  border: 1.5px solid var(--line, #e8ecf4);
}

.hive-celebrate-preview-date {
  font-size: 12px;
  color: var(--muted, #6b7a99);
  margin-top: -12px;
  margin-bottom: 16px;
}

/* Badge filter chips on Progress tab */
.badge-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-filter-chip {
  border: 1.5px solid var(--line, #e8ecf4);
  background: var(--paper, #fff);
  color: var(--ink, #11203f);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.badge-filter-chip.on {
  background: var(--amber, #ffa500);
  border-color: var(--amber, #ffa500);
  color: #0f1a3a;
}

.badge-shelf-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #6b7a99);
  margin-bottom: 10px;
}

.badge-shelf .badge-hex,
.badge-shelf-full .badge-item {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.badge-shelf .badge-hex:hover,
.badge-shelf-full .badge-item:hover {
  transform: scale(1.06);
}

.badge-track-section {
  margin-top: 28px;
}

.badge-track-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--ink, #11203f);
}

.hive-quiz-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.hive-quiz-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.15);
  border: 1px solid rgba(255, 165, 0, 0.35);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink, #11203f);
}

@media (max-width: 680px) {
  .hive-celebrate-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .hive-celebrate-modal {
    width: 100%;
    max-height: min(90dvh, 90vh);
    overflow: auto;
    border-radius: 18px 18px 14px 14px;
    padding: 24px 18px 18px;
  }

  .hive-celebrate-modal button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hive-celebrate-confetti {
    display: none !important;
  }
  .hive-celebrate-modal,
  .hive-celebrate-overlay,
  .hive-celebrate-emoji {
    animation: none !important;
  }
}

html[data-theme="dark"] .hive-celebrate-modal {
  background: var(--paper, #121a33);
  border-color: var(--line, #2a3558);
}

html[data-theme="dark"] .hive-celebrate-title {
  color: var(--ink, #eef2ff);
}

html[data-theme="dark"] .hive-celebrate-btn--secondary {
  color: var(--ink, #eef2ff);
  border-color: var(--line, #2a3558);
}
