/* ============================================================
   AI Remix Lab — Custom Styles
   ============================================================ */

/* 1. CSS Custom Properties (Design Tokens)
   --------------------------------------------------------- */
:root {
  --rl-purple:     #4B1D8F;
  --rl-purple-lt:  #7C3AED;
  --rl-green:      #22C55E;
  --rl-red:        #EF4444;
  --rl-blue:       #3B82F6;
  --rl-amber:      #F59E0B;
  --rl-bg:         #F3F0FF;
  --rl-card:       #FFFFFF;
  --rl-text:       #1E1B4B;
  --rl-muted:      #6B7280;
  --rl-border:     #E5E7EB;
  --rl-shadow:     0 2px 12px rgba(75, 29, 143, 0.08);
  --rl-shadow-hover: 0 8px 24px rgba(75, 29, 143, 0.18);

  /* Bootstrap primary override */
  --bs-primary: #4B1D8F;
  --bs-primary-rgb: 75, 29, 143;
}

/* 2. Base & Typography
   --------------------------------------------------------- */
body.rl-body {
  background-color: var(--rl-bg);
  color: var(--rl-text);
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, .rl-heading {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  color: var(--rl-text);
}

.rl-heading { color: var(--rl-purple); }
.text-purple { color: var(--rl-purple) !important; }
.bg-purple   { background: var(--rl-purple) !important; }

/* 3. Navbar
   --------------------------------------------------------- */
.rl-navbar {
  background: var(--rl-purple);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1030;
}

.rl-brand-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.rl-nav-link {
  color: rgba(255,255,255,0.82) !important;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.35rem 0.75rem !important;
  transition: background 0.15s, color 0.15s;
}
.rl-nav-link:hover,
.rl-nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

/* 4. XP Progress Bar
   --------------------------------------------------------- */
.rl-xp-bar-wrap {
  position: relative;
  height: 6px;
  background: rgba(75, 29, 143, 0.15);
  z-index: 1020;
}

.rl-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rl-purple-lt), var(--rl-green));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.rl-xp-label {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 0.72rem;
  color: var(--rl-muted);
  white-space: nowrap;
}

/* Dashboard XP bar (larger) */
.rl-xp-bar-lg-wrap {
  height: 14px;
  background: var(--rl-border);
  border-radius: 999px;
  overflow: hidden;
}
.rl-xp-bar-lg {
  height: 100%;
  background: linear-gradient(90deg, var(--rl-purple), var(--rl-green));
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 5. Point Burst Animation
   --------------------------------------------------------- */
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  80%  { opacity: 0.8; transform: translateY(-60px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.9); }
}

.rl-point-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

.rl-burst-chip {
  position: fixed;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--rl-green);
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: floatUp 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 9999;
}

/* 6. Cards
   --------------------------------------------------------- */
.rl-card {
  background: var(--rl-card);
  border-radius: 14px;
  box-shadow: var(--rl-shadow);
  border: 1px solid var(--rl-border);
  position: relative;
  overflow: visible;
}

.rl-card-section-header {
  background: var(--rl-purple);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

/* Card hover (prompt library) */
.rl-card.rl-hoverable {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.rl-card.rl-hoverable:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--rl-shadow-hover);
}

/* 7. Prompt Grid
   --------------------------------------------------------- */
.rl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.rl-grid .rl-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rl-grid .rl-card:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--rl-shadow-hover);
}

.rl-card-header { padding: 0.75rem 1rem 0; }
.rl-card-title  {
  padding: 0 1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.97rem;
}
.rl-card-author { padding: 0 1rem; }
.rl-card-stats  { padding: 0 1rem; }
.rl-card-actions { padding: 0.75rem 1rem 0.75rem; margin-top: auto; }

/* List view */
.rl-list {}
.rl-list-row {
  background: var(--rl-card);
  border: 1px solid var(--rl-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  transition: box-shadow 0.15s;
}
.rl-list-row:hover { box-shadow: var(--rl-shadow-hover); }
.rl-list-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: var(--rl-purple);
}

/* 8. Filter bar
   --------------------------------------------------------- */
.rl-filter-bar {
  background: rgba(243, 240, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rl-border);
  z-index: 900;
}

.rl-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rl-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid var(--rl-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
  color: var(--rl-text);
  white-space: nowrap;
}
.rl-chip:hover { border-color: var(--rl-purple-lt); color: var(--rl-purple); }
.rl-chip.active {
  background: var(--rl-purple);
  border-color: var(--rl-purple);
  color: #fff;
}

.rl-select {
  border-color: var(--rl-border);
  font-size: 0.85rem;
  border-radius: 8px;
}

