/* Quest Tracker Styles */

.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.quest-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.quest-agent-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quest-agent-btn {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.quest-agent-btn:hover {
  background: #e5e7eb;
}

.quest-agent-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.quest-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quest-section h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

.quest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quest-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  background: #fafafa;
  transition: transform 0.15s, box-shadow 0.15s;
}

.quest-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quest-card.quest-uncommon { border-left: 3px solid #22c55e; }
.quest-card.quest-rare     { border-left: 3px solid #3b82f6; }
.quest-card.quest-epic     { border-left: 3px solid #a855f7; }

.quest-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.quest-type-icon {
  font-size: 1.2rem;
}

.quest-name {
  font-weight: 600;
  flex: 1;
}

.quest-rarity-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  color: white;
  font-weight: 500;
}

.quest-description {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.quest-requirements {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.quest-req {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.quest-req-label {
  min-width: 120px;
  color: #374151;
}

.quest-progress-bar {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.quest-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.quest-req-count {
  min-width: 50px;
  text-align: right;
  font-weight: 500;
  color: #374151;
}

.quest-rewards {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 4px;
}

.quest-timer {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
}

.quest-empty {
  color: #9ca3af;
  font-size: 0.9rem;
  padding: 16px;
  text-align: center;
}

.quest-error {
  color: #ef4444;
  font-size: 0.85rem;
}

/* Completed quest mini cards */
.quest-card-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f0fdf4;
  font-size: 0.85rem;
}

.quest-completed-card .quest-name {
  flex: 1;
}

.quest-completed-tick {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Stats grid */
.quest-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.quest-stat {
  text-align: center;
  padding: 10px;
  background: #f3f4f6;
  border-radius: 8px;
}

.quest-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
}

.quest-stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

.quest-rarity-breakdown {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.quest-rarity-count {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: #f3f4f6;
  border-radius: 12px;
}

/* Dark mode */
.dark .quest-card {
  background: #1f2937;
  border-color: #374151;
}

.dark .quest-agent-btn {
  background: #374151;
  border-color: #4b5563;
  color: #d1d5db;
}

.dark .quest-agent-btn:hover {
  background: #4b5563;
}

.dark .quest-agent-btn.active {
  background: #3b82f6;
  color: white;
}

.dark .quest-description {
  color: #9ca3af;
}

.dark .quest-req-label,
.dark .quest-req-count {
  color: #d1d5db;
}

.dark .quest-progress-bar {
  background: #374151;
}

.dark .quest-stat {
  background: #374151;
}

.dark .quest-stat-value {
  color: #f9fafb;
}

.dark .quest-card-mini {
  background: #1a2e1a;
  border-color: #374151;
}

.dark .quest-section h3 {
  border-color: #374151;
}

.dark .quest-rarity-count {
  background: #374151;
  color: #d1d5db;
}

.dark .quest-empty {
  color: #6b7280;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .quest-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quest-req {
    flex-wrap: wrap;
  }

  .quest-req-label {
    min-width: unset;
    width: 100%;
  }

  .quest-agent-selector {
    width: 100%;
  }
}
