/* =============================================================
   ALMA Gamification Layer — styles
   All new UI. Zero changes to style.css.
============================================================= */

/* ── Daily Challenge Card ─────────────────────────────────── */
#dailyChallengeCard {
  margin: 12px 16px 8px;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid #F58220;
  background: linear-gradient(135deg, #fff8f2 0%, #ffffff 100%);
  box-shadow: 0 2px 12px rgba(245, 130, 32, 0.12);
}

.dc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 6px;
  background: #F58220;
}

.dc-header-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.9;
}

.dc-streak-pill {
  margin-left: auto;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dc-body {
  padding: 12px 14px 14px;
}

.dc-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px;
  line-height: 1.3;
}

.dc-context {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 12px;
  line-height: 1.5;
}

.dc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dc-level-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: #fef3c7;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dc-exp-pill {
  font-size: 11px;
  color: #6b7280;
}

.dc-start-btn {
  width: 100%;
  padding: 11px;
  background: #F58220;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.dc-start-btn:active {
  opacity: 0.85;
}

/* ── Completed state ─────────────────────────────────────── */
.dc-completed-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dc-completed-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dc-completed-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.dc-completed-text {
  flex: 1;
}

.dc-completed-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 2px;
}

.dc-completed-sub {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

.dc-teaser {
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 3px solid #F58220;
}

.dc-teaser-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #F58220;
  margin: 0 0 2px;
}

.dc-teaser-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 2px;
}

.dc-teaser-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  font-style: italic;
}

/* ── Gamification Card in Profile ────────────────────────── */
#gamificationCard {
  margin: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 12px;
}

.gc-top {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gc-rank-block {
  display: flex;
  flex-direction: column;
}

.gc-rank-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}

.gc-rank-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.gc-streak-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.gc-streak-number {
  font-size: 28px;
  font-weight: 800;
  color: #F58220;
  line-height: 1;
}

.gc-streak-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.gc-bottom {
  padding: 12px 16px;
}

.gc-exp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.gc-exp-current {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

.gc-exp-next {
  font-size: 12px;
  color: #9ca3af;
}

.gc-exp-bar-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.gc-exp-bar-fill {
  height: 100%;
  background: #F58220;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ── Results Modal Gamification Block ────────────────────── */
#challengeResultsBlock {
  background: linear-gradient(135deg, #fff8f2 0%, #ffffff 100%);
  border: 1.5px solid #F58220;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.crb-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #F58220;
  margin: 0 0 12px;
}

.crb-exp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.crb-exp-number {
  font-size: 36px;
  font-weight: 800;
  color: #F58220;
  line-height: 1;
}

.crb-exp-label {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.crb-exp-label strong {
  color: #1f2937;
  font-weight: 700;
}

.crb-bar-track {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.crb-bar-fill {
  height: 100%;
  background: #F58220;
  border-radius: 999px;
  transition: width 0.8s ease;
}

.crb-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.crb-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f3f4f6;
  color: #374151;
}

.crb-pill.rankup {
  background: #fef3c7;
  color: #92400e;
}

.crb-pill.streak {
  background: #fff7ed;
  color: #c2410c;
}

.crb-divider {
  height: 1px;
  background: #f3f4f6;
  margin-bottom: 12px;
}

.crb-teaser {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #9ca3af;
}

.crb-teaser-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  margin: 0 0 2px;
}

.crb-teaser-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 2px;
}

.crb-teaser-hint {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
  margin: 0;
}

/* ── Rank-up toast overlay ───────────────────────────────── */
#rankUpToast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  z-index: 99997;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

#rankUpToast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