/* 9. Badges & Chips
   --------------------------------------------------------- */
.rl-uc-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(75,29,143,0.1);
  color: var(--rl-purple);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rl-badge-published {
  background: rgba(34,197,94,0.15);
  color: #166534;
}

.rl-pts-preview {
  display: inline-flex;
  align-items: center;
  background: rgba(245,158,11,0.12);
  color: #92400E;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.rl-pts-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.rl-pts-chip-sm {
  display: inline-flex;
  align-items: center;
  background: rgba(34,197,94,0.15);
  color: #166534;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
}

/* 10. Tier Badges
   --------------------------------------------------------- */
.rl-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.tier-lurker      { background: rgba(156,163,175,0.2); color: #4B5563; }
.tier-contributor { background: rgba(59,130,246,0.15); color: #1D4ED8; }
.tier-explorer    { background: rgba(34,197,94,0.15);  color: #166534; }
.tier-expert      { background: rgba(245,158,11,0.15); color: #92400E; }
.tier-champion    { background: rgba(168,85,247,0.15); color: #6B21A8; }

/* 11. Avatar
   --------------------------------------------------------- */
.rl-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}

.rl-avatar-sm {
  width: 30px;
  height: 30px;
  background: var(--rl-purple);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* 12. Buttons
   --------------------------------------------------------- */
.rl-btn-primary {
  background: var(--rl-purple);
  border-color: var(--rl-purple);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
}
.rl-btn-primary:hover {
  background: var(--rl-purple-lt);
  border-color: var(--rl-purple-lt);
  color: #fff;
  transform: translateY(-1px);
}
.rl-btn-primary:disabled {
  background: var(--rl-muted);
  border-color: var(--rl-muted);
}

/* 13. Prompt Body (dark code card)
   --------------------------------------------------------- */
.rl-prompt-preview {
  background: var(--rl-text);
  border-radius: 12px;
  overflow: hidden;
}
.rl-prompt-preview-header {
  background: rgba(255,255,255,0.08);
  padding: 0.6rem 1rem;
}

.rl-prompt-card {
  background: var(--rl-text);
  color: #fff;
}
.rl-prompt-card-header {
  background: rgba(255,255,255,0.08);
  padding: 0.6rem 1rem;
  color: #E5E7EB;
  font-size: 0.85rem;
  font-weight: 600;
}

.rl-prompt-body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  color: #E5E7EB;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 1rem;
  margin: 0;
  background: transparent;
  border: none;
}

/* 14. Score Meter
   --------------------------------------------------------- */
.rl-score-meter-wrap {
  position: relative;
}

input[type="range"].form-range {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--rl-red) 0%,
    var(--rl-red) 40%,
    var(--rl-amber) 40%,
    var(--rl-amber) 70%,
    var(--rl-green) 70%,
    var(--rl-green) 100%
  );
  outline: none;
  cursor: pointer;
}

input[type="range"].form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--rl-purple);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.1s;
}
input[type="range"].form-range::-webkit-slider-thumb:hover { transform: scale(1.2); }

input[type="range"].form-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--rl-purple);
  cursor: pointer;
}

.rl-score-display {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--rl-amber);
  transition: color 0.2s;
}

.rl-score-zones {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--rl-muted);
  margin-top: 0.25rem;
}

/* 15. Star Rating
   --------------------------------------------------------- */
.rl-stars { display: flex; gap: 2px; }
.rl-star {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--rl-border);
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
}
.rl-star.filled, .rl-star.hover { color: var(--rl-amber); }
.rl-star:hover { transform: scale(1.2); }
.rl-stars.rated .rl-star { cursor: default; }

