/* Crafting Mastery Spectator Styles */

.cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.cm-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.cm-select {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.9rem;
  cursor: pointer;
}

.cm-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .cm-grid {
    grid-template-columns: 1fr;
  }
}

.cm-card {
  background: #1f2937;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #374151;
}

.cm-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  color: #e5e7eb;
}

.cm-empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
  font-style: italic;
}

/* Mastery Card */
.cm-mastery-card {
  border-width: 2px;
  text-align: center;
}

.cm-tier-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.cm-level {
  font-size: 2rem;
  font-weight: 700;
  color: #e5e7eb;
  margin: 0.25rem 0;
}

.cm-xp-bar {
  position: relative;
  height: 24px;
  background: #374151;
  border-radius: 12px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.cm-xp-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
}

.cm-xp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.cm-stats-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  color: #9ca3af;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Bonuses */
.cm-bonus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.cm-bonus {
  text-align: center;
  padding: 0.5rem;
  background: #111827;
  border-radius: 8px;
}

.cm-bonus-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #34d399;
}

.cm-bonus-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* Recipes */
.cm-recipe-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cm-recipe {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 8px;
  background: #111827;
}

.cm-recipe.cm-unlocked {
  border-left: 3px solid #34d399;
}

.cm-recipe.cm-locked {
  border-left: 3px solid #6b7280;
  opacity: 0.6;
}

.cm-recipe-emoji {
  font-size: 1.2rem;
  text-align: center;
}

.cm-recipe-name {
  font-weight: 500;
  color: #e5e7eb;
  text-transform: capitalize;
}

.cm-recipe-level {
  font-size: 0.8rem;
  color: #9ca3af;
}

.cm-recipe-desc {
  grid-column: 2 / -1;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Leaderboard */
.cm-table {
  width: 100%;
  border-collapse: collapse;
}

.cm-table th {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #374151;
  color: #9ca3af;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.cm-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #1f2937;
  color: #e5e7eb;
  font-size: 0.85rem;
}

/* Queue */
.cm-queue-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  background: #111827;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.cm-queue-recipe {
  font-weight: 500;
  color: #e5e7eb;
  text-transform: capitalize;
  flex: 1;
}

.cm-queue-progress {
  color: #fbbf24;
  font-weight: 600;
}

.cm-queue-status {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.cm-status-queued { background: #1e40af; color: #93c5fd; }
.cm-status-active { background: #065f46; color: #6ee7b7; }
.cm-status-completed { background: #374151; color: #9ca3af; }
.cm-status-cancelled { background: #7f1d1d; color: #fca5a5; }

/* Dark mode adjustments */
.light-mode .cm-card { background: #f9fafb; border-color: #e5e7eb; }
.light-mode .cm-card h3 { color: #111827; }
.light-mode .cm-select { background: #f9fafb; border-color: #d1d5db; color: #111827; }
.light-mode .cm-recipe { background: #f3f4f6; }
.light-mode .cm-recipe-name { color: #111827; }
.light-mode .cm-bonus { background: #f3f4f6; }
.light-mode .cm-table td { color: #374151; border-color: #e5e7eb; }
.light-mode .cm-table th { color: #6b7280; border-color: #d1d5db; }
.light-mode .cm-queue-item { background: #f3f4f6; }
.light-mode .cm-level { color: #111827; }

/* Mobile responsive */
@media (max-width: 480px) {
  .cm-bonus-grid { grid-template-columns: 1fr; }
  .cm-stats-row { flex-direction: column; gap: 0.5rem; }
  .cm-header { flex-direction: column; gap: 0.5rem; }
}