.rl-score-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
}
.score-high { background: rgba(34,197,94,0.15); color: #166534; }
.score-mid  { background: rgba(245,158,11,0.15); color: #92400E; }
.score-low  { background: rgba(239,68,68,0.15);  color: #991B1B; }

/* 16. App Selection Cards
   --------------------------------------------------------- */
.rl-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.rl-app-card {
  border: 2px solid var(--rl-border);
  border-radius: 12px;
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.rl-app-card:hover {
  border-color: var(--rl-purple-lt);
  transform: scale(1.03);
}
.rl-app-card.selected {
  border-color: var(--rl-purple);
  box-shadow: 0 0 0 3px rgba(75,29,143,0.15);
  transform: scale(1.05);
}
.rl-app-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.4rem;
  color: var(--rl-text);
}

/* 17. Use Case Tile Grid (submit wizard)
   --------------------------------------------------------- */
.rl-uc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.rl-uc-tile {
  border: 2px solid var(--rl-border);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.rl-uc-tile:hover {
  border-color: var(--rl-purple-lt);
  background: rgba(124,58,237,0.05);
}
.rl-uc-tile.selected {
  border-color: var(--rl-purple);
  background: rgba(75,29,143,0.08);
  box-shadow: 0 0 0 2px rgba(75,29,143,0.2);
}
.rl-uc-tile-icon {
  font-size: 1.5rem;
  color: var(--rl-purple);
  display: block;
  margin-bottom: 0.4rem;
}
.rl-uc-tile-name {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--rl-text);
}

/* 18. Similarity Nudge
   --------------------------------------------------------- */
@keyframes slideInBounce {
  0%   { opacity: 0; transform: translateY(-12px); }
  60%  { transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.rl-nudge-card {
  background: #FFFBEB;
  border: 2px solid var(--rl-amber);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  animation: slideInBounce 0.4s ease;
  margin-top: 0.75rem;
}

.rl-nudge-banner {
  border-left: 4px solid var(--rl-amber);
  border-radius: 8px;
  animation: slideInBounce 0.4s ease;
}

/* 19. File Upload Zone
   --------------------------------------------------------- */
.rl-dropzone {
  border: 2px dashed var(--rl-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rl-dropzone:hover, .rl-dropzone.drag-over {
  border-color: var(--rl-purple);
  background: rgba(75,29,143,0.04);
}

.rl-file-link { color: var(--rl-purple); font-weight: 600; cursor: pointer; }

.rl-file-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(75,29,143,0.08);
  color: var(--rl-purple);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.2rem;
}

/* 20. Trial Cards
   --------------------------------------------------------- */
.rl-trial-card {
  background: #fff;
  border: 1px solid var(--rl-border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--rl-shadow);
}

.rl-trial-header { border-bottom: 1px solid var(--rl-border); padding-bottom: 0.75rem; }

.rl-response-body {
  font-size: 0.9rem;
  color: var(--rl-text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.rl-response-body.expanded { max-height: 2000px; }

.rl-thumb-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.rl-file-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--rl-text);
}
.rl-thumb-caption { font-size: 0.7rem; max-width: 80px; text-align: center; }

.rl-eval {
  background: rgba(75,29,143,0.04);
  border-left: 3px solid var(--rl-purple);
  border-radius: 0 8px 8px 0;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.rl-comment {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rl-border);
}
.rl-comment:last-child { border-bottom: none; }

/* 21. Wizard Steps
   --------------------------------------------------------- */
.rl-wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.rl-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.rl-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rl-border);
  color: var(--rl-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.rl-step.active .rl-step-num {
  background: var(--rl-purple);
  color: #fff;
}
.rl-step-label { font-size: 0.72rem; color: var(--rl-muted); }
.rl-step.active .rl-step-label { color: var(--rl-purple); font-weight: 700; }
.rl-step-line {
  flex: 1;
  height: 2px;
  background: var(--rl-border);
  margin: 0 0.5rem;
  margin-bottom: 1rem;
}

/* 22. Dashboard Stats
   --------------------------------------------------------- */
.rl-stat-card {
  background: #fff;
  border: 1px solid var(--rl-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--rl-shadow);
}
.rl-stat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.rl-stat-value {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--rl-purple);
  line-height: 1;
}
.rl-stat-label { color: var(--rl-muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* 23. Activity Timeline
   --------------------------------------------------------- */
.rl-timeline { max-height: 400px; overflow-y: auto; }
.rl-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rl-border);
}
.rl-timeline-item:last-child { border-bottom: none; margin-bottom: 0; }
.rl-timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.rl-timeline-body { flex: 1; min-width: 0; }

/* 24. Podium (Leaderboard)
   --------------------------------------------------------- */
.rl-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem 0;
}
.rl-podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}
.rl-podium-crown { font-size: 1.5rem; }
.rl-podium-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
}
.rl-podium-1 .rl-podium-avatar { width: 70px; height: 70px; font-size: 1.6rem; }
.rl-podium-rank { font-weight: 800; font-size: 1.1rem; }
.rl-podium-name { font-weight: 700; font-size: 0.85rem; max-width: 100px; }
.rl-podium-pts { font-weight: 800; color: var(--rl-purple); }
.rl-podium-block { width: 90px; border-radius: 6px 6px 0 0; }
.rl-podium-1 .rl-podium-block { width: 110px; }

/* Leaderboard rows */
.rl-leaderboard-row {
  border-bottom: 1px solid var(--rl-border);
  transition: background 0.15s;
}
.rl-leaderboard-row:last-child { border-bottom: none; }
.rl-leaderboard-row:hover { background: rgba(75,29,143,0.03); }

.rl-current-user-row {
  background: rgba(75,29,143,0.05);
  border-left: 4px solid var(--rl-purple);
}

/* 25. Lineage Banner
   --------------------------------------------------------- */
.rl-lineage-banner {
  background: rgba(75,29,143,0.06);
  border-left: 4px solid var(--rl-purple-lt);
  border-radius: 0 8px 8px 0;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}

/* 26. Alerts
   --------------------------------------------------------- */
.rl-alert { border-radius: 10px; }

/* 27. Footer
   --------------------------------------------------------- */
.rl-footer {
  margin-top: 3rem;
  padding: 1.25rem 0;
  background: var(--rl-card);
  border-top: 1px solid var(--rl-border);
  color: var(--rl-muted);
  font-size: 0.82rem;
}

/* 28. Help Button & Modal
   --------------------------------------------------------- */
.rl-help-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.rl-help-btn:hover {
  background: rgba(255,255,255,0.32);
  transform: scale(1.1);
}

.rl-help-modal .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
}

.rl-help-header {
  background: var(--rl-purple);
  color: #fff;
  border-bottom: none;
  padding: 1rem 1.25rem;
}
.rl-help-header .modal-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
}

.rl-help-tabs {
  border-bottom: 2px solid var(--rl-border);
  gap: 0.25rem;
}
.rl-help-tabs .nav-link {
  color: var(--rl-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 0.5rem 0.85rem;
}
.rl-help-tabs .nav-link.active {
  color: var(--rl-purple);
  background: rgba(75,29,143,0.06);
  border-bottom: 2px solid var(--rl-purple);
}
.rl-help-tabs .nav-link:hover:not(.active) {
  color: var(--rl-purple);
  background: rgba(75,29,143,0.04);
}

/* Getting started steps */
.rl-help-steps { display: flex; flex-direction: column; gap: 1.25rem; }
.rl-help-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.rl-help-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rl-purple);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Points table */
.rl-points-table { display: flex; flex-direction: column; gap: 0.75rem; }
.rl-pts-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--rl-bg);
  border-radius: 10px;
  border: 1px solid var(--rl-border);
}
.rl-pts-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.rl-pts-value {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--rl-purple);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}
.rl-pts-top { color: var(--rl-green) !important; }

/* Tiers list */
.rl-tiers-list { display: flex; flex-direction: column; gap: 0.75rem; }
.rl-tier-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--rl-bg);
  border-radius: 10px;
  border: 1px solid var(--rl-border);
}
.rl-tier-icon { font-size: 1.5rem; width: 2rem; text-align: center; flex-shrink: 0; }
.rl-tier-threshold {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}
.rl-tier-tip {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
}

/* App info cards */
.rl-app-info-card {
  background: var(--rl-bg);
  border: 1px solid var(--rl-border);
  border-radius: 12px;
  padding: 1rem;
  height: 100%;
}

/* 29. Upload Zone (dual-panel input/output)
   --------------------------------------------------------- */
.rl-upload-label {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.rl-upload-zone {
  min-height: 140px;
  border: 2px dashed var(--rl-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  padding: 1rem;
  position: relative;
}
.rl-upload-zone:hover,
.rl-upload-zone.drag-over {
  border-color: var(--rl-purple);
  background: rgba(75, 29, 143, 0.03);
}

.rl-upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  text-align: center;
}

.rl-upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.rl-preview-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 90px;
}
.rl-preview-thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--rl-border);
}
.rl-thumb-name {
  font-size: 0.68rem;
  color: var(--rl-muted);
  text-align: center;
  word-break: break-all;
  max-width: 88px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rl-file-chip-lg {
  display: inline-flex;
  align-items: center;
  background: rgba(75, 29, 143, 0.07);
  color: var(--rl-purple);
  border: 1px solid rgba(75, 29, 143, 0.15);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-blue  { color: var(--rl-blue)  !important; }
.text-green { color: var(--rl-green) !important; }

/* 31. Misc Utilities
   --------------------------------------------------------- */
.rl-form-error { min-height: 1rem; }

@media (max-width: 767px) {
  .rl-grid { grid-template-columns: 1fr; }
  .rl-podium { flex-wrap: wrap; }
  .rl-podium-block { width: 70px !important; }
}

/* 30. Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .rl-xp-bar,
  .rl-xp-bar-lg,
  .rl-card,
  .rl-grid .rl-card,
  .rl-app-card,
  .rl-uc-tile,
  .rl-star,
  .rl-btn-primary {
    transition: none !important;
    animation: none !important;
  }
  .rl-burst-chip { animation: none !important; }
}
